Every tile on the map can contain ONE type of resource. (They can contain as many players/units desired.)
There are X "main treasures" throughout the game (depending on the number of players; probably 3 or 5).
These must be distributed across the map in such a way that they are NOT too close to each other.
Pick a random island
Pick a spot on that island
Measure its distance to the other treasures
If too small, try somewhere else. Otherwise, it's okay!
Once these are distributed, resources are dropped across the map. Resources want to appear in groups: if a certain tile has trees growing on it, there's a great chance trees will grow nearby, because it's a FOREST.
How to implement?
Go through all tiles.
If this tile doesn't have anything yet, check its surroundings
The type that appears the most in the surroundings has X% chance of becoming the type of this tile.
If that fails, determine type randomly (which could be "nothing")
One caveat: it's annoying if a certain resource doesn't appear on the map AT ALL. How to solve?
Before running the algorithm, pick random tiles, and drop a unique resource on them. This way, every resources has at least ONE apperance.
Every tile on the map can contain ONE type of resource. (They can contain as many players/units desired.)
There are X "main treasures" throughout the game (depending on the number of players; probably 3 or 5).
These must be distributed across the map in such a way that they are NOT too close to each other.
Once these are distributed, resources are dropped across the map. Resources want to appear in groups: if a certain tile has trees growing on it, there's a great chance trees will grow nearby, because it's a FOREST.
How to implement?
One caveat: it's annoying if a certain resource doesn't appear on the map AT ALL. How to solve?