Page 1 of 1

TerraGenesis Patch

Posted: 25 Dec 2005 09:39
by richk67
Wow... looked in my stocking and Santa had left me this super TerraGenesis patch. :lol: :D

A total replacement of the Generate Terrain routine. This is an implementation of a recursive subdivision method for terrain generation.

In simple words - brand new spanking Random Terrains ... that look good ;)

There are a few quirks.

On a New Game, the grass terrain starts all mud, and over the next month regrows back. I dont understand why really, as the RunTileLoop is called 0x500 times. Works OK in Editor mode. :roll:

In arctic, if you go for Flat or Very flat, then there probably wont be anywhere for the forests to go. The best Arctic terrain IMO is at Hilly, with Medium lakes. Strangely, Mountainous looks less ... err... mountainous. Arctic also deliberately clips the top of the mountains to provide space for forests.

Tropical has its own coding, because of the need to have desert and tropical on the same map. Its hills/mountains are a bit more blocky at the base. You should always get some mountains and some desert. The bias on that is the terrain type you select. Tropical also doesnt respond brilliantly to the water quantity. It always has more water than the other climates.

Can I just say... I HATE OIL REFINERIES. I have spent hours trying to get the terrain to provide Oil-Refinery-friendly spaces. In the end it has been a bit of brute force - I have a routine that places 400 5x5 blank spaces for industries, and have shaved the terrain down at the map edges. It sort of works. One for v2.00.

That all said, here is the patch, and several screenies. Patch should be OK with latest version. Nobody has gone near here for ages. ;)

BTW forgot to say.... Happy Xmas everybody!

[edit 29/12/05]Updated to TerraGenesis v3. Eliminates more micro-islands a bit more efficiently.

Posted: 25 Dec 2005 10:01
by KING
less water pls. My idea of a good map is no water except at the edges and on temprate mayby a river from one side of the map to the other.

Posted: 25 Dec 2005 10:11
by richk67
KING wrote:less water pls. My idea of a good map is no water except at the edges and on temprate mayby a river from one side of the map to the other.
It doesnt do rivers yet. Less water? Select the lowest of the options. It isnt a "no water" option. I may yet expand the water options to include "No water", and "Islands" as the two extremes.

Im also considering completely reworking how water is added to the map. At the moment, the decision of whether a tile is water or land is actually the first thing that happens. I may change it so that the land is created, and then it is flooded by rivers, fjords, deltas etc.

Re: Santa's Special: TerraGenesis Patch

Posted: 25 Dec 2005 10:32
by Darkvater
richk67 wrote:On a New Game, the grass terrain starts all mud, and over the next month regrows back. I dont understand why really, as the RunTileLoop is called 0x500 times. Works OK in Editor mode. :roll:
You need to set _generate_world to true before making those land-tiles. Then you end up with green grass. If the only purpose of RunTileLoop is to get the grass 'green', drop it :)
richk67 wrote:In arctic, if you go for Flat or Very flat, then there probably wont be anywhere for the forests to go. The best Arctic terrain IMO is at Hilly, with Medium lakes. Strangely, Mountainous looks less ... err... mountainous. Arctic also deliberately clips the top of the mountains to provide space for forests.
High mountains don't have trees anymore. I think at the very top you are ok if there are no trees around. Of course that decision should be based on the snow_height level variable. The lower it is, the higher the average altitude on the map.
richk67 wrote:Can I just say... I HATE OIL REFINERIES. I have spent hours trying to get the terrain to provide Oil-Refinery-friendly spaces. In the end it has been a bit of brute force - I have a routine that places 400 5x5 blank spaces for industries, and have shaved the terrain down at the map edges. It sort of works. One for v2.00.
I think how the current algorithm does it is try and place an oil refinery somewhere and if it doesn't go (rough terrain), terraform the ground beneath it to make it fit :).

Unfortunately I can't test your patch cause I'm going on holiday in a few hours, this are just opinions, suggestions based on what you wrote.

Merry Christmas :P

Re: Santa's Special: TerraGenesis Patch

Posted: 25 Dec 2005 10:43
by richk67
Darkvater wrote: You need to set _generate_world to true before making those land-tiles. Then you end up with green grass. If the only purpose of RunTileLoop is to get the grass 'green', drop it :)
Okies... I'll add _generate_world to the next iteration.
Darkvater wrote:High mountains don't have trees anymore. I think at the very top you are ok if there are no trees around. Of course that decision should be based on the snow_height level variable. The lower it is, the higher the average altitude on the map.
They dont? Oh. But what about the forests? Are they still restricted to > snow_line?
Darkvater wrote:I think how the current algorithm does it is try and place an oil refinery somewhere and if it doesn't go (rough terrain), terraform the ground beneath it to make it fit :).
Nice. Hope it does. I'll check.
Darkvater wrote:Unfortunately I can't test your patch cause I'm going on holiday in a few hours, this are just opinions, suggestions based on what you wrote.

Merry Christmas :P
Lucky you cant test it... it has a bug in the patch file. (Remind me to test the patch *before* uploading it to the forum! ;) ). Ive now updated the patch file - please download again from the OP.

Re: Santa's Special: TerraGenesis Patch

Posted: 25 Dec 2005 13:38
by Darkvater
richk67 wrote:
Darkvater wrote:High mountains don't have trees anymore. I think at the very top you are ok if there are no trees around. Of course that decision should be based on the snow_height level variable. The lower it is, the higher the average altitude on the map.
They dont? Oh. But what about the forests? Are they still restricted to > snow_line?
Have you ever seen trees in the Alps at a +2500m altitude? I was just comparing it to 'real life' :).

Posted: 25 Dec 2005 14:54
by Gorre
And have you ever seen any industries, large cities and so here too?

Posted: 26 Dec 2005 13:23
by SirkoZ
Please add the revised (as talked about in the above posts) version of this patch to the integrated_nightly_build and release it as soon as possible so we can extensively test it. ;-)

Posted: 26 Dec 2005 18:50
by richk67
SirkoZ wrote:Please add the revised (as talked about in the above posts) version of this patch to the integrated_nightly_build and release it as soon as possible so we can extensively test it. ;-)
My thoughts exactly. Im going to ditch what I'd done for IN... with a new 2090 patch, and a new PNGmap patch, there are a lot of useful changes.

Posted: 26 Dec 2005 19:43
by SirkoZ
Nice!

Well - please - do include my 3 patches - I don't think you're going to have any problems integrating them and they are well configurable now.

Re: Santa's Special: TerraGenesis Patch

Posted: 29 Dec 2005 10:25
by richk67
Darkvater wrote:
richk67 wrote:On a New Game, the grass terrain starts all mud, and over the next month regrows back. I dont understand why really, as the RunTileLoop is called 0x500 times. Works OK in Editor mode. :roll:
You need to set _generate_world to true before making those land-tiles. Then you end up with green grass. If the only purpose of RunTileLoop is to get the grass 'green', drop it :)
Turns out I was setting .m5 of each modified tile to 0. Should have been setting it to 3. All sorted and working in v3 now.

Posted: 29 Dec 2005 13:13
by MeusH
Rocks on the peaks of the highest mountains and rocks scattered on the ground in the groups would be much better IMO
Also, would it include the tree-plant patch that plants trees in more realistic groups?

Posted: 29 Dec 2005 13:22
by richk67
MeusH wrote:Rocks on the peaks of the highest mountains and rocks scattered on the ground in the groups would be much better IMO
Also, would it include the tree-plant patch that plants trees in more realistic groups?
Interesting idea re rocks. Yes, the TG patch does include the tree clumping patch too.

Posted: 10 Jan 2006 04:04
by Jim Starluck
Any particular reason this hasn't been added to the trunk yet?

Posted: 10 Jan 2006 08:20
by richk67
Jim Starluck wrote:Any particular reason this hasn't been added to the trunk yet?
:lol: it wont be for the moment, but if you look at the plans for v0.5, it has been added there. There is a fair bit of development work to go before then, and I havent had chance to do any yet.

BTW - have you found the patch useful? Does it give you good maps to play? Please let me know. Feedback always help develop it better.

Posted: 10 Jan 2006 08:33
by bobingabout
most things that do get added only get added once complete :P ... some things just don't get added...

Posted: 11 Jan 2006 00:47
by Jim Starluck
richk67 wrote:
Jim Starluck wrote:Any particular reason this hasn't been added to the trunk yet?
:lol: it wont be for the moment, but if you look at the plans for v0.5, it has been added there. There is a fair bit of development work to go before then, and I havent had chance to do any yet.

BTW - have you found the patch useful? Does it give you good maps to play? Please let me know. Feedback always help develop it better.
I haven't been able to use it much...I'm not a coding-type person so I don't know how to add .patch files to the game.

I fiddled around with the Integrated Nightly (which oddly enough is missing some of the things that the actual Nightly has, like articulated locomotive support), and the terrain looked much nicer than the default...which is why I asked.