Ratubo — multiplayer 3D arena in Three.js (guess which pipe the rat runs to)

Hey everyone! Sharing Ratubo, a browser-based real-time multiplayer game I built with Three.js. It’s a fast, round-based “guess the pipe” arena: a ring of numbered pipes surrounds a central box, a rat darts out into one of them each round, and everyone in the room plays the same round at the same time. You stake in-game credits on a pipe and win a multiplier if the rat picks yours.

:video_game: Live demo (free, play-money only — it’s a pure demo, no real payments and no real data): https://demo.ratubo.com.br

Play Video Preview here

What’s inside:

  • Rendering: Three.js r128 on a single WebGL2 canvas. The whole arena — ring of pipes, central box, the rat, and the 3D result text — is one real-time scene with stylized lighting, radial “spotlight” rays and soft shadows.
  • Camera: a scripted cinematic camera that stays wide during the pick phase and then eases/zooms in to follow the rat as it chooses a pipe. No external tween or physics libraries — all hand-rolled.
  • Dynamic board: the number of pipes is configurable per room (up to 30), generated procedurally to fit the ring, so the same scene scales from a few pipes to a full circle (and the pipe count sets the payout multiplier).
  • Real-time multiplayer: synchronized rounds and countdown across everyone in a room, room chat, public/private rooms with optional password, and a ranking screen. The outcome is drawn server-side; the client just renders it.
  • Audio: everything synthesized/played through the Web Audio API.
  • Lightweight: tiny bundle, loads in a couple of requests, runs on desktop and mobile.

It started as a “what’s the simplest multiplayer loop I can render nicely in 3D” experiment and grew from there — the procedural ring layout and the camera state machine were the most fun parts.

For those who wish to host the project themselves and have some fun, I can also provide the standalone binary for the game. It is developed entirely in Go (Golang). You simply need to specify the path to your PostgreSQL database and its URL.

Disclaimer: This is a demonstration project, originally developed for study purposes. No real monetary value is involved, and no data is captured.

Feedback, critique and bug reports very welcome!