Incheon is a general purpose low latency game server based on Node.JS and Socket.IO
Still in early development. Check back with us soon :P
Features:
- Somewhat opinionated, letting you quickly develop your game without much hassle
- Server to client communication:
- Communication is all binary
- A game engine can opt-in to which object properties are transported
- Intelligent sync strategies for lag handling:
- Client side prediction for player-controlled objects (snap, gradual snap)
- Update interpolation for non-player objects
- Provides API for dynamic game-world objects
- game worlds with physics engines (currently only physijs)
- game worlds with reduced-physics, which track position, velocity, orientation, momentum (linear and angular).
Things to do:
- Allow general messages (not just world updates)
- Input validation (check player can control ship)
- Implement more types of lag compensation
- Optimize what goes over the wire:
- Only dirty items get sent, with periodic sync
- Option to specify incremental updates
- client to server should also be binary
- Implement more tests
-
- Recording and replaying sessions
Caveats:
- Due to websocket limitations, only TCP and no UDP :(
Architecture
The Step Sequence
The fundamental sequence of each (client-side) step is organized as follows:
- [clientEngine] process inputs
- [clientEngine] handle all inbound messages
- [clientEngine] handle outbound inputs
- [clientEngine:gameEngine] stepCount++
- [clientEngine:gameEngine] physicsEngine.step
- [clientEngine:gameEngine] updateGameWorld: for each object->step
- [clientEngine] render.draw
Event List
- preStep
- postStep
- objectAdded
- server.playerJoined
- server.playerDisconnected
- server.inputReceived
- client.preStep
- client.postStep