New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No support for NRT tunnels #79
Comments
Original frosch spec includes tunnels. https://wiki.openttd.org/Frosch/NotRoadTypes#Tunnel [digging] I don't see tunnels in the nfo spec or https://wiki.openttd.org/NewGRF_Specification_Status#OpenTTD_1.10 [further digging] I don't know how action 3 is resolved, but tunnel is missing for RoadTypeSpriteGroup: Whereas it's present for RailTypeSpriteGroup: https://github.com/OpenTTD/OpenTTD/blob/b769eb30c43ccbc4e60b8b7df024253ac55d2265/src/rail.h#L43 |
I don't see any use of overlays when a road tunnel portal is drawn |
@glx22 so is your conclusion that there's no support in OpenTTD for custom road (or tram) tunnel sprites? That's my understanding, from reading src. OpenTTD ticket needed? |
Yes that's my understanding, only catenary overlays are supported, both in openttd and nml. BTW example on https://newgrf-specs.tt-wiki.net/wiki/NML:Roadtypes is wrong, there's no "tunnels" callback |
Thanks, fixed. |
Roadtypes do not include tunnels for the same reason they do not include bridges and stations. |
@frosch123 Ok, so the idea was that roadtypes were not going to have the ability to provide custom tunnel entrances like railtypes do, in favor of waiting for a whole new schema of ground types? I love the spec proposed there, but with all due respect it sounds like another huge project which is years away. Meanwhile NRT is already going "live" in a month or so, and it would be nice in the meantime to at least have a basic implementation to provide some custom tunnel sprites similar to railtypes. Is that at least open to consideration? |
For NRT tunnels, the blocker is that there's no rationale for determining whether to draw the tram tunnel, the road tunnel, or overlap sprites for both on the same tile. :) If both the road type and the tram type on the tile provide tunnel sprites, I can't envisage that looking good. With catenary, both the road type and the tram type can provide the sprites, and authors need to make sure that doesn't look bad by keeping catenary sprites simple so they can be combined. That's going to fail sometimes, but at least it allowed NRT to be implemented. But for tunnels I can't figure out a way to use the same approach and have any hope of a good result :) |
Ok, I guess I can understand the issue with drawing the portals, so how about a callback for just the road/tram surfaces, not including the "structure"? That is definitely in-scope of NRT and doesn't involve any conflict of which sprite to draw over another. That at least would allow for some very basic control of tunnels for NRT authors until something better comes along :) |
Tunnels already draw the normal road/tram overlay, just like rail types also do. Why would they need to be different? |
Tunnel portals are quite narrow, so the normal road tiles sometimes overlap the sides of the tunnel (essentially the same reason why bridges have special overlay sprites, to make them "fit") . It would also allow for shadows/lighting inside the tunnel for better effect, and just to make things prettier in general :) |
+1 to this request, just being able to use a different overlay sprite for the road in the tunnel entrance would be 95% of the way there, even without different portals.
The road in the tunnel may need to be narrower, different marked, shaded, etc. That's why we have the option to provide different (or no) overlays for rail types. |
It seems silly and inconsistent for railtypes to be able to provide their own tunnel portal sprites, but not roadtypes. It would be nice to specify different tunnel graphics for modern highways, old dirt roads, and metro tram tracks for example, just like you see in railtype GRFs with modern high speed lines, old branchlines and metro tracks. As for the problem of which tunnel gets drawn in cases of both road and tram, simply draw the road tunnel if a road or road+tram is present, and draw the tram tunnel when only the tram track is present. |
The fact that this grahical issue is not solvable seems like a bug. It also has nothing to do with the tunnel portal itself necessarily, as the provision of a custom road overlay would be enough to solve it. Please reconsider adding this feature to the NRT spec. EDIT: I have been informed that the latest dev version of NML supports the road tunnel overlay . While it doesn't solve the portal issue, it does allow to solve the issue of wide roads overlapping the portal. |
Currently the NML language has no support for providing tunnel sprites for roadtypes or tramtypes. Inclusion of both the "tunnels" and "tunnel_overlay" callbacks for these features would be ideal to allow authors to complete their NRT NewGRFs in time for OpenTTD 1.10.
The text was updated successfully, but these errors were encountered: