← Latest papers
🤖 AI

MAGIC: Transition-Aware Generation of Navigable Multi-Scene Game Worlds with Large Language Models

The paper presents MAGIC, a four-stage prompt-to-project system that leverages large language models to automatically generate navigable, consistent multi-scene game worlds with functional transitions, addressing key challenges in cross-scene consistency, in-scene navigability, and transition validation through a novel pipeline and evaluation agent.

Original authors: Tsz Hei Fan, Choi Wing Fung, Yuxuan Wan, Shuqing Li, Michael R. Lyu

Published 2026-07-14
📖 6 min read🧠 Deep dive

Original authors: Tsz Hei Fan, Choi Wing Fung, Yuxuan Wan, Shuqing Li, Michael R. Lyu

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you're trying to build a massive, interconnected video game world where you can walk from a cozy bedroom, through a door, and instantly find yourself in a spooky dungeon. For human game designers, this is a nightmare of paperwork. They have to manually draw maps, ensure the door on the left side of the bedroom matches the door on the right side of the dungeon, and double-check that no giant bookshelf has been placed in front of the door, blocking the player's path. It's like trying to build a house of cards where every card has to be perfectly aligned with the one above and below it, or the whole thing collapses.

Enter MAGIC, a new system that acts like a super-organized, hyper-logical architect. Instead of just building one room at a time and hoping they fit together later, MAGIC plans the entire journey before it even lays a single brick.

The Problem with "One Room at a Time"

Previous AI tools were great at designing a single, beautiful room. But if you asked them to build a whole world by just repeating the process, it would fail miserably. Imagine asking a painter to paint a hallway by painting one wall, then walking to the next wall and painting it without ever looking at the first one. The doors wouldn't line up, the floors would be different heights, and the result would be a confusing mess.

The paper identifies three specific reasons why this "one room at a time" approach fails:

  1. The "Lost Connection" Problem: The AI forgets that a door in Room A needs to lead to Room B. It might invent a door that leads nowhere or a door that doesn't match the one on the other side.
  2. The "Furniture Blockage" Problem: The AI might put a giant sofa right in front of the door. The door exists, but you can't walk through it.
  3. The "Did It Work?" Problem: No one checks if the door actually opens. Previous tools just looked at how pretty the room was, never testing if you could actually walk through the game.

How MAGIC Fixes It: The Four-Stage Pipeline

MAGIC solves this by treating the game world like a train system with a master schedule, rather than a collection of isolated stops.

Stage 1: The Master Planner
First, MAGIC takes your simple text idea (like "a house with a secret basement") and acts as a strict project manager. It doesn't just write a description; it draws a transition graph. Think of this as a subway map. It decides exactly which rooms exist, where the doors (portals) are, and what kind of "magic effect" happens when you walk through them (like a fade-out or a wipe). It creates a shared blueprint that every future step must follow, ensuring no room gets lost.

Stage 2: The Blueprint Checker
Next, it designs the furniture for each room. But here's the trick: before it finalizes the design, it runs a flood-fill test. Imagine pouring virtual water into the room. If the water can reach every corner and every door, the room is "navigable." If the water gets stuck behind a virtual sofa, MAGIC knows the design is broken. It then rearranges the furniture until the "water" can flow freely to every exit. This ensures you won't get stuck in a room with a blocked door.

Stage 3: The Builder
Once the blueprints are perfect and the doors are reachable, MAGIC builds the actual 3D models and writes the computer code (scripts) that tells the game engine, "When the player touches this door, load the next scene." It's like assembling the LEGO set according to the instructions, making sure the pieces snap together correctly.

Stage 4: The Stitcher
Finally, it takes all the separate room files and stitches them into one single, playable game project.

The "Play-Tester" Robot

The most exciting part is how MAGIC checks its own work. The authors built a special evaluation agent—basically a robot player that runs inside the finished game. This robot doesn't just look at pictures; it actually plays the game. It spawns in the starting room, walks to every door, tries to open it, and sees if it successfully teleports to the next room. It even takes photos of the doors to make sure they look like what was requested.

What the Numbers Say

The authors tested this system on 100 different multi-scene game cases, ranging from simple loops to complex branching paths. The results were impressive:

  • Success Rate: MAGIC produced a working, playable game project for every single one of the 100 cases.
  • Accuracy: When checking if the transitions worked correctly, MAGIC achieved a 0.99 precision (meaning almost every transition it made was correct), 0.95 recall (meaning it found almost all the required transitions), and a 0.96 F1 score (a balanced measure of both).
  • Comparison: Compared to other methods (like a standard AI baseline or a tool called Holodeck), MAGIC was far better at keeping the rooms connected and preventing blocked paths. For instance, while other methods often missed doors or created blocked paths, MAGIC's "flood-fill" check ensured 0.9952 connectivity, meaning the robot could reach almost every walkable spot in the game.

What MAGIC Can't Do Yet

It's important to know where MAGIC stops. The paper explicitly states that this system currently only works for indoor scenes (like houses and offices) and only within the Unity game engine. It also only understands English text prompts and currently supports just two types of transition effects: "FadeInOut" and "IrisWipe."

If you ask it to build a giant outdoor forest or a spaceship, it can't do it yet. Also, if the system runs out of tries to fix a blocked door, it will give you the "best effort" layout, which might still have a tiny blockage, though this happened very rarely in their tests.

The Bottom Line

MAGIC isn't just a tool that draws pretty pictures; it's a system that understands the logic of moving between spaces. By planning the connections first, checking if you can actually walk through the doors, and then building the game, it turns a single sentence of text into a fully navigable, multi-room adventure. While it's not a magic wand that solves every game design problem (yet), it proves that we can finally automate the tricky, laborious job of connecting game worlds without breaking them.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →