Log In  

Cart #kodiborisi-0 | 2019-09-18 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

My first actual PICO-8 game that I made without any tutorials.

P#67875 2019-09-18 23:17 ( Edited 2019-09-20 01:28)

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. :)

P#67880 2019-09-19 01:40 ( Edited 2019-09-19 04:44)

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.

P#67888 2019-09-19 02:39 ( Edited 2019-09-19 02:41)

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.

Cart #suyubuhipi-0 | 2019-09-20 | Code ▽ | Embed ▽ | No License

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 !

P#67918 2019-09-20 01:40 ( Edited 2019-09-20 06:18)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 11:18:13 | 0.026s | Q:25