finds.dev

rameshvarun/netplayjs

Make P2P multiplayer browser games, no server hosting or synchronization code required. Powered by rollback netcode + WebRTC.

View on GitHubHomepage ↗

★ 567TypeScriptISCupdated Oct 2024

// the take

NetplayJS is a TypeScript framework for building P2P browser games using WebRTC and rollback or lockstep netcode. You structure your game as a class with tick/draw/serialize methods, and the framework handles matchmaking, connection establishment, and state synchronization. Aimed at indie game developers who want networked multiplayer without spinning up dedicated game servers.

The rollback netcode implementation is the real draw — it's the same technique used in fighting games like Street Fighter, and having it as a drop-in wrapper for browser games is genuinely rare. The LocalWrapper for testing both players in one browser tab is a smart DX decision that makes iteration fast. Not requiring determinism (the host broadcasts authoritative state) is pragmatic for JavaScript where float determinism is a mess. The autoserializer handles simple game states without any boilerplate, which lowers the barrier to trying it.

Last commit was October 2024 and several core modules are still marked WIP — netplayjs-netcode and netplayjs-connection aren't finished, meaning you're depending on code the author hasn't committed to stabilizing. The public matchmaking server is a single point of failure you don't control; if it goes down, your game's matchmaking breaks entirely, and the docs don't explain how to run your own with any detail. Serialization is JSON-based, which means deeply nested or typed state (class instances, Sets, Maps) won't round-trip correctly through the autoserializer — you'll discover this the hard way mid-project. The framework constrains you to a fixed canvas and timestep model, which makes integrating with engines like Phaser or Pixi non-trivial.

We read the README, the directory tree and a key source file in June 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
567
Forks
46
Language
TypeScript
License
ISC
Last commit
10 Oct 2024

// nearby

If netplayjs isn't quite it.

All repos →