Post by David West on Aug 18, 2006 6:04:27 GMT -5
I intend making the map random, but with as realistic features as I can code. Whenever a new player joins the game they will be placed near the edge of the known map to avoid them being in the middle of a load of established players to make it fairer. They will be given a city and then all surrounding terrain will be generated where required.
As players can only see the “squares” surrounding their cities and military units, these squares of terrain will only be generated once they come into view of a player. This method of drawing the map might not be feasible as it might result in too much of a “patchwork” effect in terms of terrain, ie you might not get mountain ranges etc but just single squares of mountains dotted around, this will become clearer during the coding phase.
Here are the terrain types the game will feature with their movement cost and defensive bonus/
[/td][/tr]
[tr][td]Hills[/td][td]20 MPs[/td][td]20%[/td][td]1-20k[/td][td]1-100k[/td][td]Gold Mine 0.001% Iron Mine 0.1%[/td][/tr]
[tr][td]Mountains[/td][td]30 MPs[/td][td] 40%[/td][td]1-5k[/td][td]0[/td][td]Gold Mine 0.005% Iron Mine 0.2%[/td][/tr]
[/table]
Sea
Rivers
I’m “thinking out loud “ now, I will probably generate the map in large chunks and only generate new chunks if the edge of the existing map is reached, this will solve a lot of problems. If anyone knows about generating maps at random then let me know!
Special features:
Oil Well produces oil
Gold Mine produces gold
Iron Ore Mine produces Iron
Any links to samples of code regarding generating maps would be handy if anyone finds/knows any.
As players can only see the “squares” surrounding their cities and military units, these squares of terrain will only be generated once they come into view of a player. This method of drawing the map might not be feasible as it might result in too much of a “patchwork” effect in terms of terrain, ie you might not get mountain ranges etc but just single squares of mountains dotted around, this will become clearer during the coding phase.
Here are the terrain types the game will feature with their movement cost and defensive bonus/
Terrain | Movement Cost | Defense Bonus | Population | Food | Special |
Cities | 5MPs | 100% | 500k- 5 Million | Stockpile | Factories and Resource Stockpile |
Plains | 10MPs | 0% | 1-50k | 100-500k | Oil Wells (0.01%) |
Forest | 20 MPs | 30% | 1-5k | 0 | - |
[tr][td]Hills[/td][td]20 MPs[/td][td]20%[/td][td]1-20k[/td][td]1-100k[/td][td]Gold Mine 0.001% Iron Mine 0.1%[/td][/tr]
[tr][td]Mountains[/td][td]30 MPs[/td][td] 40%[/td][td]1-5k[/td][td]0[/td][td]Gold Mine 0.005% Iron Mine 0.2%[/td][/tr]
[/table]
Sea
Rivers
I’m “thinking out loud “ now, I will probably generate the map in large chunks and only generate new chunks if the edge of the existing map is reached, this will solve a lot of problems. If anyone knows about generating maps at random then let me know!
Special features:
Oil Well produces oil
Gold Mine produces gold
Iron Ore Mine produces Iron
Any links to samples of code regarding generating maps would be handy if anyone finds/knows any.