Surranding aware tram stations
Moderator: Graphics Moderators
Surranding aware tram stations
Hello,
I have coded buildings and objects but never stations and was wondering about one possibility.
Is it possible for a tram station to sense what is on the surrounding tiles and choose the graphic accordingly?
I have an idea to base metro network on trams and tunnels such that tunnel entrances are not visible in the game when station is next to the tunnel entrance.
This would allow to hide metro stations on public squares or even between the houses without extra tiles.
I have coded buildings and objects but never stations and was wondering about one possibility.
Is it possible for a tram station to sense what is on the surrounding tiles and choose the graphic accordingly?
I have an idea to base metro network on trams and tunnels such that tunnel entrances are not visible in the game when station is next to the tunnel entrance.
This would allow to hide metro stations on public squares or even between the houses without extra tiles.
Re: Surrounding aware tram stations
Yes, it is possible. However, you can only query the tile class of other features and no other details; act2 var 0x67 will let you check for nearby tunnel entrances.luxtram wrote: 12 Aug 2024 12:38 ... Is it possible for a tram station to sense what is on the surrounding tiles and choose the graphic accordingly?
Sample metro station ...
Re: Surranding aware tram stations
Thank you!OzTrans wrote: 13 Aug 2024 00:32Yes, it is possible. However, you can only query the tile class of other features and no other details; act2 var 0x67 will let you check for nearby tunnel entrances.luxtram wrote: 12 Aug 2024 12:38 ... Is it possible for a tram station to sense what is on the surrounding tiles and choose the graphic accordingly?
Sample metro station ...
Is this some dynamic thing that shows different tiles when there is a train?
Re: Surranding aware tram stations
No it is not. The first image shows the station normally [all metro train activity is hidden]. The second image shows the station in transparency mode; i.e. it reveals the metro station, but all other station furniture is not shown. This station is just a prototype and not quite finished yet. I have plans to add a glass roof for the below ground version, that would then make train activity visible; as well as make a version on level ground and elevated.luxtram wrote: 15 Aug 2024 14:18 Is this some dynamic thing that shows different tiles when there is a train?
Re: Surranding aware tram stations
Interesting - but the metro is based on "tram tracks" not "real railway", as there are two metro trains on a single tile with two tracks, right?!?OzTrans wrote: 15 Aug 2024 23:41 No it is not. The first image shows the station normally [all metro train activity is hidden]. The second image shows the station in transparency mode; i.e. it reveals the metro station, but all other station furniture is not shown. This station is just a prototype and not quite finished yet. I have plans to add a glass roof for the below ground version, that would then make train activity visible; as well as make a version on level ground and elevated.
Also, the metro is at level -1 relative to adjacent terrain, right? How did you solve the problem with the sloped tiles next to the track then?!?
There are some decorative sets with overlaps but they do not work as nicely as in your example ...
Re: Surrounding aware tram stations
Correct, this is a tram type implementation, done with roadstops. Requires less space in a packed city. May be, one day, I'll do a Rail Station one too. With rail stations, you need to deal with signalling too.ebla71 wrote: 15 Aug 2024 23:59 Interesting - but the metro is based on "tram tracks" not "real railway", as there are two metro trains on a single tile with two tracks, right?!?
The slopes [also called embankment] are covered with simple non-track roadstop tiles; the tile in front of the tunnel entrances are roadstop waypoints [the one with the little building]; easier that way, because the tile above of the tunnel entrances is overlapping; a tricky bit on the southern end.Also, the metro is at level -1 relative to adjacent terrain, right? How did you solve the problem with the sloped tiles next to the track then?!?
Coding of complex Roadstops is particularly difficult, as there is a lack of variables; especially those corresponding rail type ones, like 0x40/41/46/47.
Thank you; I don't really like overlapping graphics myself, I try to avoid them if at all possible; it can cause a lot of glitches.There are some decorative sets with overlaps but they do not work as nicely as in your example ...
Re: Surrounding aware tram stations
But still the road stops creatively used to cover the tunnel entrances feature some kind of overlap, right?OzTrans wrote: 16 Aug 2024 00:49 The slopes [also called embankment] are covered with simple non-track roadstop tiles; the tile in front of the tunnel entrances are roadstop waypoints [the one with the little building]; easier that way, because the tile above of the tunnel entrances is overlapping; a tricky bit on the southern end.Thank you; I don't really like overlapping graphics myself, I try to avoid them if at all possible; it can cause a lot of glitches.There are some decorative sets with overlaps but they do not work as nicely as in your example ...
Does that only work left/right (north/south) or also top/bottom (east/west)?!? Which means you will need four roadstops to cover all possible tunnel orientations, right?
And another question: Why did you opt to cover the slopes with non-track roadstop tiles, not decorative/landscaping tiles - to avoid mixing stop/station and other objects in a single NewGRF?!?
Re: Surrounding aware tram stations
Yes, there is an overlap of the tunnel entrance tile. To cover all 4 tunnels, I only use 2 road-stop IDs, one for the track in front of the tunnel and one for the side tiles to cover the slopes. In all there are 5 tiles for each tunnel, but only using 2 IDs.ebla71 wrote: 16 Aug 2024 01:33 But still the road stops creatively used to cover the tunnel entrances feature some kind of overlap, right?
Does that only work left/right (north/south) or also top/bottom (east/west)?!? Which means you will need four road-stops to cover all possible tunnel orientations, right?
See below : the image shows just the tunnel overlap tile for all possible directions. The player only needs to get the direction right. If the tile is placed in the wrong direction, or there is no tunnel, the tile will show a red-cross instead of the overlap. All done with one single road-stop ID.
Next : this image below shows on the right side, the slopes on either side of the tunnel being covered. On left side, the slopes on either side of tunnel overlap tile covered too. Once, you have that 2x3 covereage, station furniture will appear. Again, all the covering is done with a single road-stop ID.
Why does this all work ? It is all in the magic of coding.
You can cover side slopes with anything; bus- tram-stops, rail stations, roads, tram tracks, landscape or any flat object tile. I prefer to keep things on the same menu, therefore the entire station complex can be built with road-stop tiles in the same tram construction menu. Players may be free to use any other suitable decorative/landscaping tile, including nothing [slopes may be built over by the city with houses then, provided there is a road nearby].And another question: Why did you opt to cover the slopes with non-track road-stop tiles, not decorative/landscaping tiles - to avoid mixing stop/station and other objects in a single NewGRF?!?
There are no issues with having multiple features in the one GRF. I could have done covering side slopes with objects, but why forcing players to switch construction menus, if that is not necessary. Using non-track road-stop tiles expands station catchment area too. Side slopes can also be covered with a bus/tram stop, after all a metro station is usually a transit hub, where bus/tram services drop off passengers to take the metro.
Re: Surrounding aware tram stations
Thanks for the explanation - indeed very clever, I draw my hat to you.OzTrans wrote: 17 Aug 2024 00:27 Yes, there is an overlap of the tunnel entrance tile. To cover all 4 tunnels, I only use 2 road-stop IDs, one for the track in front of the tunnel and one for the side tiles to cover the slopes. In all there are 5 tiles for each tunnel, but only using 2 IDs.
Agree on keeping things together in one menue, was just asking for the rationale behind it (technical vs. ease of use)
Would be lovely to have that for "normal" rail also.
Re: Surrounding aware tram stations
I have plans to do that, when I refurbish 'Gare centrale de Montréal'. Gare Centrale is an underground terminus railway station, but a couple of platforms will continue through 'Tunnel du mont Royal' in a north-westerly direction and used by REM [Réseau express métropolitain] services. REM is the Rapid transit system in the Greater Montréal area and all in stadard gauge.
Who is online
Users browsing this forum: No registered users and 2 guests