Layered ground tiles for stations, buildings and ind. tiles
Posted: 27 Mar 2010 07:08
Since OpenTTD r18959 and TTDPatch 2.6 r2312, "layered" ground sprites are possible. This is especially useful in connection with OTTD´s new feature of "track types", and for preserving compatibility with TTDPatch lacking that "track type" feature.
However, the spec for the layered ground sprites feature is flawed. In fact, OTTD´s implementation has nothing to do with "ground sprites". Instead, it allows adding "building sprites" to the usual ground sprite, although the appropriate entry in the TTDPatch Wiki suggests otherwise:
Now, with the flawed OTTD spec, this is not possible. Inside the framework of this spec, one has to have the sprites for ground tile layers inside the building sprites action1 block.
The drawback of this scheme is that one has to provide the real sprites of those ground tile layers multiple times, or, if all sprites are put into a large action1 block, to use CB14 for sprite selection. Although this being the method of choice for large or complicated station structures, it is not suitable for smaller ones or for "fixed" station structures, for which the same layout will be re-used with different real sprites mapped to them.
I´ve discussed this with Csaboka and we came up with three possible solutions:
- we could use different specs in TTDPatch and OTTD with regards to that "layered ground sprites" feature,
- we could add a new flag to select between the two behaviours on a per-station basis,
- we could change the OTTD spec accordingly, i.e. all ground sprites should follow the "ground sprite rules" and not the "building sprite rules". The needed changes to TTDPatch would be easy.
From our discussion, the first two proposals don´t make sense at all. Especially the last one would complicate things for both developers and newgrf authors, and, in addition, it would need implementation in OTTD as well for compatibility reasons.
From our opinion, the third proposal would allow the most straighforward, flexible and efficient handling of layered ground tiles for stations, for use with all known "techniques" of station coding.
Are there any objections from OTTD developers against the third proposal?
regards
Michael
However, the spec for the layered ground sprites feature is flawed. In fact, OTTD´s implementation has nothing to do with "ground sprites". Instead, it allows adding "building sprites" to the usual ground sprite, although the appropriate entry in the TTDPatch Wiki suggests otherwise:
Since a long time, TTDPatch (and OTTD) allow to have custom ground tiles in an action1 block. Determining if a ground tile is a TTD sprite or a custom ground tile is done by checking var10. In this way, it´s easily possible to get custom ground tiles accessible from multiple areas in the station code, without real sprite duplication.TTDPatch Wiki wrote:Since OpenTTD r18959 you can draw multiple ground sprites for a tile, which is useful if you want to use the usual rail/grass/concrete groundtile, but still need to add features to it without using a new bounding box. [...] http://wiki.ttdpatch.net/tiki-index.php ... _layout_09_
Now, with the flawed OTTD spec, this is not possible. Inside the framework of this spec, one has to have the sprites for ground tile layers inside the building sprites action1 block.
The drawback of this scheme is that one has to provide the real sprites of those ground tile layers multiple times, or, if all sprites are put into a large action1 block, to use CB14 for sprite selection. Although this being the method of choice for large or complicated station structures, it is not suitable for smaller ones or for "fixed" station structures, for which the same layout will be re-used with different real sprites mapped to them.
I´ve discussed this with Csaboka and we came up with three possible solutions:
- we could use different specs in TTDPatch and OTTD with regards to that "layered ground sprites" feature,
- we could add a new flag to select between the two behaviours on a per-station basis,
- we could change the OTTD spec accordingly, i.e. all ground sprites should follow the "ground sprite rules" and not the "building sprite rules". The needed changes to TTDPatch would be easy.
From our discussion, the first two proposals don´t make sense at all. Especially the last one would complicate things for both developers and newgrf authors, and, in addition, it would need implementation in OTTD as well for compatibility reasons.
From our opinion, the third proposal would allow the most straighforward, flexible and efficient handling of layered ground tiles for stations, for use with all known "techniques" of station coding.
Are there any objections from OTTD developers against the third proposal?
regards
Michael