Re: AlpineClimate version 0.2 released

Marcin Grzegorczyk <[email protected]> Wed, 17 May 2006 15:10:10 +0200
Newsgroups gmane.games.ttdpatch.general
Message-ID <[email protected]>
Uwe Domaratius wrote:
> Daan Krantz wrote:
>> I would have fun with it if the 'random' map generator didn't generate 
>> the same map every time (for artic or in this case alpine) :(. It is 
>> always a map with 1 half in the snow and the other half in temperate. 
>> [...]
> 
> That's how the map generator for the alpine climate works, so it's not a 
> bug, but a feature. For tropic climate, the results are similar, but 
> with more water.

Well, not really.

For sub-arctic, the map is first shaped using TRGI sprites 52..84 (the 
same set as for temperate/toyland 'hilly' terrain), then a 
randomly-selected half is re-shaped using TRGI sprites 85..88 (special 
'highlands' mode).

For sub-tropical, the map is first shaped using TRGI sprites 52..61 
('very flat') with lots of water left, then a randomly-selected half is 
shaped again with the same set (but for much longer, so only little 
water is left), and then the other half is re-shaped using TRGI sprites 
52..88 ('mountainous').

Those height map sprites are placed at random locations (possibly 
mirrored horizontally and/or with axes swapped), and overlay each other 
(i.e. placing another height map sprite never decreases the altitude).

> In temperate it is even worse, you'll always get a flat 
> map with some lonely mountains placed on some not very random places.

I wonder what you mean by 'not very random'.  They're placed as randomly 
as one can get.

> Is there a way to get a map with a smoother transition from flat to 
> mountainous, except from creating a map in the editor?

You could try replacing TRGI sprites 85..88 with your own height maps 
with wider transition areas.  Frankly, I'm not sure how it'd work.  If 
you're inclined to try it, remember that you're limited to palette 
entries (height levels) 0..15, and that two adjacent pixels must not 
differ by more than 1 level (pixels sharing only a corner are not 
considered adjacent here).  You can change sprite sizes, though.

The 'crater' map example Michale mentions is still at 
<http://kufel.immt.pwr.wroc.pl/~mgrzegor/ttdpatch/misc/crater1.grf.zip>. 
  Decode it with GRFCodec to see how it works.

> [...] And it would also be nice to replace the 
> temperate lonely mountains by the massive mountainous areas of the 
> arctic climate if mountainous terrain is selected. Is that possible to 
> do in some way?

Some support from TTDPatch would be required.  A switch to override the 
terrain creation algorithm selection would be quite easy to implement; a 
more ambitious solution would make it possible to define one's own set 
of height maps (possibly more than TTD's 37) and plug them into TTD's 
algorithms.

-- 
Marcin Grzegorczyk

--
TTDPatch mailing list.  To unsubscribe from the list, send an email to
[email protected] with the body (not the subject) of the
email containing only the word "unsubscribe" (without the quotes).
For more info please see http://www.ttdpatch.net/maillist.html