OpenTTD

Tasklist

FS#4573 - Railtypes: improve snow transition

Attached to Project: OpenTTD
Opened by Daniel Plaumann (dandan) - Sunday, 03 April 2011, 11:39 GMT
Last edited by andythenorth (andythenorth) - Friday, 01 September 2017, 08:13 GMT
Type Feature Request
Category NewGRF
Status New
Assigned To No-one
Operating System All
Severity Medium
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 1
Private No

Details

This is related to  FS#2071 .

The snow transition (especially with a variable snowline) has never really looked so great around rails and roads because, unlike ground tiles, rails and roads have only two stages: snow or no snow (see screenshot).

I think for rails coming from new railtypes, this could be improved without the need for more sprites: Since the new rail sprites typically only cover part of the tile, the tile underneath should not be restricted to only two stages. It would also look better to use the snowy rail sprites only on tiles that are completely covered in snow.

Technically this would require two changes:

1) The ground sprite under a new rail type should behave in the same way as an empty ground tile.
2) Variable 40 for railtypes should only report 4 (=on or above snowline) when in the completely snowy region.

These two suggestions are kind of independent. If 1) cannot easily be done because of the way information is stored in the map array (I have no clue), then 2) would still be an improvement IMO. It is also possible that 1) without 2) would work better. Any thoughts?
This task depends upon

Comment by Ingo von Borstel (planetmaker) - Monday, 04 April 2011, 13:43 GMT
In principle 1) is possible, but it might want to be embedded in the bigger context of FS #2071. IIRC SmatZ had an interesting patch on this topic, but I don't know anymore the details of the discussion around it.
Comment by andythenorth (andythenorth) - Friday, 01 September 2017, 08:13 GMT
Railtypes have var 40, but lack any equivalent to industry var 60, which includes tile height.

https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Railtypes#Terrain_type_.2840.29
https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Industry_Tiles#Land_info_of_nearby_tiles_.2860.29

If tile height is known, partial snowing can be calculated by subtracting from global snowline var. This mechanic is proven for industries in FIRS and other places.

This does look worth solving, IMHO, but I don't know whether it has performance or MP implications.

Loading...