It works best on the local network since it's not optimized for larger latency networks. I worked on this project primarily for personal educational purposes, so don't think of this as a "production-ready multiplayer game".
Take a look at the code, tweak it and play around it. 😄
- Install Node.js
- Download the project
- Using a terminal navigate to project directory
- Run
npm install
command to install all project dependencies - Run
npm start
to start the server - In the browser, navigate to http://localhost:3000. In the other tab, do the same thing to have two different players connecting to the game
- (optional) To change the port that server is listening on, open the
./app.js
file and change the value of thePORT
constant - Enjoy!