I was recently thinking about how I could generate a playable random map for my tile based strategy game. I can foresee many difficulties with this. Below is a sample map created in the map editor:
This map although not very well balanced looks sensible. The roads are connected and features such as trees and mountains are grouped in semi-realistic clumps. The river is also continuous and flows from one side of the map to another. If this sort of result is to be achieved my a random map generator it will need to follow these rules:
- If the tile is blank there must be a chance that a feature is placed on it. This should be larger if adjacent tiles contain this feature.
- Roads and rivers must form a closed loop. (counting the map edge as closed). If there is a road or river section in an adjacent tile and it is "facing" into the tile it must be continued.
- (Optional) The map be balanced in terms of resource and position or be symmetrical.
I intend to try and write some pseudocode which achieves these effects soon.
No comments:
Post a Comment