• Our booking engine at tickets.railforums.co.uk (powered by TrainSplit) helps support the running of the forum with every ticket purchase! Find out more and ask any questions/give us feedback in this thread!

Which programming language for railway project?

Status
Not open for further replies.

Misterblue

New Member
Joined
16 Jan 2022
Messages
4
Location
UK
Hi,

I am working for a heritage railway in the Shunting department. I am thinking of writing a program to help us plot the moves.
A typical move would be (see photo)

Loco moves from siding 3 to siding 1
Connects to Coach in siding 1
Reverses to siding 3
Moves to siding 2
Disconnects coach
Moves to siding 3

In doing so, the coach has been moved from siding 1 to 2.

What I want to achieve is to be able to drag and drop the locos and coaches in a graphics format, with the subsequent moves documented and output in a list similar to above.

Can anyone recommend which programming language would be best?
Can it be done in Python, would using Unity be better or are there better options?

Thanks

MB
Siding.jpg
 
Sponsor Post - registered members do not see these adverts; click here to register, or click here to log in
R

RailUK Forums

Flying Scott

Member
Joined
7 Aug 2022
Messages
16
Location
UK
What I want to achieve is to be able to drag and drop the locos and coaches in a graphics format, with the subsequent moves documented and output in a list similar to above.

Can anyone recommend which programming language would be best?
Can it be done in Python, would using Unity be better or are there better options?
The programming language used would depend upon the device that you are wishing to run the application on. Would you like to run it on a PC so that you can then print off the shunting instructions, or would you like to use it on a mobile device and read the instructions on that?

Most desktop applications are written in either C++ or C# depending upon the nature of the application. Applications which require performance, traditional desktop applications and most games are written in C++. Newer desktop applications are written in C# but can be a little slower in performance. Both languages have their advantages and disadvantages.

You don't necessarily need the Unreal or Unity engines to achieve the user interface, as you could implement it using the programming language alone. You would need to write the interface if you used C++, but I understand that C# can help you create it with less code writing.

Mobile applications are operating system specific and usually require using the respective SDK to build it.

If you are wishing to run it as a web based application, then something like HTML5 and JavaScript could be used to create the interface. You could get the code to process the shunt moves, or you could use server-side scripting such as PHP or Perl to assist, perhaps even storing the moves in a database for future use.

I hope this helps.
 
Last edited:

D821

Member
Joined
1 Sep 2021
Messages
624
Location
The Wirral
You could do that it many of the modern desktop or web programming languages. Perhaps a better way of looking at it would be to ask which language you're most competent in?
 
Last edited:

Misterblue

New Member
Joined
16 Jan 2022
Messages
4
Location
UK
Thanks for the replies.

I’m most competent with Python but am happy to get stuck into other languages. I haven’t seen anything like this written in Python though, but would be happy to be corrected.

Most likely I would prefer a PC application to start with.

Cheers,

MB
 

RailAleFan

Member
Joined
2 Jul 2014
Messages
316
Location
Midlands
Certainly have a good look into HTML5 / JavaScript for this, there's a Drag and Drop API all ready to go...

 
Status
Not open for further replies.

Top