Install dependencies:
npm install
Start a watcher:
npm run dev
Start the server
npm start
Open http://localhost:8080
in flux
The client may send any of the following events:
join
with an optional{ name: '<name-of-player>'}
payloadinputState
with a{ <action>: <true|false>, ... }
payloadleave
The server must periodically broadcast a state
event with the following payload:
{
ships: [
{ x: <float>, y: <float>, rotation: <radians>, name: <string>, ... },
...
]
}