≈ the.bay.news

I built a turn-based multiplayer browser game with plain JS, Node and HTTP polling (no WebSockets). Help me load-test it?

programming.dev
I built a turn-based multiplayer browser game with plain JS, Node and HTTP polling (no WebSockets). Help me load-test it?
Disclosure: I’m the solo developer of Bronze & Glory, a free turn-based gladiator duel game in the browser. No ads, no download, no payments. Your browser does not support playing HTML5 video. You can download a copy of the video file [https://on200.com/pictrs/image/31a3f476-2cf3-4b35-b355-88341341a0c4.webm] instead. Here is a description of the content: 12 seconds of a real campaign bout Stack: a static client in plain JavaScript ES modules, served by nginx. The game server is Node with SQLite. A separate small Node service counts players online from page heartbeats. How the multiplayer sync works: there are no WebSockets. A duel is a server-side room; each client polls the room over HTTP and submits its move. The server runs the same rules engine module as the client (takeDuelTurn), so a client can’t fake a result. Because it is turn-based, polling latency is hidden in the turn animation. Per-user rate limits (e.g. 60 moves/min per user) keep a misbehaving tab from flooding the server. The empty-queue problem: a small game’s online queue is empty most of the time. If nobody else is searching after a few seconds, a clearly labelled Practice Bot takes the seat (the server can also seat a ghost after 8 s). It is never counted as a player. What I’d love feedback on: is HTTP polling a mistake at this scale, and where would you move to WebSockets/SSE? Help me load-test the live server. Join now; group match at 01:20 UTC (30 minutes after posting). Can we get 4+ into one arena? Open the link, go to online duels (a free account: pick a username and password) and search for a quick match: you get paired with whoever else is searching. Play: https://bronzeandglory.fun/?ref=r34-webdev-pd [https://bronzeandglory.fun/?ref=r34-webdev-pd]

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.