edited readme
This commit is contained in:
parent
a33ebeccdd
commit
97513eac2d
75
README.md
75
README.md
@ -1,13 +1,58 @@
|
|||||||
# Online multiplayer Ludo
|
# <center>Online Multiplayer Ludo Game</center>
|
||||||
## About
|
|
||||||
|
|
||||||
**Ludo** is a strategy board game for two to four players, in which the players race their four tokens from start to finish according to the rolls of a single die. Like other cross and circle games, Ludo is derived from the Indian game Pachisi, but simpler. The game and its variations are popular in many countries and under various names. [Read more](https://en.wikipedia.org/wiki/Ludo_(board_game))
|
|
||||||
|
|
||||||
## Interface
|
\>\> [Play Online here](www.github.com/wenszel/mern-ludo) <<
|
||||||

|
|
||||||
|
\>\> [Watch YouTube Video here](www.github.com/wenszel/mern-ludo) <<
|
||||||
|
|
||||||
|
## Table of content
|
||||||
|
|
||||||
|
- [About](#about)
|
||||||
|
|
||||||
|
- [Architecture](#architecture)
|
||||||
|
|
||||||
|
- [Key Features and Challenges](#key-features-and-challenges)
|
||||||
|
|
||||||
|
- [Tech Stack](#tech-stack)
|
||||||
|
|
||||||
|
- [Installation](#installation)
|
||||||
|
|
||||||
|
- [Screenshots](#screenshots)
|
||||||
|
|
||||||
|
## About
|
||||||
|
Ludo Online is a multiplayer web-based implementation of the classic board game Ludo, built using the MERN stack and integrated with SocketIO for real-time communication.
|
||||||
|
## Architecture
|
||||||
|

|
||||||
|
## Tech Stack
|
||||||
|
Frontend:
|
||||||
|
  
|
||||||
|
  
|
||||||
|
Backend:
|
||||||
|
   
|
||||||
|
Tests:
|
||||||
|
 
|
||||||
|
Tools:
|
||||||
|
    
|
||||||
|
|
||||||
|
## Key Features and Challenges
|
||||||
|
|
||||||
|
- Maintained session consistency with **Express Session** and **MongoDB**.
|
||||||
|
- Enabled real-time communication via **WebSocket** and **SocketIO**.
|
||||||
|
- Ensured code reliability with testing using **Mocha**, **Chai**, and **Jest**.
|
||||||
|
- Hosted in a **Docker** container on **AWS EC2**.
|
||||||
|
- Established CI/CD using **CircleCI**.
|
||||||
|
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
1. Download this repository
|
||||||
|
2. Generate your own [mongoDB atlas](https://www.mongodb.com) credential URL. It should looks like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
mongodb+srv://madmin:<password>@clustername.mongodb.net/<dbname>?retryWrites=true&w=majority
|
||||||
|
```
|
||||||
|
3. Add this URL to the /backend/credentials.js file
|
||||||
|
4. Perform these commands in the main directory:
|
||||||
|
|
||||||
## Installation
|
|
||||||
Play this game [here](https://smaga-wiktor-ludo.herokuapp.com)
|
|
||||||
```
|
```
|
||||||
npm i
|
npm i
|
||||||
npm start
|
npm start
|
||||||
@ -16,16 +61,6 @@ npm i
|
|||||||
node server.js
|
node server.js
|
||||||
```
|
```
|
||||||
|
|
||||||
## Technologies
|
## Screenshots
|
||||||
### Backend
|
|
||||||
- Node.js
|

|
||||||
- Express
|
|
||||||
- Express-session
|
|
||||||
- MongoDB, Mongoose
|
|
||||||
- MongoDB sessions store
|
|
||||||
- SocketIO
|
|
||||||
### Frontend
|
|
||||||
- React
|
|
||||||
- Axios
|
|
||||||
- Material UI
|
|
||||||
- Canvas
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
const { getRoom, updateRoom } = require('../controllers/roomController');
|
const { getRoom, updateRoom } = require('../services/roomService');
|
||||||
const { sendToPlayersRolledNumber } = require('../socket/emits');
|
const { sendToPlayersRolledNumber } = require('../socket/emits');
|
||||||
const { rollDice, isMoveValid } = require('./handlersFunctions');
|
const { rollDice, isMoveValid } = require('./handlersFunctions');
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ const rollDice = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const makeRandomMove = async roomId => {
|
const makeRandomMove = async roomId => {
|
||||||
const { updateRoom, getRoom } = require('../controllers/roomController');
|
const { updateRoom, getRoom } = require('../services/roomService');
|
||||||
const room = await getRoom(roomId);
|
const room = await getRoom(roomId);
|
||||||
if (room.rolledNumber === null) {
|
if (room.rolledNumber === null) {
|
||||||
room.rolledNumber = rollDice();
|
room.rolledNumber = rollDice();
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
const { getRoom, updateRoom } = require('../controllers/roomController');
|
const { getRoom, updateRoom } = require('../services/roomService');
|
||||||
const { colors } = require('../utils/constants');
|
const { colors } = require('../utils/constants');
|
||||||
|
|
||||||
module.exports = socket => {
|
module.exports = socket => {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
const { getRooms, getRoom, updateRoom, createNewRoom } = require('../controllers/roomController');
|
const { getRooms, getRoom, updateRoom, createNewRoom } = require('../services/roomService');
|
||||||
const { sendToOnePlayerRooms, sendToOnePlayerData } = require('../socket/emits');
|
const { sendToOnePlayerRooms, sendToOnePlayerData } = require('../socket/emits');
|
||||||
|
|
||||||
module.exports = socket => {
|
module.exports = socket => {
|
||||||
|
|||||||
BIN
src/images/architecture.png
Normal file
BIN
src/images/architecture.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 275 KiB |
Loading…
Reference in New Issue
Block a user