Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hajis23/room-game
Multiplayer server meshing demo
https://github.com/hajis23/room-game
game matter-js multiplayer phaser react socket-io websocket
Last synced: about 2 hours ago
JSON representation
Multiplayer server meshing demo
- Host: GitHub
- URL: https://github.com/hajis23/room-game
- Owner: Hajis23
- License: mit
- Created: 2023-11-06T13:02:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-07T10:57:26.000Z (3 days ago)
- Last Synced: 2025-02-07T11:35:45.559Z (3 days ago)
- Topics: game, matter-js, multiplayer, phaser, react, socket-io, websocket
- Language: JavaScript
- Homepage: https://hajis23.github.io/room-game/
- Size: 646 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Room game
![hajis](https://github.com/user-attachments/assets/d3279a3d-7fbe-4875-afa8-beec1eb03e16)A prototype of a multi-server real-time online multiplayer game, implementing:
- simple Server Meshing / Spatial partitioning between server nodes.
- Object replication between nodes
- Object transfer between nodes
- Server-authoritative physics with simple client-side prediction
- Server node discovery & coordination with a master nodeWe built it as a course project for the University of Helsinki Distributed Systems 2023 course.
The server nodes are based on NodeJS, run inside docker containers and communicate with the client and other server nodes via [socket.io](https://socket.io/).
The game client is created using [Phaser 3](https://github.com/photonstorm/phaser) with a [React](https://react.dev/) user interface.
The game features a simple dungeon-like map consisting of multiple rooms, created using Tiled. The players can freely move around the map and interact with other players (only by colliding with them). The rooms are simulated on separate servers and the player can seamlessly walk from one server to another.
## Setup
Make sure you have docker and npm installed.
To install all dependencies run following command:
```
npm install
```## Run
Run the Vite development server:
```
npm run client
```
The dev build is served at localhost:8000.Run coordinator and 3 room servers with:
```
npm run room_server
```
This builds the required docker images and runs the compose file `room_server/docker-compose.yml`.If you still come accross any `module not found`-errors, try running `npm install` locally in `room_server/` or `coordinator/`.