The Story of Brick

Inspiration

We noticed a gap in the Roblox ecosystem. Roblox has over 70 million daily active users and one of the largest creator economies on the internet, but building even a simple game on the platform remains hard. Creators need to learn Luau, internalize Roblox's extensive API surface, manually place every part and model in 3D space, and write hundreds of lines of interconnected code. Younger creators get hit the hardest. Many of them have ambitious ideas and zero programming background. We wanted to close the distance between having an idea and having a playable game. So we asked ourselves: what if describing a game in plain English were enough to produce one?

What it does

Brick Studio is a desktop application where you type a natural language prompt, something like "Create a tycoon game where players build a pizza restaurant," and the system generates a complete, publish-ready Roblox game file. We did not build a code snippet generator or a template filler. We built a system that designs the game architecture, constructs 3D environments with hundreds of parts, writes all Luau scripts for game logic, builds user interfaces, validates everything for correctness and security, and exports a .rbxlx file ready to open in Roblox Studio. We included eight genre templates (Tycoon, Obby, Simulator, Shooter, RPG, Racing, Horror, and Social) and we made sure fully custom descriptions work too.

How we built it

We structured the application in three layers. For the frontend, we built an Electron app using React and Zustand, featuring a chat interface, a real-time build visualization panel, and a Monaco code editor with Luau syntax highlighting. For the backend, we wrote a TypeScript and Node.js server implementing the Model Context Protocol. Inside this server, we created the core generation engine: a multi-agent system with an Orchestrator agent coordinating eight specialists (Planner, Scripter, Builder, UI, Physics, Validator, Optimizer, and Clarification) through a recursive Agent Loop we built for this project. We integrated Google Gemini 3 Pro at the center of everything, driving generation through function calling across 135 tools we purpose-built for the project. These tools span instance creation, spatial positioning, collision detection, script generation, GUI construction, lighting, effects, and validation. A typical build runs up to 220 tool call iterations with thinking mode set to high for complex architectural reasoning. We made one design choice early on that shaped the entire project. We structured generation around function calling rather than single-pass output. We do not ask Gemini to produce raw XML or monolithic code. Instead, we give the model a composable toolset and let our agent loop build iteratively: plan first, construct the 3D world, write scripts referencing the structures already created, polish with lighting and effects, then validate and self-correct. We modeled this after how a human developer works. The results are dramatically more coherent than any single-shot approach we tested.

Challenges we ran into

We had to coordinate 135 tools across up to 220 iterations per build, which required careful conversation history management. Our early versions suffered from context loss and function response ID mismatches. We needed to generate valid .rbxlx XML with precision across every property type (Vector3, CFrame, UDim2, BrickColor, enums, NumberSequence, ColorSequence) because a single malformed value breaks the entire file. We also had to produce over a thousand lines of Luau across eight or more scripts, all correctly cross-referencing one another. To solve this, we built coherence-checking and self-critique systems into the validation phase. Streaming the entire build process to the user in real time, with script typewriter animations, file tree updates, and progress tracking, required a carefully designed IPC event architecture between Electron's main and renderer processes.

Accomplishments that we're proud of

We built a system where a single English sentence produces a fully functional Roblox game with 3D environments, working game logic, user interfaces, and polished effects. The 135-tool function calling architecture runs reliably across up to 220 iterations per build. Our multi-agent system uses an Orchestrator to coordinate eight specialist agents that plan, build, script, polish, and validate without human intervention. The real-time build panel streams every step to the user, showing scripts being written line by line with typewriter animation. And the exported .rbxlx files open cleanly in Roblox Studio, ready to publish.

What we learned

The biggest takeaway: tool design matters more than prompt engineering. When we gave Gemini well-structured tools with clear schemas, the model consistently produced better output than when we wrote elaborate system prompts. Our 135-tool approach lets the model reason in terms of discrete actions rather than unstructured text. This aligns with how Gemini 3 Pro's function calling is designed to work. We also learned self-correction loops are non-negotiable for production-quality generation. The validate, critique, and fix cycle we built catches issues single-pass generation misses every time.

What's next for Brick Studio

We want to add binary .rbxl export for faster file loading, direct publishing through the Roblox Open Cloud API, asset marketplace integration for richer game content, multiplayer testing within the app, and support for user-created templates. We started Brick Studio as an experiment in what Gemini's function calling achieves at scale. The project has grown into something we believe will lower the barrier to game creation for millions of people.

Built With

Share this project:

Updates