Case study · Haunted Mansion
A co-op horror game on Roblox
Haunted Mansion Escape is a complete co-op horror game for friends to play together on Roblox. I built it on my own in Roblox Lua, a language that was new to me, with agentic, AI-driven development.
- Client
- Own product
- Role
- Sole developer
- Year
- 2026
- Platform
- Roblox, desktop and mobile
8players per co-op round
3floors in every generated mansion
30 FPStarget on phones
How it plays
Up to 8 players spawn into a freshly generated mansion and try to find the way out together. Ghosts drift through the halls, a monster hunts the players, and the butler, lantern in hand, leads the group. Anyone who strays too far from him starts a death timer, and the game keeps trying to split the group up. It's made for kids around 10 to 14, so it's spooky, not gory. You can play it on Roblox.
Scores go onto a results screen and a leaderboard: 100 points for each teammate who survives, 500 for escaping and up to 200 bonus points for a fast escape.
How it's built
- Server, client and shared code. Server services run the rounds, the lobby, the mansion lifecycle, player proximity, player data, results and security.
- A procedural mansion generator that lays out rooms over three floors, places furniture and validates that the generated layout can be walked through.
- NPCs with their own movement and pathfinding for the ghosts, the monster and the butler.
- AI-made 3D characters. The butler, the ghost and the monster were generated in Tripo, optimized in Blender, rigged with AI and uploaded to Roblox.
- Persistent player data with ProfileService, and leaderboards.
- Security controls such as rate limiting of client calls and anti-exploit protection.
- A normal editor workflow. Code is synced into Roblox Studio with Rojo, and an in-game debug overlay shows round state, timers, proximity, NPC pathfinding and performance.
Performance budget
The game has to run well on phones, so it stays within 30 FPS on mobile, under 500 parts per mansion and 10,000 in the whole world, under 500 MB of memory, and under 50 KB/s of network traffic per player.
Outcome
A complete, published multiplayer game in a language I hadn't used before, built by one engineer directing AI agents. The source is on GitHub under the MIT licence.
Screens
Haunted Mansion in use