ivangfr / socketio-express-phaser3

The goal of this project is to implement a multiplayer game using Socket.IO, Express and Phaser 3.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

socketio-express-phaser3

The goal of this project is to implement a multiplayer game using Socket.IO, ExpressJS and Phaser 3.

Proof-of-Concepts & Articles

On ivangfr.github.io, I have compiled my Proof-of-Concepts (PoCs) and articles. You can easily search for the technology you are interested in by using the filter. Who knows, perhaps I have already implemented a PoC or written an article about what you are looking for.

Additional Readings

Prerequisites

  • Node.js
  • ngrok, in case you want to expose the game, running on your local machine, to the internet

Car images

We are using this beautiful car image!

car

Thanks Freepik for designing it!

Start game

  • Open a terminal and navigate to socketio-express-phaser3 root folder

  • Execute the command below if you are running it for the first time

    npm install
    
  • Run the following command to start the game server

    node server.js
    

Play game

Expose game to the internet

  • While the server is running in one terminal, open another terminal and run the following command

    ngrok http 5000
    
  • Share the Forwarding url with your friends

    ...
    Forwarding     http://cf...0a.ngrok.io -> http://localhost:5000
    Forwarding     https://cf...0a.ngrok.io -> http://localhost:5000
    ...
    

How to upgrade dependencies to latest version

  • In a terminal, make sure you are in socketio-express-phaser3 root folder

  • Run the following commands

    npm upgrade
    npm i -g npm-check-updates
    ncu -u
    npm install
    

About

The goal of this project is to implement a multiplayer game using Socket.IO, Express and Phaser 3.


Languages

Language:JavaScript 93.1%Language:HTML 6.9%