Train Track - Troubles with Layout, Detection & Mapping

Hello All. I’m going to keep this short.

I have a bit of train track laid out in game, and I’m planning on making a train signalling system where there is a UI with the layout of the track, position of the trains and position of the signals. Signals are similar to traffic lights, the main note here is that they are distributed around the train track.

I’ve attached a picture of what I’m aiming for below - similar to the Stepford County Railway game.

If a train is between signals, its code should be displayed sat between the two signals (indicated by the yellow, green and red dots on the map).

What my main concern is where I need to generate this map of the train lines (the white lines). The company I work for is aiming to release this as a product, meaning it would be both time consuming and difficult to change the UI and settings for every customer.

I’m wondering if I’ll be able to generate these UIs based on the layout of the tracks and signals in game, without having to manually place them on the UI every time. I’ve been thinking of perhaps a marker system or something that stores track information, but I’m stumped as to how to reasonably and flexibly implement this.

I would really appreciate some input. Links to examples, docs and code snippets would be greatly appreciated.

Regards,
Samuel.

This looks very similar to SimSig. I like it.
I think that a good way would be to mark junctions, stations, and signals, with bricks of a certain name or colour.
Then a script could draw the UI according to the placed bricks, by means of a for i,v in pairs loop.

1 Like