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

KUDr
OpenTTD Developer
OpenTTD Developer
Posts: 219
Joined: 11 Jan 2006 21:36
Location: Czech Republic

Post by KUDr »

RichK67: i can't reach you on IRC. Here is another tgp.c with smooth coasts.
Attachments
tgp.c
Look for the coasts generated by it if you like them or not.
(28.53 KiB) Downloaded 305 times
User avatar
sidew
Engineer
Engineer
Posts: 115
Joined: 31 Aug 2005 06:46
Location: Milan, Italy
Contact:

Post by sidew »

I noticed now that TGP project become a new branch from trunk. Is the merging phase into trunk coming soon?
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 »

sidew wrote:I noticed now that TGP project become a new branch from trunk. Is the merging phase into trunk coming soon?
Not really; it just made sense since I was starting to do main TGP development in the MiniIN branch - which is not really the place for it.

I will backport the TGP changes from MiniIN into the TGP branch, and then develop it in there.

In my view, TGP is getting pretty close to releaseable in trunk. The code hasnt had full dev review; but several have added contributions. The main thing now is to speed up the routine by eliminating the pow() function.

I may use a nice bit of code from KUDr that does a 2048x2048 map in 4.5 secs :) Really fast; pity it then spends another minute adding towns and industries etc. !!
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
orudge
Administrator
Administrator
Posts: 25217
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Post by orudge »

Brianetta wrote:In British English, randomize is historically correct, but either are fine in the UK today - according to the OED. Still, the spirit of Webster should live on - the American language is different from the British language not by accident, but design. Something symbolic to do with the independance of the colony, so I believe. So, let's be nice and spell it with an s. (:
Indeed - in general, these days in Britain, things are spelt with an 's' rather than a 'z'. I notice 'randomise' was committed to SVN the other day anyway, so that's alright. ;)
User avatar
Thief^
Route Supervisor
Route Supervisor
Posts: 469
Joined: 10 Oct 2004 00:11

Post by Thief^ »

richk67 wrote:The main thing now is to speed up the routine by eliminating the pow() function.
If you are raising one int to the power of another (small) int then writing you own pow function with a loop might be faster. At least it was in my tests a year ago.
Melt with the Shadows,
Embrace your destiny...
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Post by richk67 »

Thief^ wrote:
richk67 wrote:The main thing now is to speed up the routine by eliminating the pow() function.
If you are raising one int to the power of another (small) int then writing you own pow function with a loop might be faster. At least it was in my tests a year ago.
Unfortunately it is floating points to an integer power.

My 2048x2048 map was generating in 24 secs before replacing the pow() function, and after replacing it with a lookup table (since the values were constant), it only took 7-8 secs.

KUDr has a high speed routine that reduces it to ~4.5secs, and I think Shaman has an even faster one. However, it becomes academic on 2048x2048; since it takes upwards of 1 minute to place the towns and industries on the map, the fact that my routine is 3 secs slower than the others on generation is not important IMO.

The latest version is available in its own branch; svn://svn.openttd.org/branch/TGP.
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
sc79
Director
Director
Posts: 586
Joined: 22 Feb 2005 09:51

Post by sc79 »

Recent changes you made have a huge effect on mountainous maps. They look much better (and tougher!) now. Does make hilly look positively flat in comparison, but I expect there might be future changes for that as well :)
Rinnsal
Engineer
Engineer
Posts: 27
Joined: 18 May 2006 10:39
Contact:

Post by Rinnsal »

For those who are not able to compile it or want to save time:

http://www.bstramke.de/ottd/OTTD-5227-Perlin.zip

You could also visit http://www.bstramke.de/ottd but this page still looks crappy. Its also only a list of the patches Provided (which currently only is the before mentioned patch)
Rinnsal
Engineer
Engineer
Posts: 27
Joined: 18 May 2006 10:39
Contact:

Post by Rinnsal »

Ok, there is a little problem with that version: you wont be able to play it in multiplayer (it says different version). Anyone knowing how to solve this?
User avatar
Brianetta
Tycoon
Tycoon
Posts: 2567
Joined: 15 Oct 2003 22:00
Location: Jarrow, UK
Contact:

Post by Brianetta »

Rinnsal wrote:Ok, there is a little problem with that version: you wont be able to play it in multiplayer (it says different version). Anyone knowing how to solve this?
For Linux,

Code: Select all

RELEASE=<version> make
For example, RELEASE=r5632 make. Or the very slightly longer way:

Code: Select all

make RELEASE:=<version>
For other environments, set the variable RELEASE by whichever means is appropriate.
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
Rinnsal
Engineer
Engineer
Posts: 27
Joined: 18 May 2006 10:39
Contact:

Post by Rinnsal »

The problem is im using a little "hack" to set the revision number (Setting the NO_REV). And the solution was: making the string a bit shorter(was 5227 TerraGenesis Perlin before, now 5227TGP). Just uploaded that version and it works for me.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Don't do that. That'll (if my rather hazy memory of the network code is accurate) break joining by people with "norev000" versions.

... Though maybe that's a feature.
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
User avatar
Thief^
Route Supervisor
Route Supervisor
Posts: 469
Joined: 10 Oct 2004 00:11

Post by Thief^ »

Aren't you supposed to set REV_HACK? I'm confused now.
Melt with the Shadows,
Embrace your destiny...
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

For MSVC builds, #define WITH_REV_HACK. For make/gcc builds set RELEASE.
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
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Post by richk67 »

Radically new version now available in the TGP branch, and in the MiniIN branch (compile due Mon 10am CEST).

KUDr has spent some time developing optimisations to the routine to speed things up a bit ;) A 2048x2048 terrain is built in under 5 secs; of course, populating it with towns and industries is appallingly slow still, but we'll get round to that!

I was initially reluctant to abandon my own routines, given the amount of time invested; but his maths was way better, and the crunch came when I did some comparisons. I couldnt find ANY aspect of my terrains that *I* felt were better... many many thanks to KUDr for willingly working with my views/opinions as the code developed. I think the new terrains look fantastic. :)

Hope you all agree; three cheers for KUDr!! :)
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
StopRightThere
Chief Executive
Chief Executive
Posts: 761
Joined: 18 Dec 2005 20:10
Location: United Kingdom

Post by StopRightThere »

richk67 wrote:Hope you all agree; three cheers for KUDr!! :)
Yes! But don't forget about yourself! :lol:
Bye Bye OpenBVE :(
Official TT-Hot young ginger Doctor Who assistant FanClub
Formerly known as AdditionalData
User avatar
XeryusTC
Tycoon
Tycoon
Posts: 15415
Joined: 02 May 2005 11:05
Skype: XeryusTC
Location: localhost

Post by XeryusTC »

Is it possible to download a seperate version of TGP? I don't really like that I have to use all the other patches too when using the MiniIN branch (no offence).
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)
Image
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
Image Image Image Image Image Image Image
Xaroth
Engineer
Engineer
Posts: 103
Joined: 01 May 2006 09:09

Post by Xaroth »

richk67 wrote:
Thief^ wrote:
richk67 wrote:The main thing now is to speed up the routine by eliminating the pow() function.
If you are raising one int to the power of another (small) int then writing you own pow function with a loop might be faster. At least it was in my tests a year ago.
Unfortunately it is floating points to an integer power.

My 2048x2048 map was generating in 24 secs before replacing the pow() function, and after replacing it with a lookup table (since the values were constant), it only took 7-8 secs.

KUDr has a high speed routine that reduces it to ~4.5secs, and I think Shaman has an even faster one. However, it becomes academic on 2048x2048; since it takes upwards of 1 minute to place the towns and industries on the map, the fact that my routine is 3 secs slower than the others on generation is not important IMO.

The latest version is available in its own branch; svn://svn.openttd.org/branch/TGP.
Bare minimum (aka no smoothing, no funky edges etc, no industry placement) will get you a near-zero creation time, the thing that slows it down is what comes after it..
for instance, the 'real' smoothing thing calls the noise generator 4 times compared to the 1 time it does now, that means it'll take 4 times longer to make a map.

Try running time tests, and see at which point it takes too long to generate (I can try converting tgp to full C# to test it myself, but by the time i got that ou guys will have done it a million times allready), and then see what part needs to be fixed.

@Xery: TGP is under /branch/tgp/ .. dunno if it has any miniIN things on it, doubt it (since it'll be a miniIN copy then :P )
User avatar
XeryusTC
Tycoon
Tycoon
Posts: 15415
Joined: 02 May 2005 11:05
Skype: XeryusTC
Location: localhost

Post by XeryusTC »

Xaroth wrote:@Xery: TGP is under /branch/tgp/ .. dunno if it has any miniIN things on it, doubt it (since it'll be a miniIN copy then :P )
Thank you :).
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)
Image
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
Image Image Image Image Image Image Image
User avatar
uzurpator
Tycoon
Tycoon
Posts: 2226
Joined: 10 Jan 2003 12:21
Location: Katowice, Poland

Post by uzurpator »

question:

When will this thing be added to the "offical" nighty?
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 6 guests