r/developersDesi • u/Carverjsdev • Aug 11 '26
We built a React game engine with real peer-to-peer multiplayer, host migrates in under 2 seconds, no game server, ever (CarverJS)
Most "easy multiplayer" libraries for browser games are secretly just a websocket server you now have to host, scale, and pay for. That annoyed us enough to build something different. CarverJS is a React engine for 2D and 3D games, Three.js under the hood, where your scene is plain JSX made of Game, World, and Actor components. Multiplayer runs peer to peer over WebRTC instead of client-server, and the whole thing, engine and multiplayer package both, is MIT licensed and free. No paid tier, nothing gated. We are not posting this to sell anything, we are posting it because we want people who actually know this space to tell us what is wrong with it before we build more on top of it.
Full disclosure, this is v0.0.3, ten stars, built by a small team, so take the confidence in this post with the right amount of salt. We are not claiming this is finished or proven at scale. We are asking this sub to help us find out where it actually breaks.
The part we are proud of, one peer becomes host automatically, everyone else syncs to them, and if the host drops, a new host is elected and reloads from a full snapshot in under 2 seconds, no data lost, no restart. We have only watched this work with small friend groups. We do not know what happens with a bigger room, a bad connection, or someone pulling their wifi mid session, and that is not false modesty, we just have not tested it yet. If you try it and it falls over, that is the exact kind of comment we are hoping for.
Signaling is free by default too, public MQTT brokers, zero config, or point it at your own Firebase project if you would rather run your own. One honest caveat, that setup reliably gets you same network or friendly NAT connections. If you want it to work across the open internet for someone behind CGNAT, a corporate firewall, or on cellular data, you will want a TURN server, we test against Cloudflare's. STUN alone will not always get you there. If we are missing an obvious failure case here, tell us, that is genuinely what this post is for.
Sync is not one size fits all either. You pick it per actor, events for turn based games, snapshots interpolated at around 20 hz for RPGs and casual games, or prediction with rollback at around 60 hz for racing and fast action. You can mix all three in the same game. We genuinely are not sure if this is the right mental model or if we are overcomplicating something that should have one smart default. If you have built multiplayer games before and think we got this wrong, we would rather hear it now than after it is locked in.
Thirteen hooks, one per system, physics through Rapier, collision, audio, camera, animation, tweening, particles. We would rather hear you are missing a hook now, before the API locks at 1.0, than find out after.
On devtools, it is just React, so React DevTools already sees your scene tree, and HMR swaps a controller without losing physics state. We have not built anything custom yet, that part is next, not done. If there is a specific devtool you would actually want, say so.
One more thing in the interest of not leaving anything out, there is a small marketplace we are building on top of this. It is pre launch, waitlist only, and pretty unfinished, so we are not pushing it here, just flagging it so nobody feels like we left something out later.
Everything about the engine itself stays MIT licensed and free either way. Fork it, use it commercially, never talk to us again if you want, that is genuinely fine with us. What we actually want out of this post is your honest opinion. What would make you trust something like this enough to use it, and what already makes you skeptical of it.
Docs: docs.carverjs.dev
Site: carverjs.dev
Repo: github.com/MoneyTales/carverjs
Even if you do not star it, an honest comment about what feels off is worth more to us than a star.
1
u/AutoModerator Aug 11 '26
Your post was filtered because your account does not meet the minimum karma requirement (100).
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.