Balanced (in a sense) map generation example
2012-04-03 01:17:10
In maps for an imaginary n-player strategy game, a critical property of the starting state is that resources are available in the same distribution to all players. To be fair, every player (b* in square) must be able to reach the same number of resources (m* in doublecircle) in the same number of moves.
Here's the table that emerged in this generated example:
1 at distance 2
2 at distance 4
1 at distance 6
1 at distance 8
1 at distance 10
1 at distnace 12
No resources are within two steps of another resource. Every resource is reachable by some player. Every player can reach every other player. No player can reach another player within too few moves.
When generating maps for more than two players, it is possible for some players to have more of their resources in contention than others. In this example, note how b2 and b2 must share more close resources with one another than they do with b1. The isolated player, b1, has a map advantage, encouraging b2 and b3 to team up until the situation is balanced.
How do you actually play this game? Dunno, I'm just sketching generation infrastructure here, seeing what kinds of constraints feel natural to enforce on maps encoded as graphs. Every time it hits 100 lines of code I start over.