[patch] More Map Settings v2 (r14439)

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

Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: [patch] More Map Settings v2 (r14439)

Post by Alberth »

Roujin wrote:So... who's in the mood for writing YAMAGEN (Yet Another MAp GENerator)? :D
For the benefit of scenario's and height maps, it may be better to implement (exact or random) placement of everything by reading generator commands or so from a file.
The generator problem can then be shifted to an external program.
User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: [patch] More Map Settings v2 (r14439)

Post by CommanderZ »

New version!

- it allow player to set count of towns instead of total population
- the algorithm was code-wise vastly simplified

You can now set the count of towns to any number between 1 and 5000 :lol:
Attachments
population3.png
population3.png (35.7 KiB) Viewed 4325 times
custom_town_count_v1.zip
Win32 executable
(2.54 MiB) Downloaded 124 times
costom_town_count_v1.patch
Patch against r14458
(23.1 KiB) Downloaded 129 times
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: [patch] More Map Settings v2 (r14439)

Post by Terkhen »

I'm going to try it immediately!
nezzybaby
Traffic Manager
Traffic Manager
Posts: 141
Joined: 30 May 2007 12:43

Re: [patch] More Map Settings v2 (r14439)

Post by nezzybaby »

I LOVE YOU

It works perfectly, I may never download another version of openttd, it is now complete.

Thank you so much!!!
PhilSophus
Chairman
Chairman
Posts: 776
Joined: 20 Jan 2007 12:08
Location: Germany

Re: [patch] More Map Settings v2 (r14439)

Post by PhilSophus »

belugas wrote:
Octopuss wrote:AFAIK it doesn't and it's a shame. We really should talk the devs into reworking the damn town placement, because at the moment and ever since, it's totally random.
Well.. yes, it is purely random. And there is absolutely no reason whatsoever that it would have to change. Sorry. But that's how it is.
And by purely random you obviously mean distributed by a Poisson point process, i.e. uniformly distributed. Any other random distribution is also purely random (if you accept pseudo-randoms generated by a linear congruential generator to be random at all for a moment. Is there any effort to make the Mersenne Twister network-safe?).

Funny enough, I just read that the uniform distribution is perceived as slightly clustered by most people including me (clustering illusion).
"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008
User avatar
Octopuss
Traffic Manager
Traffic Manager
Posts: 135
Joined: 08 Mar 2004 20:20
Location: Czech republic

Re: [patch] More Map Settings v2 (r14439)

Post by Octopuss »

CommanderZ wrote:New version!

- it allow player to set count of towns instead of total population
- the algorithm was code-wise vastly simplified

You can now set the count of towns to any number between 1 and 5000 :lol:
You confuse me. Do you alway rename the patch or is this NOT a new version of original MMS, but something additional?
User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: [patch] More Map Settings v2 (r14439)

Post by CommanderZ »

It is a new version, but it lacks the water level feature for now, so I'm calling it differently.
User avatar
Octopuss
Traffic Manager
Traffic Manager
Posts: 135
Joined: 08 Mar 2004 20:20
Location: Czech republic

Re: [patch] More Map Settings v2 (r14439)

Post by Octopuss »

any news?
User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: [patch] More Map Settings v2 (r14439)

Post by CommanderZ »

I'm very busy nowadays. Busier than ever, sorry, I don't have time to even play games, not speaking of developing them :(
User avatar
Octopuss
Traffic Manager
Traffic Manager
Posts: 135
Joined: 08 Mar 2004 20:20
Location: Czech republic

Re: [patch] More Map Settings v2 (r14439)

Post by Octopuss »

Soo, when you have time, what are the plans for future versions? Or do you consider the patch complete?
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: [patch] More Map Settings v2 (r14439)

Post by Terkhen »

I'm using the v1 patch found at the first post. When using "Very high" water level at 2048 x 2048 maps, the map is created with no water at all. I have been tinkering with the HeightMapAdjustWaterLevel function at tgp.cpp and I found two variables (water_tiles and desired_water_tiles) that needed to be bigger. Here is the patch with my small changes. I hope it helps :)
Attachments
MMS_v1_r14993.diff
(9.31 KiB) Downloaded 76 times
User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: [patch] More Map Settings v2 (r14439)

Post by CommanderZ »

Oh, thanks :)

I still believe I will be able to finish this when my exam term is over :)
User avatar
Dimme
Transport Coordinator
Transport Coordinator
Posts: 277
Joined: 30 Jul 2008 12:42
Location: Trondheim, Norway

Re: [patch] More Map Settings v2 (r14439)

Post by Dimme »

I have been trying some stuff in the map generator lately. More precisely, trying to generate maps that looks like the western part of norway, with fjords, and an increase in height going from west to east. When doing that, I realized that the random distribution of towns is far from realistic on mountainous maps, many of my cities appeared in the eastern highland, above snow level.

I like Roujin's idea of having a dropdown:
Roujin wrote:Well, it could be a dropdown like the other dropdowns we already have for map generation.

Town placement
* Random
* Equal distribution
* Clusters

And maybe someone can think of additional options. Maybe something along the lines of "towns are only in the center of the map; the outer ring is reserved for industry".

So... who's in the mood for writing YAMAGEN (Yet Another MAp GENerator)? :D
A "realistic" setting could be made in the following way:

- First, we figure out (or guess) how the world distribution of cities is (how many are placed close to the sea, how many above a certain height, how much less likely is it to find a city above snow level etc.)
- Then we distribute the cities accordingly. Still random, so that clusters can appear. (If there is a need for determining the degree of clustering, that may also be a parameter, but it probably complicates things)
- Other possible parameters to review thoroughly may be the size distribution of cities and the correlation between size and position.

This new generator may of course have very different values for the given No. of towns than the original :)
Try my modular airports minigame!

Image
User avatar
Octopuss
Traffic Manager
Traffic Manager
Posts: 135
Joined: 08 Mar 2004 20:20
Location: Czech republic

Re: [patch] More Map Settings v2 (r14439)

Post by Octopuss »

CommanderZ wrote:Oh, thanks :)

I still believe I will be able to finish this when my exam term is over :)
It's about finishing, isn't it? :D Passed all of the exams I hope? :)
User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: [patch] More Map Settings v2 (r14439)

Post by CommanderZ »

Octopuss wrote:
CommanderZ wrote:Oh, thanks :)

I still believe I will be able to finish this when my exam term is over :)
It's about finishing, isn't it? :D Passed all of the exams I hope? :)
Still one left. I gonna pass it tomorow. I hope.
User avatar
Octopuss
Traffic Manager
Traffic Manager
Posts: 135
Joined: 08 Mar 2004 20:20
Location: Czech republic

Re: [patch] More Map Settings v2 (r14439)

Post by Octopuss »

Ok so I hope everything went the best way and we can be expecting updated version of this awesome piece of artwork :)
Hell, if it gets released I will start compiling my own builds again as this is absolute base of everything!
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 28 guests