I've seen that symmetry and coherance is important in RTS level design, but I'm lazy and want to do procedurally generated levels.
How can I ensure I generate a fair playing field when procedurally creating levels for an RTS?
I've seen that symmetry and coherance is important in RTS level design, but I'm lazy and want to do procedurally generated levels.
How can I ensure I generate a fair playing field when procedurally creating levels for an RTS?
Personally, I find symmetry in level design to be boring, and I don't think it's necessarily the case that it's needed for fair levels; symmetry is a way of ensuring that everybody has access to the same resources and the same bottlenecks by virtue of the level literally being mirrored for each player in some fashion. I think the important part is access to (roughly) the same advantages and disadvantages. Not so much the symmetry itself.
I also think that a game balanced such that all sides are of equivalent power and have equivalent opportunity is boring. You obviously don't want a total imbalance of those factors, but I think it can create an interesting play dynamic to offer each side slightly varying opportunities and roadblocks.
That's the sort of design context I'm thinking of as framing the actual answer to the question:
If the symmetry really matters to you, you can simply procedurally generate a chunk of level and then mirror that level across both axes. The chunk you generate is basically one quarter of the level and you mirror it so each quadrant is the same. For example, a procedural height map with randomly dispersed resource deposits:
But as I said above, that seems dull. A more interesting approach might be to generate the entire terrain procedurally, but when placing resources, make sure to constrain each quadrant to having the same number of each (within some tolerance to provide some variability). You may want to bias the placement of various resource types towards various areas (randomly, near the starting points, near the borders) based on the importance of the resources. For example:
You can perform analysis on the generated image to try to find feature edges -- narrow canyons, for example, which may be considered bottlenecks. You may decided to re-roll the terrain generation for a portion of the map if, for example, it has far more or far fewer bottlenecks or similarly detectable terrain features than others. You may also want to do similar terrain analysis to make sure each placed resource is, in some fashion, reachable.
For example, you may decide to re-roll the bottom-left quadrant because it has too much water (in red) or the quadrants containing the green because they are too tactically advantageous (potential canyon bottlenecks):
You can also opt to manually guide your feature generation; you can manually place certain elements, such as a river dividing the sections of the level or key resource deposits, and run the procedural generation afterwards such that it preserved the hand-placed key balancing features while still providing the interesting and organic variety you want out of procedural generation.
For example, a generated terrain that preserves a manually-placed river dividing the map in half and forested cover provided extra defense around the bases:
In some cases, it might be possible to rely on the players themselves to build balanced asymmetrical maps by using tile manipulation mechanics.
At one end of the spectrum, you can allow the players to create the map, either partially or entirely, by selecting & place map tiles. There are a bunch of different ways this could be tweaked:
At the other end of the tile manipulation spectrum is allowing the players to manipulate map tiles. In this solution, the game start with an initial map. The initial map could be symmetric or might be 'fair enough' by using any of the other answers.
Next, a map manipulation phase occurs in which the players may do some of the following:
These manipulations could be executed one at time, in which case one player would have a chance to react to another players manipulations, or the player might queue of a list of changes which get executed. Also, you could allow players to manipulate the entire map, or restrict things to their starting areas.
A drawback of this approach is it the final result needs to be guarded against undesirable outcomes - i.e. manipulating an impassible mountain range such that part of the map becomes inaccessible. Possible solutions for this drawback are:
Have your map generation algorithm generate symmetric levels by generating a level, mirror it, and place each player on one side. A four-player map can be created by mirroring it on both the x- and y- axis.
That way the map will be equally good (or bad) for all players. A side-effect which you need to be aware of is that it means that the players are aware of the positions of the other players and of the layout of the other parts of the map after exploring their own.
Another option is to generate a map without this symmetry trick, but then show the whole map to the players and have each player pick their starting location freely.
One approach is to use other factors to balance the map. You might be able to automate this by using some map analysis algorithms & providing extra starting resources to locations that are deemed disadvantaged. Alternatively, you can use the players themselves for this step. A current example of this is the use of reverse auction in reveal mode in Offworld Trading Company (OTC) for founding your initial claim (i.e. picking a starting base location):
As time ticks by, the starting debt for founding early goes down. This will eventually turn into starting money if it takes a long enough amount of time for the last 2 players to found. Once there is only one player left who hasn't founded their HQ, the values stop changing and that player no longer gains from waiting to found.
I don't recall if it was the 3 Moves Ahead or Game Design Round Table interview, but in one of them Soren Johnson (the developer) says this mechanic essentially changes the map problem from "can I find the best location first" into "how good is the 2nd best location on the map."
A benefit is this solution allows highly asymmetric maps. A disadvantage is that the entire map is revealed to all players, at least at the beginning. The OTC approach also reveals player base locations. Other mechanics like blind bidding, might avoid revealing base locations.