Dev.to WebDev 🛠 Dev 👁 0 📖 2 min read

I built POLYVERSE .IO v3.1: a free 3D browser mega-hub with a Three.js plaza, three game modes, and instant offline-bot fallback

I wanted a tiny 3D social plaza you can open in any browser — desktop or phone, no install — and walk into a short match with friends (or bots, if the live room is empty). The public build is here: https://polyverse-io.

I wanted a tiny 3D social plaza you can open in any browser — desktop or phone, no install — and walk into a short match with friends (or bots, if the live room is empty).

The public build is here: https://polyverse-io.mizuboffi.workers.dev/

A private room link looks like this (share it with a friend): https://polyverse-io.mizuboffi.workers.dev/?room=AMIGOS

What's playable

The plaza is a cyber diorama built in Three.js (procedural canvas textures, bloom, low-poly avatars, three cameras on C: diorama / chase / orbit). From there you walk into three free modes:

  • Battle Arena — short PvP with dash, power-ups and killstreaks (3 minutes or 15 knocks).
  • Blitz 90s — 90 seconds of orbs, combos and lasers.
  • Boss Survival — co-op against three waves and the Prism Colossus, with telegraphed attacks and teammate revives.

If the live socket isn't reachable, the client fails over to offline bots instead of hanging on a connecting screen (about 1.5 s when the connection is refused; the same-origin handshake can wait up to 12 s so a cold Durable Object can finish booting).

The live UI is currently pt-BR. Controls: WASD to move, mouse + click to shoot, Space to dash, C for camera, 1–4 for portals. On a phone: left stick + shoot/dash/camera buttons.

A product decision that became a technical one

I didn't want the “connecting…” dead screen on a cold Worker or a flaky network. The simulation is shared and deterministic (shared/): the authoritative server ticks at 30 Hz with 15 Hz snapshots when the WebSocket is up, and the same logic drives the offline-bot client when it isn't.

Production is a Cloudflare Worker + Durable Object (static assets + the game room). The protocol is a small JSON set (hello, queue, input, hubpos, …) with basic caps: payload ≤ 4 KB, per-IP connection limit, 60 messages/s, 40 inputs/s, chat rate-limit. Fonts and the visual kit are hosted locally — no CDN on the critical path.

What I'd love feedback on

  1. Do the first 15 seconds teach the cameras and the portals without a wall of tutorial text?
  2. On a phone (~390 px wide), does the HUD collide with the thumb cluster?
  3. Does the offline-bot fallback feel honest, or would you rather see a hard “can't connect” error?

Happy to talk through the Three.js setup or the Durable Object room model in the comments. Thanks for playing.

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.