Conversation
|
The current test route (Highly stripped down version of Odaykufan's test route): This will switch the player's train onto Rail 1 at 275m, and correctly derail it at 500m when the track ends. |
|
This test route implements a switched passing loop, changing first to rail 1, then to rail 2, before finally back to the first rail. Reversing through the switches also works correctly now. (N.B. Needs the three commits on the master branch from today, but these aren't directly relevant to the switch logic, more to multiple rails) |
cc81e8d to
cd51cfe
Compare
b734a52 to
3f5ad6a
Compare
Requirement for #329 NOTE: Need to provide a lookahead function for track switching in the linked PR
bad6395 to
438f090
Compare
|
Need to finish and merge this, but shouldn't be difficult. Will look again this week. The new imagebox menu additions should allow us to implement a nice GUI, which was the primary reason this stalled. |
|
If the Change Switch menu key is set, this branch now functions properly, and our run-round loop above can actually be used. TODO:
FLAWS:
FUTURE??:Would be interesting to see what adding an auto-generate option did, as per BRR. Could probably do something along these lines:
|
|
After some fiddling, it seems that a working map will be an absolute PITA, without some serious refactoring in the main parser. |
|
I think the UI you showed is really great! |
|
This is now usable with the proposed dialog above if built from this branch, but requires a lot of polish to look nice. I've settled on blue for the player rail highlight at the minute, as it needs to be nicely distinct from the normal track. Did try black, but that wasn't distinct enough. TODO:
Some of these, and behaviour altering the signalling system may well get implemented at a later date after merging, just need to keep on noting them down so I don't forget them..... |
|
UI is now working relatively nicely. |
|
I watched the video and understood what it meant. |
|
Not sure, I'd have to think about that. It sounds more like what you want is a speed parameter for switches, which sets the max allowable speed per route. |
|
If we change the 70km/h limit turning machine suddenly while traveling at 320km/h on a Shinkansen, the train will derail and overturn. |
These are all new code, ought to have been done before...
|
Now that's an interesting idea, but I think to be implemented a little later- At the minute, this is just trying to get some of the basic mechanics working. I think in that case, you'd probably want a speed lock and a position lock. |
|
The ATC example is an example of the concern that this could happen if the driver were allowed to change the route freely. Simply, in addition to a function that allows route creators to drive on designated routes, I believe it is necessary to implement a command that prohibits to drivers from changing points by route builder. |
|
The UI is essentially finished now I think, although I'm considering using a multi-line textbox for the labels on the left, along with a 'No switch selected' message. Other thoughts:It's clear (unless we introduce textual rail labels with this) that just the rail number isn't the best thing for showing the current setting of the switch. Easiest way to handle this is likely to add two additional optional parameters to our switch command, with textual descriptions in them. Either immediately after the rail index or together at the end- Will add these probably tomorrow. Station names probably need hiding in favour of track distances, so we have the distance at the top and bottom. |




This is a followup to #326 , and introduces the ability for the player's train to run on other rails within the world.
Heavily WIP.
Current Usage:
Track.Switch firstRail; secondRail; initialSetting; switchName; firstTrackName; secondTrackName
Creates a standard facing switch.
Track.SwitchT firstRail; secondRail; initialSetting; switchName; firstTrackName; secondTrackName
Creates a trailing switch.
Flaws:
N.B. These will change, just need the correct code implementing & thinking about.
Only works for branching switches.No direction detection.Running past a .RailEnd command is likely to crash.Needs a way to change switches. (Leverage New: add touch elements #317 to highlight the switch?)Needs sprung return points adding (simples....)Point sound events are not generated at the minute on other tracks.To Test: