I am creating an 2D XNA Tile Based Platformer. I have a tile engine and a world/terrain generator. However, I am trying to create biomes or areas, For example, Desert in one part of the world, ocean on the ends, City in the middle, forests scattered around etc. I can easily make it generate them, but My problem is defining the actual areas to be generated in.
|
|
Without any specific knowledge of your generation algorithm, I would suggest the following. Assuming that your world is defined in a multi-dimensional array
For example:
You could, as @Nathan suggested, use a distance from water to define which tile-set to use for each area. This could help keep your maps looking fresh and consistent, yet still be generated on-demand. |
||||
|
There is a great discussion of procedurally creating random biomes on a map in Polygonal Map Generation for Games by Amit Patel. His maps are arbitrary polygonal shapes, not tiles, but the same ideas should be applicable. Briefly: generate elevation and lakes/rivers on your map using whatever method works for you, then define biomes in terms of elevation and moisture (distance to water). There is a nice table in the article that suggests different biomes for different combinations of elevation and moisture level. |
|||
|
|
