Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit/AppGameKit Studio Showcase / Model train cab control

Author
Message
Dale Schultz
3
Years of Service
User Offline
Joined: 1st Nov 2021
Location: Maine, USA
Posted: 28th Nov 2021 03:58
So I found AppGameKit earlier this month and I have created a couple of apps. My latest is a cab control that lets me control my model train layout from my phone!



The app communicates over TCPIP with my layout control software. Data on stations, trains, event lists, etc. are all exchanged in real-time without any hardcoded data that is specific to my layout. Images needed are cached and fetched fetched via http in real time if not already present. Commands to control the trains etc. are of course also sent over the TCPIP connection.

Shaders were new to me so I was very happy to see how powerful they are and I used it to manipulate static images that I have of the train tracks that get displayed as the train moves around the layout. The ambient light of the room is conveyed to teh app which then shades the image to match. The light from the locomotive headlights show up when one switches the headlights on too!

I used the percentage coord system.
The app has a number of screens and one can swipe left or right to flip between them or click on the 'tab' indicators along the bottom of the screen.

I created some genetic UI controls, a pull-down list that can be scrolled by swiping or mouse wheel, a button control, a radio button set - which is a lots of buttons, and it allows only one to be on and a number picker.

Some additional screen shots and earlier cab controls can be seen on my layout page at:
https://cabin-layout.mixmox.com/2021/11/android-cab-control.html

Attachments

Login to view attachments
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 28th Nov 2021 05:29 Edited at: 28th Nov 2021 05:29
impressive stuff, dale. you take your hobbies very seriously!

to be clear, you have a number of images that are displayed appropriately vs an actual camera on the lead loco?

as an engineer, that's something i've always been curious to see (live video). maybe some AR with deer feeding, drinking, scampering up the hillside? you get the idea

otherwise, i'd like to see some video of your creation in action when you can.

thanks for sharing!
Dale Schultz
3
Years of Service
User Offline
Joined: 1st Nov 2021
Location: Maine, USA
Posted: 28th Nov 2021 13:44
thanks! Though there are small cameras that people use in their trains, some of which transmit the video live, it is not practical to have a video camera in every train, and the quality is difficult to get because this is an electrically noisy environment.

So I have taken still images at all the sensor points - the distance varies between them, and those images are what are displayed as the train moves. In hidden areas I have tunnel images that I use. Train parking areas do not have physical signals either so that is why I 'place' virtual signals in such areas, so that the signal information can be relayed to a cab control.
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 3rd Dec 2021 16:44
Now that's cool

My mate did a ride on thing like that with his Hornby's using my old dual cam motorbike setup wired into the 12v from the train, I highly recommend the MT1 System, I have a TT600 with Scorpion exhaust and the noise cancelation is pretty good, not perfect but acceptable, video quality is superb, altho you might have to dismantle the control box to fit it inside a carriage.

you can pick those up for £20 on Amazon but they are naff, waist of cash
Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee

Login to post a reply

Server time is: 2024-11-21 12:35:01
Your offset time is: 2024-11-21 12:35:01