Skip to content

Fast server-authoritative game architecture built with Node.js

Notifications You must be signed in to change notification settings

zvoverman/multiplayer-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js Multiplayer Game Demo

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)

Getting Started

Steps on how to install and run the game locally.

Prerequisites

  1. Install Node.js

Local Installation

  1. Clone the Repo

    git clone https://github.com/zvoverman/multiplayer-game.git
  2. Install Project Dependencies

    npm install
  3. Run the Server Locally

    npm run start

AWS Automation

Development

  1. Create a dotenv (.env) file

    INSTANCE_TYPE=""
    SECURITY_GROUP=""
    REGION=""
    OWNER_ID=""
    SSH_USER=""
    KEY_NAME=""
  2. Run Express.js Server on an EC2 Instance

    npm run start-ec2
  3. Update Server Packages and Pull New Game Code

    npm run update-ec2
  4. Terminate Last Created EC2 Instance

    npm run stop-ec2

Deployment

  1. Create a dotenv (.env) file

    INSTANCE_TYPE=""
    SECURITY_GROUP=""
    REGION=""
    OWNER_ID=""
    SSH_USER=""
    KEY_NAME=""
  2. Create Instance, Start Express.js Server, and Terminate Instance (Ctrl+C)

    npm run deploy

About

Fast server-authoritative game architecture built with Node.js

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published