update readme

This commit is contained in:
Derek Jamison 2023-03-24 23:23:31 -04:00
parent df12e82738
commit 029804873a
2 changed files with 81 additions and 61 deletions

View File

@ -1,39 +1,95 @@
# Rock Papper Scissors # Rock Papper Scissors
![Flipper Zero Game](./prebuilt/win.png)
## Introduction ## Introduction
This is game of Rock, Paper, Scissors. In version 1, we use the subghz radio to find other players, communicate moves, and exchange contact information. This is a multi-player game of Rock, Paper, Scissors! In version 1, we use the [Flipper Zero](https://flipperzero.one/) Sub-GHz radio to find other players, communicate moves, and exchange contact information.
Watch on [YouTube](https://youtu.be/eGOv6Gbar7I).
## Quick install directions for Flipper Zero running Official Firmware!
- Download the latest FAP file matching your firmware version.
- [Release 0.79.1](./prebuilt/v1.0/official-firmware/release-0.79.1/Rock_Paper_Scissors.fap)
- [RC 0.80.0](./prebuilt/v1.0/official-firmware/rc-0.80.0/Rock_Paper_Scissors.fap)
- Copy the downloaded FAP file to the SD Card/apps/Games folder (using qFlipper or by ejecting the SD Card and inserting it into your PC).
- If you have a different firmware, see the [installation directions](#installation-directions) below.
## Playing the game
These directions assume you are starting at the flipper desktop. If not, please press the back button until you are at the desktop.
- On both Flippers, launch the "Rock Paper Scissors" application.
- Press the OK button on the flipper to pull up the main menu.
- Choose "Applications" from the menu.
- Choose "Games" from the sub-menu.
- Choose "Rock Paper Scissors"
- On both Flippers, choose "Edit contact info".
- Enter your Discord name, or Facebook name, or whatever you want to share with other players.
- Hold the backspace button (top right) to clear the field.
- Hold a letter button to choose lowercase letters.
- Use the enter button (bottom right) to save your contact info.
- On Flipper 1, choose "Host game".
- select a valid frequency. (like "433.92" in US region)
- choose a game number (like "042")
- click OK button to start game.
- On Flipper 2, choose "Join game".
- select the same valid frequency as Flipper 1.
- "game none" should change to show the game number from Flipper 1 & its name.
- click OK button to join game.
- Once two players are joined:
- Press "OK" to send "1". The other player should also press "OK" to send "1" back - Press "OK" to send "2". The other player should also press "OK" to send "2" back - Press "UP" to send a "Rock", or "RIGHT" to send a "Paper", or "DOWN" to send a "Scissors".
- Rules:
- Rock beats Scissors.
- Paper beats Rock.
- Scissors beat Paper.
- Two identical items tie.
- Play again screen will show the results of the game.
- Click "Right" to select "No".
- Click "Left" to select "Yes" (the default).
- Click "OK" to answer the prompt.
- Short press the BACK button for the main menu.
- Long press the BACK button to exit the game.
## Status ## Status
This is currently a work in progress! V1 completed features:
- The game logic is complete (two flippers can play against each other.)
Completed work:
- Most of the game logic is complete (two flippers should be able to play against each other.)
- UI to show Flipper images instead of just debug text. - UI to show Flipper images instead of just debug text.
- Allow changing contact information (discord, Facebook, etc.)
- Allow changing frequency, in case one Flipper is in a restricted region.
- Allow changing game number, in case multiple games at a conference.
- Show games found & let user pick the game to join.
- Receiving a Join game does an ACK (to cause game on joiner to start).
- A join ACK removes it from the list of available games.
- Vibro on button press (valid move). - Vibro on button press (valid move).
- "Song" when win/loss/draw. - "Song" when win/loss/draw.
- Show games found & let user pick the game to join.
- Config - Allow changing game number.
- Config - Allow changing frequency.
- Receiving a Join game does an ACK (to cause game on joiner to start).
- Log game results & contact info onto SD card. - Log game results & contact info onto SD card.
- Allow viewing past games/scores. - Allow viewing past games/scores.
- A join ACK removes it from the list of available games.
- Config - Allow changing hard-coded CONTACT_INFO message.
- Config - Allow saving CONTACT_INFO message.
- Relaxed timing, so Count 1/Count 2/RPS no longer have to be timed tightly. - Relaxed timing, so Count 1/Count 2/RPS no longer have to be timed tightly.
- Play again screen. - Added a "Play again" screen.
Remaining work (for subghz version):
- Play again from one Flipper Zero auto-starts/exit other Flipper Zero. - Play again from one Flipper Zero auto-starts/exit other Flipper Zero.
Planed work for V1.1:
- Wrap user content to two lines on Past Games screen. - Wrap user content to two lines on Past Games screen.
- Allow for replacement keyboard. - Allow for replacement of keyboard layout/keys.
- Refactor the code, so it has less duplication. - Refactor the code, so it has less duplication.
- Write tutorial. - Write tutorial.
Future ideas: Future ideas:
- Add game ending animations. - Add game ending animations.
@ -42,54 +98,16 @@ Future ideas:
- Instead of subghz, use IR. - Instead of subghz, use IR.
- Instead of subghz, use GPIO. - Instead of subghz, use GPIO.
## Installation Directions ## Installation Directions
This project is intended to be overlayed on top of an existing firmware repo. This project is intended to be overlayed on top of an existing firmware repo.
- Clone, Build & Deploy an existing flipper zero firmware repo. See this [tutorial](/firmware/updating/README.md) for updating firmware. - Clone, Build & Deploy an existing flipper zero firmware repo. See this [tutorial](/firmware/updating/README.md) for updating firmware.
- Copy the "rock_paper_scissors" [folder](..) to the \applications\plugins\rock_paper_scissors folder in your firmware. - Copy the "rock_paper_scissors" [folder](..) to the \applications_user\rock_paper_scissors folder in your firmware.
- Build & deploy the firmware. See this [tutorial](/firmware/updating/README.md) for updating firmware. - Build & deploy the firmware. See this [tutorial](/firmware/updating/README.md) for updating firmware.
- NOTE: You can also extract the rock_paper_scissors.FAP from resources.tar file and use qFlipper to copy the file to the SD Card/apps/Misc folder. - NOTE: You can also copy rock_paper_scissors.FAP from latest\.extapps folder and use qFlipper to copy the file to the SD Card/apps/Misc folder.
### Open question - Should we use "applications" or "applications_user"?
## Running the updated firmware
These directions assume you are starting at the flipper desktop. If not, please press the back button until you are at the desktop.
- Press the OK button on the flipper to pull up the main menu.
- Choose "Applications" from the menu.
- Choose "Games" from the sub-menu.
- Choose "Rock Paper Scissors"
- Do the same steps on your second Flipper.
- On Flipper 1, choose "Host game".
- select a valid frequency. (like "433.92" in US region)
- choose a game number.
- click OK button to start game.
- On Flipper 2, choose "Join game".
- select the same valid frequency as Flipper 1.
- "game none" should change to show the game number from Flipper 1 & its name.
-click OK button to join game.
- Once two players are joined:
- Press "OK" to send "1". The other player should also press "OK" to send "1" back (at the same time!)
- Press "OK" to send "2". The other player should also press "OK" to send "2" back (at the same time!)
- Press "UP" to send a "Rock", or "RIGHT" to send a "Paper", or "DOWN" to send a "Scissors". The other player should send at same time!
- Rules:
- Rock beats Scissors.
- Paper beats Rock.
- Scissors beat Paper.
- Two identical items tie.
- Short press the BACK button for the main menu.
- Long press the BACK button to exit.
## HackRF One ## HackRF One
@ -109,7 +127,8 @@ sudo hackrf_transfer -r flipper-chat.rf -f 433920000 -s 8000000 -x 47
- What I typically do is: - What I typically do is:
- Use the Flipper Zero to send a messasge that I record, then I play back that message at a later time when I want to pretend the other Flipper Zero is sending a message. You can use the chat app in https://lab.flipper.net/cli, like shown in the video to send a specific packet (or you can use your own code to create the packet.) - Use the Flipper Zero to send a messasge that I record, then I play back that message at a later time when I want to pretend the other Flipper Zero is sending a message. You can use the chat app in https://lab.flipper.net/cli, like shown in the video to send a specific packet (or you can use your own code to create the packet.)
- Use the HackRF One to record the message from my Fliiper Zero. Then later I use the chat app in https://lab.flipper.net/cli, to see what the message was (or I replay the message to see how my application would respond.) - Use the HackRF One to record the message from my Flipper Zero. Then later I use the chat app in https://lab.flipper.net/cli, to see what the message was (or I replay the message to see how my application would respond.)
## Details about the project files ## Details about the project files
@ -126,7 +145,8 @@ sudo hackrf_transfer -r flipper-chat.rf -f 433920000 -s 8000000 -x 47
- The icon for our application. - The icon for our application.
- rock_paper_scissors.c - rock_paper_scissors.c
- This is the game applcation. - This is the game applcation (tutorial coming soon).
## Example data ## Example data

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB