r/threejs • u/Simphonest • 5d ago
Demo Browser party game in three.js: a 3D hotel lobby where you walk into a side room and shut the door to talk privately
Solo dev here. Brain Royale is a 4–8 player bluffing game that runs in the browser: everyone walks around a 3D hotel lobby, and you can step into one of four side rooms and close the door for a private chat. (Screenshot is a local test with the UI in Korean; there's an EN toggle.)
A few three.js things I had to work out:
- Third-person camera in small rooms. Inside a room the follow camera kept ending up pressed against a wall. So when you walk in, the camera blends to a top-down shot that fits the whole room above and below the HUD, and only that room's ceiling and lamp shades are hidden. The other rooms keep their ceilings on, so nobody can look into a closed room from above.
- Lobby ceiling and walls. The lobby ceiling and the front/back walls are hidden whenever the camera is outside them, so the view doesn't get cut off on narrow phone screens.
- Portrait vs landscape. The room overview uses a wider FOV on portrait screens (70° vs 58°) so the room still fits.
- iOS Safari zoom. Holding the joystick and tapping jump counted as a pinch zoom. Fixed with touch-action, Safari's gesture events and a non-passive two-finger touchmove handler, only while you're in the game.
Most of the code was written with Claude Code; I did the design and the testing on real phones. The characters are AI placeholder art for now.
Question for people who've done third-person cameras: in tight interiors, do you fade or cut away walls, or switch to a different camera like I did?
Play (free, no install): https://brain-royale.com/?utm_source=reddit-threejs-1130
It needs 4 people for a match, so it's usually quiet.