Make a Metroidvania With AI: Plan the Map Before Rooms
A metroidvania is a side-on exploration game with one big connected map, where each new ability opens doors you passed earlier. Plan the map as a list of rooms, doors and the ability each door needs, and have your AI walk every route before it builds a single room.
What makes this genre different?
The whole game is one large puzzle made of a map. Every door is a lock, every ability is a key, and the player chooses the order. Nobody can hold all of that in their head, and your AI cannot either, because it only sees the part of the project it happens to be looking at.
Picture a cable-repair diver exploring a sunken town. Heavy boots let her walk the deep streets. A magnet pulls rusted gates open. A sonar shows hidden rooms. If the magnet lies behind a gate that only the magnet opens, the game can never be finished. It looks fine on every screen, and it is broken.
The nastier version is a trap only some players find. She drops down a one-way shaft before she has the boots, and there is no way back up. The game keeps running, but that save is dead.
Can you fit the idea into six rooms?
Six rooms, one ability, one door, and one shortcut home. Write it as a table first:
| Room | To enter you need | What you find |
|---|---|---|
| Quay | Nothing | Start and a save point |
| Fish market | Nothing | Heavy boots |
| Old bank | Nothing | A drop back down to the quay |
| Deep street | Boots | A broken cable |
| Pump house | Boots | A lever that opens a shortcut |
| Cable junction | Boots | The end |
That table is your real game. Your AI builds from it, and you change the table before you change a room.
What order should you follow?
- The room table.
- Movement in one room. Getting around has to be a joy, so use coyote time and jump buffering.
- One ability and one door. A double jump is a classic ability, because it changes which ledges count as reachable.
- The way back: a shortcut that opens only from the far side.
- Save points and a map screen.
- A new ability only after the table has been checked again.
What kills these projects?
Designing rooms by feel. Each room looks good, and the map slowly stops adding up. By the time you notice, a change to one ability means rechecking everything.
Backtracking is the other danger. Walking through old rooms is only fun if something has changed. Your new ability should open something on the way, and a shortcut should cut the walk short.
Paste this to your AI
I am building a side-on exploration game with one connected map, where new abilities open old doors. Start with six rooms, one ability, one locked door and one shortcut.
Do not build rooms yet. Sketch the core loop as a state machine in a Mermaid diagram: explore, meet a blocked door, find an ability, go back, open it, find a shortcut, save.
Then model the map: facts (where the player stands, which abilities they hold, which doors are open), moves with what each requires and alters, and rules like "from every spot, the ending can still be reached". Check every route with TLA+ and the TLC model checker, or with get_recipe story-model-check through Spielerando. If a rule breaks, give me the exact rooms in order. The model itself stays with you.
Build from that. When you tell me a room is reachable, list the route to it. If you have not traced one, say you do not know.
Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP
A program then walks every route, including the silly ones no tester would try, so you hear about the dead save before a player does. The recipe travels over an MCP connection. A free Google or e-mail account opens it, and none of your game or code is seen.
How to check it worked
- Jump down everything. After every drop you should be able to get back, or still reach the end.
- Skip the ability. Try to reach the door without it, with clever jumps. If that works, the map has a leak.
- Walk the route list. Follow one route the AI gave you, room by room.
- Save in the worst room. Save just after a one-way drop and reload.
- Hand it to a friend. Ask them to tell you where they would go next.