Cities on heightmaps

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

Post Reply
Dakkus
Engineer
Engineer
Posts: 27
Joined: 07 Mar 2004 10:34
Skype: daccus
Location: Berlin, DE, EU
Contact:

Cities on heightmaps

Post by Dakkus »

I love playing a very large real map, such as the Europe (v1). However, since it's not possible to use NewGRFs in a scenario, there is no usable way of having cities in their correct places.
This could be fixed by using a pixel in a certain colour or grayshade for marking locations of town centres on a heightmap. This way the cities could be placed in their correct locations, even if they would then have incorrect names.
Also using three or five different colours or shades for different sized towns might make sense.

I'd suggest using colours #00000, #010101, #020202, #030303 and #040404 to mark the cities, leaving #050505 for "full black". Because of rounding, this should make no difference whatsoever to what is considered deepest sea. It is very simple to choose colours #000000 through to #040404 in GIMP by using the "pick areas by colour" tool (or whatever it is called in English), setting tolerance to 5.0 and choosing #000000 as the desired colour. Another possibility would be to have a separate layer (saveable as a separate image, if so preferred) for the city location pixels. This would allow for setting city size also by making differently sized marks instead of grayshades. One pixel for a village, a circle two pixels across (so, actually a square) for a bit larger town, a circle three pixels across for a town yet larger, etc.

Both solutions allow for making heightmaps both with and without city pixels, so that existing heightmaps will not be affected and it will remain easy making heightmaps without defining cities:
1) If there are several neighbouring pixels of #000000, assume the heightmap of not having cities predefined with pixels.
2) Alternatively, a pixel can be considered to show the location of a city only if none of the surrounding pixels are darker than, say, #0e0e0e. This requires coastal cities to be marked one pixel away from the coast, but this should pose no problems. This way reshading the seas from #000000-#040404 to #050505 becomes unnecessary.
3) If a separate layer is used, this becomes trivial.
The player may be allowed to ignore the city location information when creating a map from a heightmap.

I personally would love this feature!
Where have my euro notes travelled? *click* http://eurobilltracker.eu/
Hmm..?! From Portugal to Finland?
See it for yourself!
User avatar
Pyoro
Tycoon
Tycoon
Posts: 2558
Joined: 17 Oct 2008 12:17
Location: Virgo Supercluster

Re: Cities on heightmaps

Post by Pyoro »

Various such suggestions have been discussed before:
viewtopic.php?f=32&t=61140
https://wiki.openttd.org/Terkhen/Scenario_format

Personally I'd feel that something like that would be pretty great, too, since, as you mention, the GRF problem is a huge one for scenarios. But, well. Someone would need to actually code it ;)
Wahazar
Tycoon
Tycoon
Posts: 1451
Joined: 18 Jan 2014 18:10

Re: Cities on heightmaps

Post by Wahazar »

Actually there is patch for reading cities, industries and rivers from the text file.
Formerly known as: McZapkie
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
User avatar
skippern
Traffic Manager
Traffic Manager
Posts: 195
Joined: 30 Oct 2013 13:57

Re: Cities on heightmaps

Post by skippern »

If heat maps could be loaded from formats maintaining layers, a TIFF file can keep the normal heat map as visible background and use a transparent overlay map for cities and industries, but that would require a set of rules how to evaluate these additional layers


Sent from my iPhone using Tapatalk
Skippern
OpenTTD Mac user
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Cities on heightmaps

Post by Alberth »

A first specification exists https://wiki.openttd.org/Terkhen/Scenario_format
but no implementation, thus far.
Being a retired OpenTTD developer does not mean I know what I am doing.
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 19 guests