Multiplayer Rock - Paper - Scissors Game
- HTML
- CSS
- Bootstrap
- JavaScript
- jQuery
- moment.js
- firebase
- Link directly to the page here: https://tim-shaffer.github.io/RPS-Multiplayer/
-
On load of the page, enter a User Name in the space provide and hit the submit button.
-
Programming will decide what you are allowed to do!
- The first player to enter the game will be player 1 and the name will show in the appropriate area.
- The second player to enter the game will be player 2 and the name will show in the appropriate area.
- Only Two Players are allowed per game.
- Any subsequent players are added with a message that the "Game is Full" but that they can still chat!
-
Each Player has a corresponding section that allows them to select Rock, Paper, or Scissors
- Selections are noted to a database and are hidden from view until both players have made a selection
-
When both players have made a selection, a Winner and Loser are determined.
- Rock smashes Scissors
- Paper covers Rock
- Scissors cut Paper
- Same selections are Ties.
-
The game determines the Winner and shows the results.
- With the results, either player is allowed to ask for a "Rematch" by clicking the rematch button.
-
Scores are maintained for each player in their own sections.
-
-
Upon hitting the submit button to try to enter the game, checks are done to see if there is an ACTIVE game already in progress.
- A game is considered ACTIVE if there have been updates in the last 5 minutes.
- If there isn't an ACTIVE game, the database is refreshed and the user is allowed to enter as Player 1 and wait for a second player.
- If there is an ACTIVE game, the process will decide if the user becomes a player or just a "chatter"
-
The "chatter" will see the game play and the results but can not participate in the game play.
- The Messaging section will be refreshed as each user enters to play or chat.
- Messages are tagged with either the User Name or "BOT" (computer) to identify who created the message.
- A timestamp is also created and displayed for when that message occurred.
- Each users list of messages will only reflect messages from the point of time that user entered the game.