A Node.js powered game demo utilizing the Javascript HTML5 Canvas for rendering.
Fast and Responsive Client-Server Architecture:
- Server authoratative gameplay
- Variable frame rate
- Client-side prediction
- Server reconciliation
- Entity interpolation
Lots of research from Client-Server Game Architecture by Gabirel Gambetta (amazing article)
Steps on how to install and run the game locally.
- Install Node.js
-
Clone the Repo
git clone https://github.com/zvoverman/multiplayer-game.git
-
Install Project Dependencies
npm install
-
Run the Server Locally
npm run start
-
Create a dotenv (.env) file
INSTANCE_TYPE="" SECURITY_GROUP="" REGION="" OWNER_ID="" SSH_USER="" KEY_NAME=""
-
Run Express.js Server on an EC2 Instance
npm run start-ec2
-
Update Server Packages and Pull New Game Code
npm run update-ec2
-
Terminate Last Created EC2 Instance
npm run stop-ec2
-
Create a dotenv (.env) file
INSTANCE_TYPE="" SECURITY_GROUP="" REGION="" OWNER_ID="" SSH_USER="" KEY_NAME=""
-
Create Instance, Start Express.js Server, and Terminate Instance (Ctrl+C)
npm run deploy