Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ably-labs/ably-rock-paper-scissors
A game of rock, paper scissors unlike any other.
https://github.com/ably-labs/ably-rock-paper-scissors
demo game javascipt
Last synced: 5 days ago
JSON representation
A game of rock, paper scissors unlike any other.
- Host: GitHub
- URL: https://github.com/ably-labs/ably-rock-paper-scissors
- Owner: ably-labs
- License: apache-2.0
- Created: 2021-09-16T09:24:41.000Z (about 3 years ago)
- Default Branch: starting-out
- Last Pushed: 2023-07-08T19:44:28.000Z (over 1 year ago)
- Last Synced: 2024-04-17T15:32:35.378Z (7 months ago)
- Topics: demo, game, javascipt
- Language: JavaScript
- Homepage:
- Size: 225 KB
- Stars: 1
- Watchers: 5
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ably-rock-paper-scissors
[![Discord](https://img.shields.io/discord/823552399909584908?label=Get%20help&style=for-the-badge)](https://discord.gg/7qWKqdQWYB)
This project contains a multiplayer game in which players battle as ever-changing hand shapes of rock, paper, and scissors.
## Running it
Firstly, [sign up to Ably](https://ably.com/signup) to get a free Ably Account. Go to one of your Ably Account's [Apps](https://ably.com/accounts/any/apps/any), and get an [API key](https://ably.com/accounts/any/apps/any/app_keys) for it.
Once you have the API key, create a `.env` file, and add the API key as:
```
API_KEY={your Ably API key}
```With that, simply run `npm run` to start up a server!
Navigate to `localhost:3000` if you're running it locally to access the game's welcome page.
## About the game
You will appear on a map as a hand. You will be either rock, paper or scissors.If you collide with another player, then one of you will be defeated if you are different hand shape.
* Paper defeats rock
* Rock defeats scissors
* Scissors defeats paperEvery 5 seconds, everyone's colour and shape will change. Each player you defeat gets you a point. Good luck!