Working on model control software - need some opinions and JavaScript devs!


k4kfh

Member
Let me preface this by saying I'm not entirely sure where to post this, so feel free to let me know if I need to move to another subforum.

I am working on a project to simulate prototypical controls for model trains. It is built to run in a browser, using only JavaScript/HTML/CSS (no server-side code). It communicates with JMRI via WebSockets, and thus works on any layout with JMRI. I am to the point now where the UI is really beginning to take shape, so I want to get some opinions from model railroaders since they are the people who would actually be using the software. I will get more into this below.

I also want to open up the project to other modelers who are into software or are good with physics problems, so I have open-sourced it on GitHub. If you know HTML, CSS, JavaScript, or are good with the physics of trains, I would love your help.


Developers, I don't have time to explain the structure of the entire program tonight, but I can answer questions as needed and I plan on writing up a detailed "map" of the inner workings of it soon. In short:
  • It communicates with a layout via the JMRI JSON WebSockets servlet, outlined here.
  • It uses special JavaScript constructor objects to provide a low-level decoder control system that the rest of the program "talks to". This means that once one of these "magic functions" has been written for a given decoder, the decoder will "just work". The entire program is decoder-agnostic aside from these functions.
  • I am using MaterializeCSS for the UI, and plan to build it all into a single HTML page with tabbed navigation. I want to keep it in one HTML page because then I don't have to reload WebSockets connections and such every time a user goes somewhere.
  • I plan to support tablets extensively, as I have one I'd like to use. Phones may or may not work due to a sheer lack of screen real estate, and of course computers will work just fine.
  • I would like to avoid server-side code so that it can be installed on the JMRI web server, as this makes it easy for non-techy users to set it up.
If any of that sounds interesting to you, I'd love your help.

Now, opinion time. Obviously to accurately simulate physics of a prototype locomotive, you need to choose what prototype locomotive you want. You'd also need to arrange them in the train, and add rolling stock to the simulation. This is done using a "train builder" tool, and I'm torn between two options for dealing with prototype locomotive settings:
  1. Base everything around the JMRI roster. This means once you set up information that binds a specific roster entry to a specific prototype locomotive, you just select that roster entry and all your crap is already configured for you. The upside to this is obviously simplicity, but the downside is that you cannot have multiple "bindings" for a single locomotive. If I use another method, you would be able to simulate the physics of any locomotive regardless of what locomotive the model is. If this doesn't really matter to most people, I'm fine with this option, but I want some additional opinions besides my own before I make a decision this big.
  2. Do a JMRI-independent selection system. The only thing that would be from the JMRI roster here is decoder information, which will automatically be read from the roster entry. (this is actually easier for me to do than a manual selection system for DCC decoders) When you set up your locomotives using the "train builder" tool, you'd have to click on them and manually configure what prototype locomotive it is.
  3. If there is need for both options, there is the possibility of doing a "hybrid" system where you can choose to use a "bundle" train item that already has everything configured, or add a custom one. This would be more complex, so if nobody cares I won't bother, but if that's what people want I'll happily build it in.

You don't have to be a developer to vote on this, I want everyone's opinion here. Please vote at http://strawpoll.me/5992088 and don't vote more than once.

And to taunt everyone, here are some screenshots of the current version of the software. :p I couldn't get the sizing to cooperate to post them directly on the forums, so I put them on an imgur album, found here.

I hope you guys like it so far! If any techy-type people want to try it out, you can download it and drop it on a web server and it should be kind of functional at this point. If you have problems I'm happy to help.
 



Back
Top