Install everything (including /public folder).
npm install
Run for live deployment of server and client. Client files are packed into the /public folder.
npm run build:live
Build server and client.
npm run build
Start server (server hosts /public folder).
npm start
- devDependencies # typescript dependencies
- public # public available files
- src
- client # client related logic
- engine # basic game engine shared among server and client
- game # actual game
- server # server logic
Server-side code is located in src/server/.
The ServerNetworkController synchronizes server side world changes to the client. Changes are detected using a world listener and distributed after a defined interval. Changes are not sent directly after they happend but rather cached to not overload the network and client with messages.
Colors from http://clrs.cc/.
Network communication:
- [done] client connects to server
- [done] server sends basic sprite
- [done] client renders sprite
Framework:
- logic is separated into
- World (Data)
- Network (Synchronization)
- Server & Client
ToDos:
- [done] add functionality to filter roles by class (use instanceof)
- add Phaser role that is called when added to node