Skip to content

Latest commit

 

History

History
85 lines (63 loc) · 1.6 KB

README.md

File metadata and controls

85 lines (63 loc) · 1.6 KB

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