Load the parts of a big world in the right order and catch loops that never end
A game that loads trees before it knows what a tree is will start with blank spots or fail with a vague message. When two parts each wait for the other it never starts at all. This entry shows the AI how to work out the order and report the loop by name.
Why this works
A part can only be built once what it stands on exists. Walking down through the needs first, and remembering which parts are still being started, gives a safe order and also shows a loop at the moment a part is asked for while it is still waiting.
When not to use it
This is not the answer when parts truly need each other, as two rooms that open into one another. Do not force an order there; split the shared piece out so both can depend on it, or let one part ask for the other later, at play time.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- A diagram of every state
- 26 lines of example code with 4 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Load the parts of a big world in the right order and catch loops that never end" (read_entry load-order-and-circular-needs) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP