New rail geometry
Posted: Sat May 30, 2015 4:46 pm
The current rail geometry isn't all that bad, but there are some (considerable) annoyances:
- One diagonal straight track segment required between two curve segments bending in the same direction.
See simple fix for the ugly rail circles (viewtopic.php?f=6&t=10340).
- No narrow s-bends, but narrow parallel track possible coming from diagonal direction.
- Distance between parallel tracks not uniform in diagonal versus horizontal/vertical direction (also too narrow or too far)
- The train is not centerd on the rail, and does not fit the grid along it's length.
- Track pieces are only buildable on every second tile, not everywhere.
- Unrealistic sharp curve radius for high speeds.
The new rail geometry is designed to have these properties:
- No placement restrictions for the most basic piece, the horizontal/vertical straight track.
- Diagonal track nearly as good and versatile as horizontal/vertical track.
- S-bends to connect even 1-tile off situations, also for diagonal track.
- Preferably done by adding a 22.5° diagonal.
- More realistic train and track proportions.
Railtrack
Currently, there is 48 px wide rolling stock on a 35 px track gauge (both meassured in normal zoom, 32 px per tile) and distance between tracks is 2 tiles. Real track normal gauge is 1435 mm meassured from the inside of the rails, so about 1.5 m. Rolling stock is more or less 3 m wide – twice the track gauge. (Broad gauges also tend to have wider rolling stock.) Track distance is about 4.5 meters, less on old/slow tracks, more near stations – triple the track gauge. So to make it good looking (read: somewhat proportional) in the game, the track gauge should be narrower, or the train should be bigger as should be the distance between tracks. At the very least, the train should be centered on the track... I think the train should be 60 px wide (just short of 2 tiles), and the distance between tracks should be 3 tiles. Diagonal track can be build in a very similar distance (2,8), that's a plus. But two tracks 3 tiles apart, 2 tiles wide, that's 5 tiles with one inbetween - no possibility to cross with underground belts. That would require wider track distances. The one tile between tracks is useful for signals, though.
Curve Radius
Current curve radius is 10 tiles, which translates to 200 m at train proportion (48 px is 3 m, so 1 tile is 2 x 2 m) and 140 m at track proportion (35 px is 1.5 m, so 1 tile is 1.4 x 1.4 m). In the real world it's at least 300 m on mayor, 180 m on minor and 100 m on industry connecting track. All with strict speed restrictions. At 160 km/h / 100 mph, the needed radius is well above 600 m. So for slow speed, the current radius isn't unrealistic, but very much so for high speed.
When fitting rail geometry to a grid, you have to deform the curves in such a way, that both their ends fit the grid, but multiple curves together still look round. No work for 90° curves, more complicated for smaller angles. It works better for some radii than for others. To facilitate the s-bends, the curve needs to be split at half the prallel track distance you want to bridge (red lines). These split points themselves match the grid well for the two chosen radii, and they both match more or less the 3:-1 gradient (light grey lines) that is just plain lucky. The 1 tile off s-bend now can only be done with the small radius, but I think that's acceptable. The actual split point for the two curve pieces is moved towards the 22.5° angle. This adds a whole bunch of complexity for the implementation, since there are now two variations for the end of the curve (to diagonal or continue curve), but simplifies building complexity and it simply looks better, when the two curve pieces are nearly the same length.
Without further ado, I present the very versatile and maybe much too complex The straight segments all have about the same length and apart from the two special cases, everything fits the grid. The 1:3 gradient is the linchpin in the whole construction. One piece of it moves one tile further up or down in horizontal/vertical direction, thus allowing full placement freedom, and a whole tile diagonally in diagonal direction. Therefore there is just no sensible way to bridge diagonal parallel track which is a half or 1.5 tiles off (measured diagonally). But that is much to close anyway and since the horizontal/vertical direction should be the most versatile, I restricted the placement of the diagonals to every second tile. One caveat though, this restriction transfers to the curves. On the other hand, in combination with the 3 tile parallel track distance, this forces for attractive (same radius) parallel curve building. The inner curve needs to be started one tile earlier and after 45° it also ends 1 tile later, the track distance is more or less preserved.
I should stop the talk. What do you think about it? Questions and comments please.
- One diagonal straight track segment required between two curve segments bending in the same direction.
See simple fix for the ugly rail circles (viewtopic.php?f=6&t=10340).
- No narrow s-bends, but narrow parallel track possible coming from diagonal direction.
- Distance between parallel tracks not uniform in diagonal versus horizontal/vertical direction (also too narrow or too far)
- The train is not centerd on the rail, and does not fit the grid along it's length.
- Track pieces are only buildable on every second tile, not everywhere.
- Unrealistic sharp curve radius for high speeds.
The new rail geometry is designed to have these properties:
- No placement restrictions for the most basic piece, the horizontal/vertical straight track.
- Diagonal track nearly as good and versatile as horizontal/vertical track.
- S-bends to connect even 1-tile off situations, also for diagonal track.
- Preferably done by adding a 22.5° diagonal.
- More realistic train and track proportions.
Railtrack
Currently, there is 48 px wide rolling stock on a 35 px track gauge (both meassured in normal zoom, 32 px per tile) and distance between tracks is 2 tiles. Real track normal gauge is 1435 mm meassured from the inside of the rails, so about 1.5 m. Rolling stock is more or less 3 m wide – twice the track gauge. (Broad gauges also tend to have wider rolling stock.) Track distance is about 4.5 meters, less on old/slow tracks, more near stations – triple the track gauge. So to make it good looking (read: somewhat proportional) in the game, the track gauge should be narrower, or the train should be bigger as should be the distance between tracks. At the very least, the train should be centered on the track... I think the train should be 60 px wide (just short of 2 tiles), and the distance between tracks should be 3 tiles. Diagonal track can be build in a very similar distance (2,8), that's a plus. But two tracks 3 tiles apart, 2 tiles wide, that's 5 tiles with one inbetween - no possibility to cross with underground belts. That would require wider track distances. The one tile between tracks is useful for signals, though.
Curve Radius
Current curve radius is 10 tiles, which translates to 200 m at train proportion (48 px is 3 m, so 1 tile is 2 x 2 m) and 140 m at track proportion (35 px is 1.5 m, so 1 tile is 1.4 x 1.4 m). In the real world it's at least 300 m on mayor, 180 m on minor and 100 m on industry connecting track. All with strict speed restrictions. At 160 km/h / 100 mph, the needed radius is well above 600 m. So for slow speed, the current radius isn't unrealistic, but very much so for high speed.
When fitting rail geometry to a grid, you have to deform the curves in such a way, that both their ends fit the grid, but multiple curves together still look round. No work for 90° curves, more complicated for smaller angles. It works better for some radii than for others. To facilitate the s-bends, the curve needs to be split at half the prallel track distance you want to bridge (red lines). These split points themselves match the grid well for the two chosen radii, and they both match more or less the 3:-1 gradient (light grey lines) that is just plain lucky. The 1 tile off s-bend now can only be done with the small radius, but I think that's acceptable. The actual split point for the two curve pieces is moved towards the 22.5° angle. This adds a whole bunch of complexity for the implementation, since there are now two variations for the end of the curve (to diagonal or continue curve), but simplifies building complexity and it simply looks better, when the two curve pieces are nearly the same length.
Without further ado, I present the very versatile and maybe much too complex The straight segments all have about the same length and apart from the two special cases, everything fits the grid. The 1:3 gradient is the linchpin in the whole construction. One piece of it moves one tile further up or down in horizontal/vertical direction, thus allowing full placement freedom, and a whole tile diagonally in diagonal direction. Therefore there is just no sensible way to bridge diagonal parallel track which is a half or 1.5 tiles off (measured diagonally). But that is much to close anyway and since the horizontal/vertical direction should be the most versatile, I restricted the placement of the diagonals to every second tile. One caveat though, this restriction transfers to the curves. On the other hand, in combination with the 3 tile parallel track distance, this forces for attractive (same radius) parallel curve building. The inner curve needs to be started one tile earlier and after 45° it also ends 1 tile later, the track distance is more or less preserved.
I should stop the talk. What do you think about it? Questions and comments please.