This is a boilerplate combining several top open source tools to give you an easy starting point to making an io multipler game. It uses Node.js with webpack, ES6, and classes. ExpressJS serves webpages and Socket.io handles the communication. Phaser 3, provides a 2D engine for graphics.
- If you are new to coding, better to learn JS first https://developer.mozilla.org/en-US/docs/Learn/JavaScript
- Download and install Node.js and optionally MongoDb. https://nodejs.org/en/download/
- Navigate to the project root where package.json is and run
npm install
in a terminal, command prompt or preferably Git Bash.
npm start
- Open
http://localhost:8080
in one or more browser tabs - Visit https://labs.phaser.io/ for game ideas
- Client side code (everything in the src folder) is auto loaded. To restart the server, push
Ctrl + C
- Installing, 'npm i webpack -g' and 'npm i webpack-cli -g'
npm run build
(requires unix like terminal)
- Start server for production
pm2 start server.js
- Suggest to make an autostart in pm2
Provided by Y8 Games. See other io games. Also see the upload page to submit games.