Everything a multiplayer browser game needs before it's fun, in one script
Every multiplayer browser game I made needed the same things before anyone could actually play it with friends: a lobby, invite links, a way to pass messages between players, reconnect handling, and some kind of identity
Every multiplayer browser game I made needed the same things before anyone could actually play it with friends: a lobby, invite links, a way to pass messages between players, reconnect handling, and some kind of identity. None of that is the game. All of it takes weeks.
So I pulled all of it into a platform, HopLobby, and opened it up to other developers at developers.hoplobby.com.
How it works
Your game runs on your own host, inside a frame on hoplobby.com. One script, hoplobby.js, connects it to the page and gives you:
- Who is in the lobby and who is hosting
- A JSON relay to send messages to everyone or to one player
- A shared clock so every client agrees on time
- Late-join state handoff so people can drop in mid-match
- Player avatars, as portraits or rigged glTF models
Players get invite links and codes, accounts and cosmetics from HopLobby, so your game starts with players already in a room.
Testing without a server
There is a local simulator for testing 2 to 8 players in one browser tab:
npx hoplobby-dev
Dev Mode goes a step further: it loads your localhost build into a real HopLobby lobby, so you can play it with friends before anyone reviews it.
Trust
The browser host is not trusted. Anything that matters, like scores or saves, should be verified on your own server using signed player tokens. Games are reviewed before they are listed.
What's running on it
The player side at hoplobby.com has 16 games so far, including a kart racer for 12, a 24-player battle royale and a party board game, plus 35 classic card games.
If you build browser games, the docs are at developers.hoplobby.com. Happy to answer questions about the relay design or host migration in the comments.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.