// the find
lance-gg/lance
Multiplayer game server based on Node.JS
Lance is a Node.js framework for building multiplayer games that handles the netcode layer — binary serialization, client-side prediction, interpolation/extrapolation, and physics engine integration. It targets browser-based games and ships both a server engine and a client-side sync library so you write game logic once and Lance figures out how to keep clients in agreement. Last meaningful activity was May 2024 and the project looks effectively dormant.
The sync strategy abstraction is the real value here: you choose between extrapolation (client-side prediction with re-enactment) or interpolation per game type, and the framework wires it up. That's a genuinely hard problem handled at the framework level. Binary serialization via NetScheme keeps payloads small — you define a schema and Lance packs/unpacks it, no JSON on the wire. Physics is pluggable: Cannon.js, p2.js, or their own SimplePhysics with HSHG spatial hashing for collision. Documentation is unusually thorough for a project this size — there are dedicated guide articles for each subsystem including a tuning and debugging guide.
UDP via WebRTC has been 'in the pipeline' since at least 2017 and never shipped — you're WebSocket-only, which means TCP head-of-line blocking, a real problem for fast-paced games. The project is effectively unmaintained; the README points people to Stack Overflow for help, a tag with almost no activity. There's no horizontal scaling story — single server process, no built-in lobby or room partitioning, so you hit a wall as soon as a game needs more than one Node instance. The test suite is thin: one end-to-end multiplayer test and a handful of serializer unit tests, which makes refactoring or upgrading dependencies feel risky.