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.
Top comments (2)
「ゲームそのものではない部分に数週間かかる」という出発点に、とても共感しました。ロビーや招待リンク、再接続、共有時計までを1つのスクリプトにまとめている点が、導入のハードルを大きく下げていると思います。
特に、途中参加の状態引き継ぎとホスト移行を最初から設計に入れている点が印象的でした。マルチプレイでは接続が切れたときの体験がそのまま評価につながるので、このあたりを後付けにしない判断は大切だと感じます。
ひとつ気になったのは、ホスト移行の際に進行中のゲーム状態をどのように引き継ぐかです。共有時計と状態引き継ぎの組み合わせで、移行直後のズレをどう吸収しているのか、機会があれば詳しく知りたいです。
"None of that is the game" is so true. When I added online rooms to turn-based board games, reconnect handling took longer than the whole lobby. What worked for me was tying the seat to the device, so reopening the link on the same phone puts you straight back, and letting the host hand a dropped player's seat to someone else. How do you handle the host leaving mid-match? Does the relay pick a new host automatically?