 |
|  |
 |
|
King
Bubblewrap
|
Dec 2000 time: 02:08
| |
|
|
mk..i think this is my first post in this forum...so be gentle 
Anyway, lot's of civ-projects here, and i guess most, if not all, support random map generation. (i only skimmed through a few posts)
What i'm wondering about is, what algorithms do you use for your maps?
And do you also generate rivers, if so, how does your algorithm work?
I've written my own hex-based implementation of the mid-point division algorithm, there are still some glitches due to constraints i put on it (i want it to be an island, always), but the overall terrain is generated nicely. I also added river generation algorithm, which is basically a depth-first search, starting with a peak, and following the lowest tile next to it untill it either encounters a valley (a tile with no lower bordertile) or the sea.
two older screenshots:
http://www.xs4all.nl/~munishm/screens/terrain1.jpg
http://www.xs4all.nl/~munishm/screens/terrain2.jpg
White tiles are peaks, yellow tiles are beaches, blue is water, green is land. Darker color means higher/lower altitude (depends on tile type: water or land)
|
|
|  |
 |
|
King
Bubblewrap
|
Dec 2000 time: 02:08
| |
|
|
I decided to change my algorithm and also use water units. It makes more sense, and this way i can get thick and thin rivers. However instead of giving each tile 100 units, i'll have a variable starting amount of water units, maybe depending on height. The units will be distributed along the river. based on the height difference between the tiles...i think...i still have to work out the details on that. But i'm pretty sure that the water units will be spread over the entire river.
|
|
|  |
 |
|
|
I about a year ago I was a part time member in the late Stela Polaris project and I had I consider my "Magnum Opus" to be the idea for a map generator based on emulating plate tectonics. I was not involved in the coding of the generator but I can give you some of the details of how it worked.
The sytem starts with a map of diamond squares much like Alpha Centauri (using a more primitive map generator first and then applying this generator may help produce more interesting results, as the map will not start flat). A random number generators pick 6-12 tiles on the map, these points become "seeds" that later produces "plates". The next algorithim them asignes every other tile on the map to one plate based on which seed tile it is closest too. The plates will be iregular polygons with 3-5 sides and various sizes. (finding a way to create curved plate boundarys would be an excelent addition) Next each plate is randomly assigned one of the 8 cardinal directions as its direction of movment and a speed of 0,1,2 or 3. Each individual tile in the plate is then transposed that many spaces in that direction (all that is moved realy is the plate designation and elevation, so for example the value of Plate A-2300ft is moved from grid location 45,67 to 45,69), each plate takes turns so for example plate A move 1 space north, plate B moves 2 space SW, C moves 0 NW, D moves 1 East and then we begin again with A.
Each time a tile is transposed ontop of another tile the elevations are added together and the designation of the moving plate replaces that of the stationary one. After each plate movment if any "void" tiles (at the tail end of the plate) were created then they are assigned a low elevation and made part of the plate that just moved. Ocean tiles should have positive elevation values durring this stage so that when they subduct they push the land up. When the whole process is over these values can be altered or ignored but durring calculation they need to be positive.
Run the plate movments for 20-30 cycles, the number of cylces could also be a random choice too by the way. Then apply an Erosion algorithim, basicaly cut all evelation by 20%-50% and spread the resulting mass around to adjasent tiles keeping the total the same, make shure to alow oceans to be filled in by this process. If possible try to use something similar to the river simulator mentioned earlier to move the "dirt" downstream untill it's in the ocean.
Now start all over again with a new and independed set of seeds plates and movment, again run this for a bit and apply another erosion. Repeat the seed, plate, movment cycles, erod a total of 3-4 times possibly droping in some effects like random volcanos, meteor impacts ectt to give it a bit of spice.
This map generator idea was never fully developed in the time that I was with Stella Polaris but the initial versions made in only a few days work proved to be the best map generators I have EVER seen, huge very ralistic 600x800 maps can be spit out in mear seconds and best of all small and large map sizes do not disrupt the program and produce "chunky" maps as is common with other map generators. Hope this helps yall out and I promise you will not be disapointed if you go to the effort of codeing this.
|
|
|  |
 |
|  |
All times are GMT. The time now is 01:08. Apolyton Time is 20:08. |
top of page
|
|
|
|
|
|