locoThrottleJS - prototypical model train throttle system


k4kfh

Member
Hey guys, just wanted to show off a software I've been working on. If you've seen Bruce Kingsley's "Ultimate DCC Throttle" project, which has become famous over the last few months, you can think of my program as a tool to make similar experiences accessible to everyone. It's a web app built in HTML and JavaScript, with no server-side code (right now, hoping to keep it that way) and communicates with JMRI via WebSockets.

Right now, I'm trying to perfect the physics engine, but I got a simple system done where you have a notched throttle and wind resistance, friction, and of course, locomotive's motive force is simulated. Next on my list is wheel slip, then brakes, and once I get that done I will likely start focusing a bit more on the user experience.

If you are a developer, I'd love your help and input on this. You can contribute at https://github.com/LocoThrottleJS and you can read about it on my blog. I only have one post about it right now, but I will be posting more as I make further progress on it. I'm hoping to have a reasonably good, stable, user-friendly release by this Christmas, although the more tech-savvy people may be able to get going with it a little sooner.

Just 'cause, here's a picture of what it looks like so far. The interface is very ugly, I know, I'm gonna clean it up once I get the physics working better. You'll be able to make your own "skins" as well.

Screenshot from 2015-07-27 15:13:30.png

If you're wanting to test any of it, the code on GitHub right now is functional (ish). What's on GitHub right now is exactly the same as what's running in the screenshot above. You'll need to edit the "index.html" page so that the "Connect" button calls the JavaScript function using your JMRI PC's IP address, but other than that it should work. You'll also probably want to get rid of the functions for sound notching in decoder.js (just make them blank, don't delete the function entirely or you'll confuse it), unless you happen to have a LokSound decoder that supports such magical things. If anybody has trouble getting a test version up and running, let me know, I'm happy to help out.

If you're not a developer, you can still help me out by telling me what y'all want out of a program like this. I know it needs to be able to model physics of a train realistically, but that's very vague and will take a long time. What is highest on your "wants" list for this? More decoder support? Client-side sounds? Turnout control? I don't know what everybody else wants so I'm kind of just flyin' blind here, obviously some things mustloveebe done ASAP but I'd also love to hear from the people who will actually be using this.

I'll be posting a brief video demo of the program very soon (on my blog) but right this second I'm completing some last-minute summer work for school. :p I'll post more in this thread as well.

-Hampton

Edit: Here's a blog post I did a few days back with more information, as well as a screenshot of it actually "working" instead of just sitting at a waiting screen.
 
Last edited by a moderator:



Back
Top