Game AI
MAGIC solved the three problems that kept AI from building real game worlds
MAGIC is a four-stage pipeline that converts a single prompt into a playable Unity project with multiple connected scenes. It enforces portal reachability with a flood-fill validator and introduces an evaluation agent that actually walks through each transition, decades of metrics that only looked at single interiors.
Emmanuel Fabrice Omgbwa Yasse AI-assisted
2026-07-30 · 5 min read

Multi-scene navigation, clearing an objective in one room, crossing a portal into the next, is the backbone of dungeon crawlers, escape rooms, and RPGs. But authoring these connected spaces by hand is one of the most labor-intensive parts of 3D game production. Portal endpoints must match on both sides, furniture must not block doorways, and every transition script must reference the correct destination scene across dozens of files. This is exactly the kind of drudgery that AI prototyping tools like vibe coding promise to automate, but until now, the spatial reasoning required has been a wall too high for language models to climb.
The three missing pieces
Recent LLM-driven systems such as Holodeck and Scenethesis have made single-interior generation dramatically cheaper, but they produce one scene at a time. Naively repeating them for multiple scenes reveals three obstacles that no previous method solved.
Consistency. A transition is a joint object: a portal is valid only if it exists on both sides with a matching type and effect. Under stateless single-scene prompting, an LLM tends to drop or hallucinate cross-scene references as context grows. The verification horizon for these coding agents grows with each additional scene, making it harder to tell if the model is still on track.
Navigability. Even if portals are named correctly on both sides, a couch or table may block the doorway once furniture is placed. No single-scene metric ever checked for this.
Evaluation. Existing text-to-3D metrics measure visual fidelity or prompt alignment for one interior. They never execute a transition, so a mislinked portal or broken script is invisible to them. The researchers had to build a dedicated evaluation agent that actually walks through each portal in play, similar to how Cognition's methods measure real engineering hours rather than surface-level outputs.
How MAGIC works
The system, whose name stands for Multi‑scene Automated Game worlds generator with Intelligent Connectivity, is a four-stage pipeline. The planning stage uses an LLM to parse a single prompt into per-scene descriptions and a shared transition-aware intermediate representation, a graph where scenes are nodes and portals are edges labeled with effects like FadeInOut or IrisWipe. A verification loop ensures every required portal appears in the descriptions.
The scene specification stage expands each scene with object placements, then runs a flood-fill algorithm on a 2D occupancy grid to reject layouts where any portal is physically blocked. If furniture blocks a doorway, the placement module regenerates until the connectivity score hits 1.0 or the maximum retry limit is reached.
In the scene generation stage, meshes are assembled and LevelLoader transition scripts are bound to portal colliders. The combination stage stitches the per-scene Unity projects into a single executable file where scenes reference each other via the emitted scripts.
A benchmark that goes beyond visuals
Because no existing metric verifies multi-scene transitions, the team constructed a benchmark of 100 test cases drawn from the MIT Indoor 67 and MMIS datasets, covering scene graphs with one to five scenes, looping and branching patterns, and mixed portal types including doors, windows, and directory boards. Each case provides ground-truth portals, reachability status, and target transition effects.
They also built a transition-focused evaluation agent that operates directly on the packaged Unity project. The agent extracts portal candidates, executes each transition in play, navigates to each portal from the spawn point, and uses an MLLM judge to assess portal appearance against the ground truth. In tests against human judgment, the agent achieved a mean absolute difference of only 0.03, meaning its scores for precision, recall, F1, approach rate, and portal match rate were within 3% of what a human evaluator would report. This kind of rigorous, ground-truth-based evaluation is exactly what Ai2's olmo-eval advocates for: per-checkpoint diffs that reveal real progress, not just benchmark gaming.
By the numbers
Stage by stage, MAGIC recovered 96.72% of ground-truth scene requirements (vs. 92.39% for a plain LLM baseline) and 97.11% of transition graph edges (vs. 90.89%). In scene specification, its recall, the fraction of required portals actually generated, reached 94.87%, substantially higher than Holodeck's 60.26%. Connectivity, the measure of whether every walkable cell can reach every portal, stood at 0.9952 versus 0.8545 for Holodeck, while occupancy, a proxy for scene density, was a balanced 28%, not too sparse, not too crowded.
End to end, the pipeline produced executable Unity projects for all 100 test cases. Every project generated by the LLM baseline failed to run. MAGIC's precision on transition identification was 0.987, recall 0.948, and F1 0.964. The approach rate, the fraction of portals actually reachable from the player's starting position, was 94.86%. The lower portal match rate of 78.85% reflects the strictness of the MLLM judge: a plain board was generated as the closest mesh for a "directory board," but the judge required visual evidence of directory function.
What this means for game development
The results suggest that structured intermediate representations combined with physics-aware validation can compensate for the spatial blind spots inherent in LLMs. Abstract reasoning and mathematical planning, the flood-fill algorithm, the occupancy grid, the verification loops, are the engineering layer that turns a language model's fuzzy understanding into a working game project. The finding mirrors a broader truth visible across the AI landscape: Claude on the factory floor or Cursor's enterprise coding agents both succeed because they add rigorous validation layers on top of base model capability.
MAGIC currently targets indoor scenes and the Unity engine, supports only two transition effects, and accepts English text prompts exclusively. The mesh dataset limits portal appearance: when the closest available mesh lacks the semantic cue a portal name implies, the visual match fails even though the transition works correctly. The researchers note that performance did not degrade over the tested range of one to five scenes, but stop short of claiming scalability beyond that.
The full code is available on GitHub. For game designers, the implication is clear: the AI pipeline that can take a single sentence and output a multi-room playable world has crossed the line from academic curiosity to usable tool. The remaining gaps, richer mesh libraries, more transition types, support for outdoor spaces, are engineering time, not research breakthroughs.
Get the tech essentials in 3 minutes every morning
One email, every weekday, with what actually matters in AI and tech.