TerraGenesis Perlin

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Post by richk67 »

For those wanting to try this, but not having compilation facilities, here is a win32 binary for TGPv3d.

Please test thoroughly... :)
Attachments
ottdTGP3d.zip
TerraGenesis Perlin v3d.
(1.49 MiB) Downloaded 258 times
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
Singaporekid
Tycoon
Tycoon
Posts: 1966
Joined: 21 May 2004 07:39
Location: Singapore

Post by Singaporekid »

Yeah, industries seem to always occur at the same level, makes it rather easy :P
Is nobody else testing this?
Attachments
Industries.PNG
Industries.PNG (159.75 KiB) Viewed 1723 times
<+Raichase> ugh, I just ate some of my beard D:
User avatar
sidew
Engineer
Engineer
Posts: 115
Joined: 31 Aug 2005 06:46
Location: Milan, Italy
Contact:

Post by sidew »

Great! Now I'll try to compile the new patch.

Can I ask a version of perlin terragen patch for 0.4.5 release?
Sidewinder

Italian Town names patch for OTTD (R5266) now in trunk since 0.4.8
For typo, errors or bug on OTTD italian translation, please PM me.
unofficial italian TTD/OpenTTD forum: http://wolf01.game-host.org/forum/index.php
sc79
Director
Director
Posts: 586
Joined: 22 Feb 2005 09:51

Post by sc79 »

Is there any possibility you could encourage it to create more 'grouped' areas of land/ocean? On 256x256 maps it seems to work really well. You often get 1-2 land 'masses', along with a few islands, and a corner/edge of the map which is mostly ocean, giving the impression that you're looking at a small segment of a much larger world. However, on bigger maps, it really seems to hug the borders (i expect the numbers are the same, but relative to the map size, it looks worse), and most of the land masses get connected by strips.

And yeah, some work on industry placement and/or minor terrain randomness (just 1-2 squares here and there to break it up) is needed.

Otherwise seems to be working well. Didnt hit any bugs, and it keeps getting better :)
User avatar
sidew
Engineer
Engineer
Posts: 115
Joined: 31 Aug 2005 06:46
Location: Milan, Italy
Contact:

Post by sidew »

I found a better solution for resolving the compilation issues using with MS visual studio.

Can you modify the macro.h:

where is the line

Code: Select all

#define abs myabs
change with

Code: Select all

#ifdef _MSC_VER
	#define _USE_MATH_DEFINES 1  
#else
	#define abs myabs
#endif
So you can compile smoothly on M$ visual studio because by default, math constants are disabled.
Sidewinder

Italian Town names patch for OTTD (R5266) now in trunk since 0.4.8
For typo, errors or bug on OTTD italian translation, please PM me.
unofficial italian TTD/OpenTTD forum: http://wolf01.game-host.org/forum/index.php
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Post by richk67 »

Singaporekid wrote:Yeah, industries seem to always occur at the same level, makes it rather easy :P
Is nobody else testing this?
Ah... when the Smoothness is Rough or Very Rough, the standard industry placement routine has difficulty finding a flat enough area to place an industry. So they will tend to congregate on the plateaus at the tops of mountains. I will have to look at coding a "FlattenFootprintForIndustry" routine in PlaceNewIndustry.

Thanks for testing.
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Post by richk67 »

sc79 wrote:Is there any possibility you could encourage it to create more 'grouped' areas of land/ocean?
Unfortunately it is very difficult to put any bias of that sort into the routine. Fundamentally it is a random noise pattern.
On 256x256 maps it seems to work really well. You often get 1-2 land 'masses', along with a few islands, and a corner/edge of the map which is mostly ocean, giving the impression that you're looking at a small segment of a much larger world. However, on bigger maps, it really seems to hug the borders (i expect the numbers are the same, but relative to the map size, it looks worse), and most of the land masses get connected by strips.
I do not scale the edge effect by the map size, so it always only snips about 10-20 tiles from the edge. If I scale it, on larger maps, the effect will spread quite far. Its worth a look though.
And yeah, some work on industry placement and/or minor terrain randomness (just 1-2 squares here and there to break it up) is needed.
Minor randomness is added by using a rougher smoothness. I think the small scale variations are about right - too much and everything is bumpy. On desert it certainly will create larger flat plains, but I deliberately add a noise function for these areas. (Which incidentally creates the anomaly of minor dents that look like dry wadis!)
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Post by richk67 »

Some (large) sample pics from gen 38398, flat, low water (!!), rough. I really like some of the islands and coast it made this time.
Attachments
Unnamed, 5th Jan 1946 #3.png
Unnamed, 5th Jan 1946 #3.png (101.66 KiB) Viewed 1649 times
Unnamed, 5th Jan 1946 #2.png
Unnamed, 5th Jan 1946 #2.png (71.17 KiB) Viewed 1651 times
Unnamed, 5th Jan 1946 #1.png
Unnamed, 5th Jan 1946 #1.png (104.54 KiB) Viewed 1687 times
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Post by richk67 »

More pics from same generation. Plus scenario (r3993).
Attachments
Unnamed, 5th Jan 1946 #5.png
Unnamed, 5th Jan 1946 #5.png (86.02 KiB) Viewed 1687 times
Unnamed, 5th Jan 1946 #6.png
Unnamed, 5th Jan 1946 #6.png (46.83 KiB) Viewed 1718 times
Gen38398.scn
r3993, pb_ukrs.grf, pb_hovs_bus.grf, pb_viaduct.grf
(229.72 KiB) Downloaded 347 times
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
User avatar
AlienDNA
Engineer
Engineer
Posts: 97
Joined: 12 Apr 2004 08:53
Location: Leiden, Netherlands

Post by AlienDNA »

Absolutely incredible.

In this form I'd say it is already more than able to be incorporated into the svn. These lands look masterfull. Can't wait to play with this generator!

Good work, really good work. I'm keeping my eyes firmly fixed on this thread!
"I'm gonna rip his leg off and kick him with it!", Sanjuro, Shogo-MAD
User avatar
Ben_Robbins_
Tycoon
Tycoon
Posts: 1234
Joined: 20 Nov 2005 01:56
Location: Abu Dhabi, UAE

Post by Ben_Robbins_ »

This is seriously awesum. The realism of the lakes/sea areas rocks. With the water high with the roughest most mountainouse land, its so tricky. Good Stuff.
Ben
RMJ
Traffic Manager
Traffic Manager
Posts: 160
Joined: 24 Sep 2005 13:52
Location: Denmark
Contact:

Post by RMJ »

Good say. Very nice work. You can really make some beatifull landscapes thats also awesome to play.. really nice :) Good job!
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Post by richk67 »

Patch updated.
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
User avatar
AlienDNA
Engineer
Engineer
Posts: 97
Joined: 12 Apr 2004 08:53
Location: Leiden, Netherlands

Post by AlienDNA »

Alright, then I humbly request another compiled win32 exe, so we can all test. ;)

Thanks in advance!
"I'm gonna rip his leg off and kick him with it!", Sanjuro, Shogo-MAD
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Post by richk67 »

AlienDNA wrote:Alright, then I humbly request another compiled win32 exe, so we can all test. ;)

Thanks in advance!
Yup. I just didnt have time last night.
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
User avatar
AlienDNA
Engineer
Engineer
Posts: 97
Joined: 12 Apr 2004 08:53
Location: Leiden, Netherlands

Post by AlienDNA »

Ooh, and if it could be compiled against the latest nightly, I'd be delighted. I noticed electrified railways implemented! And I can't load savegames or scenarios from old versions, because a while back they changed something in the savegames... That's why I'd like it with the new nightly :)
"I'm gonna rip his leg off and kick him with it!", Sanjuro, Shogo-MAD
User avatar
BoominGranny
Engineer
Engineer
Posts: 85
Joined: 18 Apr 2006 02:16
Location: Wellington, New Zealand
Contact:

Post by BoominGranny »

Just a suggestion - hit me if im jumping the gun here (ie. you already were planning this but you have a life and havn't had the hours to code it yet)

Would it be possible to extend TerraGenesis Perlin so:

1) Ability to generate an "islands" map type. so almost every city was on its own island??

2) to the current window - add starting date, add number of trees (ie tree groups aka forests but i intentionally didn't use that word), add number of towns, number of industry's per town, max number of industry's per each industry type.

Also city size - i imagine this in 4 dropdown boxes eg:
[1 city size] [2 quantity]
[3 city size] [4 quantity]
City size types - small citys, medium citys, large citys, huge citys
quantities - none, very low, low, medium, high
(This way you could generate citys the way another forum user here wanted - ie several huge citys and lots of little towns)

The above would still work if you wanted to just generate land, you could just set citys to none.

It would also ensure you get your game just the way you like it without going into the patches window to set the year, then difficulty window to set the number of towns etc...

Also (i am using mini intergated r4562)
i noticed that it sometimes produces radio transmitters and lighthouses really close together (see attached pictures) could you add a min distance to one another?
Attachments
lighthouses.png
lighthouses.png (16.91 KiB) Viewed 1468 times
transmitters.png
transmitters.png (21.41 KiB) Viewed 5185 times
Hairysteed
Traffic Manager
Traffic Manager
Posts: 138
Joined: 28 Mar 2006 23:40
Location: Finland

Post by Hairysteed »

Might be difficult, but perhaps make the lighthouses appear on peninsulas, islands and areas where land tends to protrude seawards.
User avatar
Brianetta
Tycoon
Tycoon
Posts: 2567
Joined: 15 Oct 2003 22:00
Location: Jarrow, UK
Contact:

Post by Brianetta »

Hairysteed wrote:Might be difficult, but perhaps make the lighthouses appear on peninsulas, islands and areas where land tends to protrude seawards.
Or on small islands off-shore.
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Post by richk67 »

Brianetta wrote:
Hairysteed wrote:Might be difficult, but perhaps make the lighthouses appear on peninsulas, islands and areas where land tends to protrude seawards.
Or on small islands off-shore.
Yes, there is something odd about both the transmitter and lighthouse placing. But what is weird, is I havent touched it!

There is a minimum distance between transmitters; it is a tile-walk-path of 14. It should be bigger IMO, but I also want to add code to say that a transmitter should only be placed on a hill if 50% of the land within 3 squares is lower than its tile. (Should bias it to place transmitters on hilltops).

Similarly I want to bias lighthouses to only place if 70% of the tiles within 5 tiles are water. This should bias it to headlands that stick out, since a lighthouse on the edge of a straight shore should have 50% land. To be more than 50% implies it should be a headland of some sort (or island).

On a similar vein, I am a little disappointed with how often towns are built just outside the reach of shipping. I may introduce a bias to the town placement that if there is any water within 10 tiles, it moves the town centre to within 3 tiles of the water's edge.
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 4 guests