New Terrain Generator

Get help, info, news and advice about the Transport Tycoon Deluxe patch.

Moderator: TTDPatch Moderators

User avatar
Raichase
Moderizzle
Moderizzle
Posts: 11509
Joined: 15 Dec 2002 00:58
Location: Sydney, Australia. Usually at work in the underground railway station...
Contact:

New Terrain Generator

Post by Raichase »

Problem Solved, I'll leave this here for general discussion, as it's already been adopted for that purpose anyway ;)

I think The Darkness sang it best when they sang "Is it just me?".

Everyone else is testing this funky new terrain generator, and reporting the bugs. I'd like to be getting bugs, because then I could help improve it, and make it stable.

But, it just plain doesn't work.

I've got r1014, I've got experimentalfeatures.newterraingen on in my config, and whenever I generate a map, it's old-ttd style.

When I generate a fresh cfg, and substitue that line for the normal "experimentalfeatures off" line in the fresh config, it lets me generate new maps fine. So, here I post my cfg, in the hopes that it helps solve this problem.

No hurry, I'm only at 1950something in my current game, with no urges to start a new game with the new terrain generator. So, I'm ny no means dying to try it, but I'd like to put this problem to rest, so nobody else has it :)).
Attachments
ttdpatch.cfg
(2.02 KiB) Downloaded 374 times
Last edited by Raichase on 23 Sep 2006 22:41, edited 1 time in total.
Posted by Raichase. Visit my Flickr! Gallery, Blog (get a feed of everyone at once at Planet TT-Forums).
Raichase - Perfect timing, all the time: [13:37] * Now talking in #tycoon
ImageImage
Official TT-Dave Worley Fan Club
Official TT-Andel-in-a-pink-hat Fan Club
User avatar
Rob
Tycoon
Tycoon
Posts: 4355
Joined: 31 Dec 2002 16:52
Location: Ven-Zelderheide, The Netherlands

Post by Rob »

You have experimentalfeatures twice in your ttdpatch.cfg file, the second time with setting "experimentalfeatures 84".
This probably contradicts the earlier settings. :wink:
Wie zich gelukkig voelt met het geluk van anderen, bezit een rijkdom zonder grenzen. (F.Daels)
Image
Still the best OS around
User avatar
Raichase
Moderizzle
Moderizzle
Posts: 11509
Joined: 15 Dec 2002 00:58
Location: Sydney, Australia. Usually at work in the underground railway station...
Contact:

Post by Raichase »

Oh, thanks Rob, I never noticed that line when I went through it the first time.

Thanks very much :)).
Posted by Raichase. Visit my Flickr! Gallery, Blog (get a feed of everyone at once at Planet TT-Forums).
Raichase - Perfect timing, all the time: [13:37] * Now talking in #tycoon
ImageImage
Official TT-Dave Worley Fan Club
Official TT-Andel-in-a-pink-hat Fan Club
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Post by michael blunck »

> Everyone else is testing this funky new terrain generator, [...]

From what I´ve seen so far, this seems to be a weird implementation. It´s just more or less "random noise" but nothing spectacular, or "realistically" structured landscapes.

See screenshots, one is "mountainous", one is "flat". Guess what "medium" would have come out? :evil:

I really don´t know where this algorithm comes from, but if an alternative landscape generation in TTDPatch is generally possible now, why don´t we choose one of the better algorithms available?

regards
Michael
Attachments
mountainous.png
mountainous.png (18.8 KiB) Viewed 10757 times
flat.png
flat.png (5.89 KiB) Viewed 10759 times
Image
User avatar
Aegir
Tycoon
Tycoon
Posts: 2883
Joined: 09 Feb 2004 10:02
Contact:

Post by Aegir »

While I like some of the landscapes generated, in general I think the feature needs a good wack more work. Still, patience is a virtue and all that. But, I have a real issue to bring to the table, not sure if it's directly related to the new landscape generator, but it's only cropped up in this nightly and not older versions.

Brand new, freshly generated map, note the date in the bottom left corner. Something a bit funky methinks.

Edit: Just a heads up, this bug is very hard to reproduce by just generating new games over and over, if you're persistent enough you should be able to reproduce it. I've seen the error atleast four or five times today, and Singaporekid managed to run into it aswell.
Attachments
hmm.png
hmm.png (79.76 KiB) Viewed 1429 times
Currently working under the name 'reldred' on Github, and Discord.
NFO/NML coder, part-time patch writer for JGRPP, and all round belligerent.

14:40 <orudge> I can't say I discriminate against any particular user
14:41 <Aegir> orudge: I can!
User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3603
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Post by eis_os »

Well it's C code, so start working on it!
TTDPatch dev in retirement ... Search a grf, try Grf Crawler 0.9 - now with even faster details view and new features...
Image
User avatar
Aegir
Tycoon
Tycoon
Posts: 2883
Joined: 09 Feb 2004 10:02
Contact:

Post by Aegir »

eis_os, I know more ASM and understand ASM better than I do C ;).
Currently working under the name 'reldred' on Github, and Discord.
NFO/NML coder, part-time patch writer for JGRPP, and all round belligerent.

14:40 <orudge> I can't say I discriminate against any particular user
14:41 <Aegir> orudge: I can!
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Post by michael blunck »

> Well it's C code, so start working on it!

Are you talking to me or to Aegir?

Well, pointing out a terrain algorithm should be quite easy, however its requirements are still unclear to me. 8)

First of all, TTD´s original algorithm (generating height maps from grey-level images by random geometrical operations) isn´t bad at all. It´s still a modern approach, although it seems people are "sick" of the terrain it generates (in TTD).

O/c, this could easily be overcome by setting up a .grf with a couple of different height maps, as Marcin has already shown years ago.

OTOH, there are those iterative algorithms (midpoint displacement, recursive square algorithms, fault line algorithms, Perlin noise, ...) which usually result in very "realistic" terrain.

Especially Perlin noise and/or midpoint displacement methods come to mind because these are very simple approaches and don´t need much overhead to generate a terrain map.

These algorithms would all need some form of a GUI to set their variuos parameters which may be presented to the user as "type of terrain" (flat -> mountainous), "proportion of water" (low -> high), "terrain surface" (smooth -> rough), etc.

Some of these could be re-used from TTDs GUI (the former two, AFAIR), for additional parameters something differetn would have to be worked out (there´s still room in that particular menu/window, AFAIR).

Well now, these are simple terrain maps generated by using Perlin noise showing different amounts of water and altitudes. They´re already filtered and "normalized" to TTD´s needs and "land" is clipped at the edges in the usual way. This could easily be changed, giving a more "natural" coast line but it´d reduce the area of land of our small maps even more.

In addition, we´d have to talk about other requirements for TTD´s map (i.e. placing of objects) which I´m not familiar with. In any case, generating height maps shouldn´t be a problem.

BTW: Shouldn´t this discussion be moved away from the "problems" sector?

regards
Michael
Attachments
perl test.png
perl test.png (16.04 KiB) Viewed 10646 times
Image
User avatar
uzurpator
Transport Empire Moderator
Transport Empire Moderator
Posts: 2178
Joined: 10 Jan 2003 12:21
Location: Katowice, Poland

Post by uzurpator »

Michael - the algorithm does use perlin noise...

I just cannot really test it now in TTD (I dont have the game nor deleopment enviroment on this machine).

Also - I don't know which params Josef set to call in the function, some of them will produce weird results, like fully flat maps, or full water.

This feature is still in development, and will be stabilized and enhanced soon.

Edit: Also, there are 5 parameters for the generator, translating them to just 2 isn't easy.

Two of them are obvious (it is terrain height max and terrain subtract) one produces the delta of the heightmap, and the other subtracts certain value from the heights.

Difference between those parameters sets the maximum height of the terrain. Setting them to say, sub 8 and height 16 will create a medium-high water hilly terrain with max height of 8. sub 8 and height 24 will create medium mountainous terrain with medium water.

Also there is another parameter - source patch, which defines the starting size for the generation process. This one is more esoteric as it requires understanding of the algorithm. BUt low values will create somethin like your first screen, high values will do the opposite, like on your second screen. The best value imvho is 3 (64 tile source) which is a medium between how 'busy' is the map, and how differentiated the terrain comes up.

Anyhoo I plan to add a feature for creating predefined landscapes, like atol, valley, central lake, delta of a river or oter possible shapes.
All art and vehicle stats I authored for TT and derivatives are as of now PUBLIC DOMAIN! Use as you see fit
Just say NO to the TT fan-art sprite licensing madness. Public domain your art as well.
User avatar
Aegir
Tycoon
Tycoon
Posts: 2883
Joined: 09 Feb 2004 10:02
Contact:

Post by Aegir »

Well, good to see we are getting some clarification on the feature. Should be good to see where it ends up going!.

Crap, my CRT just went bright blue again...

*fiddles with the connector behind his laptop*
Currently working under the name 'reldred' on Github, and Discord.
NFO/NML coder, part-time patch writer for JGRPP, and all round belligerent.

14:40 <orudge> I can't say I discriminate against any particular user
14:41 <Aegir> orudge: I can!
User avatar
uzurpator
Transport Empire Moderator
Transport Empire Moderator
Posts: 2178
Joined: 10 Jan 2003 12:21
Location: Katowice, Poland

Post by uzurpator »

A preview what the algorithm will soon be able to build
Attachments
valley.png
(1.01 MiB) Downloaded 688 times
All art and vehicle stats I authored for TT and derivatives are as of now PUBLIC DOMAIN! Use as you see fit
Just say NO to the TT fan-art sprite licensing madness. Public domain your art as well.
User avatar
DanMacK
Tycoon
Tycoon
Posts: 3906
Joined: 27 Feb 2004 20:03
Location: Ontario, Canada
Contact:

Post by DanMacK »

:shock: Me like!!!

That looks awesome! (And Realistic)

So it this going to be available fromthe current "Mountains" and "Water" setting, or is a more OTTD-style GUI for landscape generation in the cards?
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Post by Hyronymus »

Wow, I really like this. I'm happy to see it in TTDpatch so soon after it came to OTTD. Can't wait to find time for a nice little game :).
User avatar
uzurpator
Transport Empire Moderator
Transport Empire Moderator
Posts: 2178
Joined: 10 Jan 2003 12:21
Location: Katowice, Poland

Post by uzurpator »

Another example, this time a mountain range ona penisula (or a piece of it :P)
Attachments
mountain.range.png
mountain.range.png (36.57 KiB) Viewed 1275 times
All art and vehicle stats I authored for TT and derivatives are as of now PUBLIC DOMAIN! Use as you see fit
Just say NO to the TT fan-art sprite licensing madness. Public domain your art as well.
User avatar
m3henry
Tycoon
Tycoon
Posts: 1985
Joined: 15 Feb 2006 12:00
Location: Hampshire

Post by m3henry »

this makes me want CLIFFS!
but, the TTD's origional land generator is SO good because the randomnes, its not smooth changes, thats why I love it :D but if you can get a RANDOM elemet into it. if you know what I mean.
contiue with thy great work. :D
The occasional look back at your past can teach you a great many things...
Patchman
Tycoon
Tycoon
Posts: 7576
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

TTD itselfdoesn't support cliffs, I'm afraid. If the map generator were to create them, all kinds of things would break, including trains magically flying up the cliff.
Josef Drexler

TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker
No private messages please, you'll only get the answering machine there. Send email instead.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

newterraingen Cht: LandGen

Post by wallyweb »

Search terms to find this post: newterraingen LandGen terrain land

Why this post?
1. This information was a b**** to search for.
2. This thread seemed the logical place to assemble this information.
3. In the wiki ExperimentalFeatures :Alpha says that you must set experimentalfeatures.newterraingen on. Other than that there is no information as to how to make use of it.
4. The way to use this feature pending further development is to use Cht: LandGen with parameters. At the time of this writing, the Patch Manual had no reference to this feature in the section on cheats. EDIT: Per his post below, the Landgen sign cheat is now in the Wiki. Thank you DaleStan. :D

There is some discussion in http://www.tt-forums.net/viewtopic.php? ... tor#513858
which is quite a long thread to browse through and it is getting longer.

I have quoted the appropriate posts below as they provide the information required to use this feature effectively.
patchman - The latest nightly has a new sign cheat which allows control of the parameters used in the land generator. Place a sign with "Cht: LandGen" followed by three numbers to set the three parameters. Leave off the numbers to go back to the usual parameters controlled by the difficulty settings.

The first number is the "delta height", which indicates how mountainous the map will be. Bigger means more mountains, with useful values for example 5, 10, 15 or 20.

The second number is the "trunc height" which determines the amount of water. Larger means more water, and it should increase with a larger delta height, with useful values being for example 20, 30 or 40.

The third one is the source patch size which controls the roughness. The larger it is, the rougher the map will be, with 18 being the maximum.

As long as the first number is not too large, and the second one is larger than the first, you get decent landscapes.

m3henry - 10 55-65 10 seems quite a nice island generator, with land tapering off to a few small rocks in the sea

Dave Worley - 10 20 10 is nice.
Last edited by wallyweb on 05 Feb 2007 06:49, edited 2 times in total.
User avatar
Raichase
Moderizzle
Moderizzle
Posts: 11509
Joined: 15 Dec 2002 00:58
Location: Sydney, Australia. Usually at work in the underground railway station...
Contact:

Post by Raichase »

Wallyweb - I was trying to remember the sign cheat since it came out to no avail. Thankyou for taking the time to do this, I've saved all the information from that quote into a notepad file for quick reference.

Thanks for that mate, little things that make a big help :D
Posted by Raichase. Visit my Flickr! Gallery, Blog (get a feed of everyone at once at Planet TT-Forums).
Raichase - Perfect timing, all the time: [13:37] * Now talking in #tycoon
ImageImage
Official TT-Dave Worley Fan Club
Official TT-Andel-in-a-pink-hat Fan Club
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Post by wallyweb »

Raichase wrote:Wallyweb - I was trying to remember the sign cheat since it came out to no avail. Thankyou for taking the time to do this, I've saved all the information from that quote into a notepad file for quick reference.

Thanks for that mate, little things that make a big help :D
You are most welcome good sir and should you lose your file or your mind. a quick search for newterraingen LandGen terrain and/or land should bring it back into focus. :wink:
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Wikified.
Please feel free to update it, especially the Examples section.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Post Reply

Return to “General TTDPatch”

Who is online

Users browsing this forum: No registered users and 2 guests