My first actual PICO-8 game that I made without any tutorials.
Two-player Rock Scissors Paper in 292-lines of code. It does run correctly so that's a medal for you there.
Could probably be coded in 10 or less for one- or two- players.
Hokay, time you read a few tutorials and instructions to tighten your code.
https://www.lexaloffle.com/pico-8.php?page=manual
Lemme know if you need help. :)
Idea for the interface:
When one player picks, "??????" appears near his number.
When both players picked, "?????" replace with their actual picks and it shows who wins.
That's better than menu, because in menu the other player sees what does player pick.
To type key icons in Pico code editor, use shift+L for left, shift+D for down, shift+R for right.
And you were writing an update just as I wrote this ! What are the odds ? :D
Haven't heard back from you, Pepper. So I'll make a simple 1-player game with graphics using Shogal's suggestion for input.
Understand most of the code is just fancy display. What you want to be worried about are these two things.
ITEM={Rock, Scissors, Paper}
So if you type:
print item[1] |
You'll get back: Rock. Scissors for 2, and Paper for 3.
Now to determine who wins since the order of the items has the preceding one always be the winner, you just need to subtract the player's choice by the computer. (Computer-Player)
If it equals 1 then the player has won. The player also wins if the total is -2. If the two items are the same then the game is a draw.
Anything else and the computer has won. No need to make 9-comparisons. :)
HOPE THIS HELPS !
[Please log in to post a comment]