Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

(MUCH READING) Can I have your opinions on my automatic rail network?

Asked by
Trew86 175
5 years ago
Edited 5 years ago

Hi guys, today I completed a prototype of an automatic train traffic control system. Those of you who aren't train nerds probably don't know what these things are (hopefully there are some train nerds here), but this system is supposed to account for everything: relay at terminals, switching based on the train's service, and keeping trains from colliding whatsoever. The system even responds to when a train is deleted, since the game has de-spawning trains.

Making the system took me many do-overs, because it became conditionals on conditionals, on conditionals, and so on. Just extremely long scripts, even with variables. Module scripts helped a lot (that's what the system relies on now), but it still has a good amount of separate module scripts, and some of the server scripts are pretty long as well.

I know, long scripts are probably just a necessary evil for this concept. However, one thing I am unsure of is if the setup is worth while. You see, the system relies on a HUGE hierarchy of folders and different Value objects (BoolValues, ObjectValues, etc.). You can see them here:

https://postimg.cc/gallery/2k7gmzaku/

Script-wise, it's maintainable (despite the scripts being really long) because only a handful of scripts account for all the sensors on the tracks (since the sensors are categorized based on their responsibilities). However, the hierarchy that the system relies on has to be set up exactly right, or it won't work.

There are object values for paths, paths that are blocked when a train goes on another path, relay tracks, etc. It is possibly to make any railway system on ROBLOX work following the setup method, but following that setup is super complicated.

This was a lot of reading. If you made it here, thank you. Basically my system works well so far, but I want to make sure it's easy for another person to follow to make his/her own railway network. Should I stick with this system of a huge hierarchy, or do you think there is a better way of failsafe train traffic control?

Of course, the place can be discovered here. I just opened it.

https://www.roblox.com/games/2645547365/Train-Testing-Grounds

Have a great 2019.

2
Honestly I looked over it and spent a good 10 minutes on the game and I really do like the idea and concept of this system. I think that this system could be used in a very good way because I've never seen the emergency brake toggle like this one does according to the script. I love it, and I say it has to be this complex to work this greatly. Happy New Years to you as well. Festive_Boyo 7 — 5y
0
Next thing we need is Future Is Bright. Mirzadaswag 110 — 5y

Answer this question