uno-online/README.md

105 lines
4.0 KiB
Markdown
Raw Permalink Normal View History

2023-04-07 01:45:13 +00:00
> Update: I have run out of Heroku credits and can no longer continue to keep the game deployed. Feel free to clone the repo and run it locally on your machine. Thanks!
2021-03-04 23:57:50 +00:00
<h1 align="center">UNO ONLINE</h1>
2021-03-05 00:08:26 +00:00
<h2 align="center">Two player online game of UNO</h2>
2023-04-07 01:45:49 +00:00
<h3 align="center">Was previously live at https://uno-online-multiplayer.herokuapp.com</h3>
2021-03-04 23:57:50 +00:00
2021-03-05 00:08:26 +00:00
<img src="client/src/assets/logo.png" alt="UNO Logo" width="33%" align="center" />
2021-03-05 00:01:32 +00:00
2021-03-04 23:57:50 +00:00
## 🤔 What is UNO?
2021-03-05 00:12:02 +00:00
UNO is the classic and beloved card game thats easy to pick up and impossible to put down! Players take turns matching a card in their hand with the current card shown on top of the deck either by color or number. Special action cards deliver game-changing moments as they each perform a function to help you defeat your opponents. These include skips, reverses, draw twos, color-changing wild and draw four wild cards.
2021-03-04 23:57:50 +00:00
## ⚠️ Game Rules
2021-03-05 00:01:32 +00:00
Read the complete rules of UNO [here](https://www.unorules.com/).
2021-03-04 23:57:50 +00:00
2021-03-05 00:05:56 +00:00
## ❓ About the Game
2021-03-04 23:57:50 +00:00
2021-03-05 00:17:51 +00:00
This two-player online version of the game was built with [React](https://reactjs.org/), [Socket.IO](https://socket.io/), [Express](https://expressjs.com/) and [Node](https://nodejs.org/en/). It currently supports two-players in each game. It also has text chat functionality to communicate with your opponent!
2021-03-08 08:09:53 +00:00
2021-03-08 08:07:32 +00:00
[How I Made This Game](https://www.youtube.com/watch?v=FBAJdbpFnjs)
2021-03-04 23:57:50 +00:00
2021-03-05 00:05:56 +00:00
## 🧐 How to Play?
2021-03-04 23:57:50 +00:00
1. Once you're on the homepage of the game, you can either host a new game or join a friend's game.
2. To host a new game, click on CREATE GAME. A game code will be generated which you can share with your friend.
3. To join a friend's game, enter the game code given by them, and click on JOIN GAME.
2021-03-05 00:05:56 +00:00
4. That's it! Enjoy the game and remember, no toxicity!
2021-03-04 23:57:50 +00:00
## 🎮 Screenshots
<img src="screenshots/Screenshot-1.png" alt="Screenshot 1" width="75%" align="center" />
<img src="screenshots/Screenshot-2.png" alt="Screenshot 2" width="75%" align="center" />
2021-03-05 00:15:41 +00:00
<img src="screenshots/Screenshot-3.png" alt="Screenshot 3" width="75%" align="center" />
2021-03-04 23:57:50 +00:00
## 🏁 Getting Started (to run game locally)
Follow the steps below, after cloning the repository:
### 🖐 Requirements
**For Installing:**
- Node
2021-03-07 11:33:04 +00:00
**For Running:**
- Change socket.IO endpoint on client side. To do this, go to `client/src/components/Game.js` and change line #26 from `const ENDPOINT = 'https://uno-online-multiplayer.herokuapp.com/'` to `const ENDPOINT = 'http://localhost:5000'`
2021-03-04 23:57:50 +00:00
### ⏳ Installation
2021-03-05 00:01:32 +00:00
- At the root of the project directory, use npm to install the server-side dependencies
2021-03-04 23:57:50 +00:00
```bash
npm install
```
This command installs all the server-side dependencies needed for the game to run locally.
2021-03-06 20:52:29 +00:00
- Use npm to run server
2021-03-04 23:57:50 +00:00
```bash
npm start
```
This command gets the server running on localhost port 5000.
2021-03-05 00:01:32 +00:00
- In a separate terminal, navigate into the client folder and use npm to install the client-side dependencies
2021-03-04 23:57:50 +00:00
```bash
cd client
npm install
```
This command installs all the client-side dependencies needed for the game to run locally.
2021-03-05 00:10:09 +00:00
- Finally, use npm to run client
2021-03-04 23:57:50 +00:00
```bash
npm start
```
This command gets the client running on localhost port 3000.
Head over to http://localhost:3000/ and enjoy the game! 🎉
## 🤝 Contributing
2021-03-06 20:52:29 +00:00
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated. The **Issues** tab is a good place to begin!
2021-03-04 23:57:50 +00:00
2021-03-07 11:24:09 +00:00
1. Fork the project repo
2. Clone the forked repo on your machine
3. Create your feature branch (`git checkout -b feature/AmazingFeature`)
4. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
5. Push to the branch on your forked repo (`git push origin feature/AmazingFeature`)
6. Open a pull request
2021-03-04 23:57:50 +00:00
## ❤️ Acknowledgements
2021-03-08 08:13:03 +00:00
* [Chirantan P](https://www.linkedin.com/in/chirantan-pradhan-76673019b/) for the background images
2021-03-07 11:21:47 +00:00
* [AlexDer](https://alexder.itch.io/) for the UNO cards assets
2021-03-08 08:13:03 +00:00
* [3mil1](https://codepen.io/3mil1) for the button designs
2021-03-07 11:48:12 +00:00
* [Divyank](https://codepen.io/Pahlaz) for the chat box design