Scatter ore nodes so each kind stays apart from its own kind and from the others
Dropping resources at random puts three iron nodes in one spot and nothing for a long walk. Here is a way to place them from a list of random candidate spots with two different gaps and a count for each kind, and why the order of the list matters.
Why this works
Two different wishes pull apart: each kind should be rare and spread out, yet different kinds may sit close, as in real rock. Using a wide gap within a kind and a narrow gap across kinds, with a fixed order of tries, delivers both without looping.
When not to use it
Wrong when ore should form rich veins or clusters, as in most mining games, where closeness is the reward. Then grow clumps around a few seeds instead, and use spacing only to keep whole clumps apart from each other.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- A diagram of every state
- 20 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 "Scatter ore nodes so each kind stays apart from its own kind and from the others" (read_entry survival-ore-spacing-by-kind) 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