Multi-player Online feature (part 1— creating Websocket connection)

This is what we want to accomplish
On the server side, this is the codes we want to execute
On the client side, render a sprite based on what we get back from the server, instead of hard coding
In the game.js file, create a config object and pass it onto a new Phaser.Game instance
The boilerplate for a scene in Phaser game
A 128x192 pixels spritesheet
A background png image I am using
What we have so far
Inside of our package.json file
The files and folders so far
Inside of our server.js file
Line 33 will listen for a disconnection, and console log a msg
Our server running on localhost: 9090
On the bottom of the Output pane, a msg is displayed whenever a disconnection occurs

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store