The place where random ideas get written down and lost in time.
2018-12-25 - Dart
Category DEVHere’s a random idea: try Dart for a web project.
Here’s another random idea: While not rewrite Track for the web?
- Data files provided by a web server.
- User accounts and all that: Firebase.
- 2d canvas editor.
- 3d view in browser?
One thing from “\pɔʁt.na.wak\” experiment is that editing in 3d is a PITA. I should focus on a 2d editor and then adapt it to 3d as it’s not my strong point.
Also I didn’t like the model I had in Track, especially the connectors. It seemed like a good idea initially but ended up troublesome. Tests were inadequate.
If I wanted to try Dart, there are 2 other possible projects:
- Rewrite Wazz.
- A bit moot since there’s nothing complicated nor wrong with the current version. It could be an interesting test to get a direct comparison between Dart and pure JS ES6.
- Write a simple single-page web-page game. Nerdkill for example ;-)
Next thing to try: Windows Linux Subsystem.
Can it replace Cygwin?
Does it integrate nicely with win ntfs / apps?
[Summary from the FAQ] ⇒ Provides a bash shell and /mnt access to the win fs. Does not provide GUI support. Mentions apt-get (with potential errors due to a lack of udev).
I should also (re)learn Powershell (again and/or for real) and take cheat notes on how to be proficient / use it.
2018-10-07 - Wyze App
Category DEVDesktop app to access Wyze cams.
The TinyCam code seems easily reversible, and could be done as a desktop app instead of android.
To play an h264 stream, have a look at JavaCV https://github.com/bytedeco/javacv (Java wrappers around OpenCV ... can be useful for a lot of other applications).
In that specific case, a C# app might be better than Java as main target is Windows (potentially cross-platform with MonoDevelop, not sure if it’s even worth bothering here).
It’s a throw-away prototype, so failure is an option. The simplified goals would be:
- Start by simulating whatever tinycam came up with, because it’s an easy start.
- TinyCam only takes care of discovering and connecting to local live feeds.
- Need to realize this is not my end goal. What I want is really:
- View remote notifications.
- View remote live feeds.
- View remote playback feeds.
- Doing this would probably looking at the wyze apk with an ssl proxy to capture the json payloads.
Doing it in C# would be also a good exercise to do an UWP.
https://docs.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide
UWP:
- Requires/useful if using the Windows App Store
- Can be sideloaded in Win 10 if device is set in dev mode.
- APIs access to Win 10 features: Tiles, badges, Cortana, bunch of other crap.
- Various languages/UI combos supported: JS HTML, C# XAML, C++ DirectX.
So maybe UWP is overkill in this case. Just stick to a regular C# desktop with the old style C# gui builder. Use VS Community, and expect it to be ages behind in terms of code completion.
Why not a web app instead of a desktop app?
- Live viewing should work using any web page that can play an h264 feed. “In theory”?
- In the mobile app, notifications are seen using a download + local player. A web app could use local storage and/or just stream the video feed.
So it’s worth investigating, even if it turns out to not work well.
Results (done in JS):
2018-10-03 - Projects Update
Category DEV- Track: Has not changed since “\pɔʁt.na.wak\” dev in PA.
- Track is part of “\pɔʁt.na.wak\” and is supposed to be a throw-away “quick” project. At that point it’s worth thinking whether there’s some real long term value in the project and in which case build a real standalone one.
- What I need is a more generic way to describe track segments.
- And import the ones from SCARM.
- Then use it on my own layout design.
- The 2D view lacks precise geometry tools that I’d take as a given:
- rulers x/y,
- units (inch vs mm),
- ability to move something at a specific place by x/y coords,
- rotate by entering an angle,
- ability to measure distance,
- ability to dup/offset a track to another one (or an anchor point).
- NCE Cab:
- Wrote a “design doc” / spec / desiderata doc for it.
- Need to do a prototype.
- First need to validate can use the RS485 interface on Windows/Java & Linux/Java (instead of Linux/Python). That first test could be a simple Java port of the existing python nce protocol decoder, without the ncurses part.
- 3D Blender:
- Desired goal would be to have a quick export from Tracks or for Scarm into a blender file, then play with materials there.
- “Cab Engineer” Android Mobile WiThrottle:
- I’ve started this for my own need as part of the old JMRI / JED experiment, then made a single use app with Wear integration also as an experiment.
- I had some desire last to reboot that into a formal project.
- See “Cab Engineer” below in 2017-12-18 update.
- Randall replacement for the NCE Button Board.
- Desktop app to access Wyze cams
It’s interesting to consider scopes:
- Cab Engineer: For me + public app.
- Value for me: mild.
- Existing apps: Engine Driver.
- 3D Blender: Only for me.
- Track: For me + public app.
- Value for me: medium/high.
- Existing apps: Plenty on desktop (can’t match), none on Mobile.
- Would be satisfied if I could just match desktop Scarm.
- NCE Cab: For me + public / for club.
- Value for me: medium / low. Technical challenge.
- Experimental: high value.
- Finished product: low value.
- Public / club: No adoption realistically expected at all.
So of these, based on value:
- Track / desktop is highest.
- Track / mobile is for fun and shows some interest.
- NCE Cab for the experimental phase value.
- 3D blender for some moderate value.
Based on this my order is going to be:
- NCE Cab - experimental phase aka validation prototype.
- Track / desktop.
- Revamp of experimental project, focusing on Scarm level.
- No mobile target at first but keep in mind for feasibility.
- Track / mobile. Maybe.
2018-08-03 - Tracks
Category DEVNot so quick test in 3d + Java + desktop. Part of portnawak. Could be made in its own project.
What I want, for me:
- Android version.
- Touch UX
- Running trains.
- Save online. G drive, drop box.
Doc Link from “\pɔʁt.na.wak\” in google docs.
Goal: something like this https://www.trackplanning.com/3pi.htm
Candidates that should work for either JVM desktop or Android:
- jMonkeyEngine
- libGDX
- jPCT
- http://www.jpct.net/about.html (JVM)
- http://www.jpct.net/jpct-ae/index.html (Android)
- Overview: https://android-arsenal.com/details/1/10
- SmartGL
Upfront, jMonkeyEngine describes itself as a full environment, SmartGL as just a 2d/3d view wrapper, GDX and PCT seem more in-between.
Requirements:
- Fullscreen or view
- Basic physics
- 3D import… which format, from where?
- Interactivity
Looking at this:
- SmartGL seems limited to exactly what’s in the name.
- jPCT seems to have a clear distinction between desktop and Android. Can’t tell how recent it is.
- libGDX seems to have good modern support and good wiki tutorials to get started. There are also wrappers for Bullet and Box2D for physics engines and corresponding tutorials.
So let’s start with libGDX.
2018-06-26 - Choices
Category DEVSummer travel choices:
- Hint as a base for Nawak.
- Nawak (editor / vm / platform).
- Conductor 2.
- Portnawak (quick game to learn kotlin).
Another idea to explore:
- Read a SCARM file and generate 3D track data for blender.
- Layout software for Android / mobile. Scrap existing library data to get started.
Maybe that’s what Portnawak could be: a potpourri of random mobile apps “1 day” experiments, with multiple absolutely unrelated activities in the same app.
Decided on the following plan for this summer:
- A 1-week addition to Portnawak as a simple “falling dot” game. Goal is to not focus too much on the engine part and develop some real kotlin code.
- A very very short throw-away track layout experiment. How would interaction work? Consider having only 2 pieces of tracks (1 straight + 1 curve) with auto-snapping. The goal here is to put that code in a generic library + UI that is android specific.
- After these 2, consider if I want to keep using kotlin or go back to Java.
- Then move on to the simulator for Conductor 2 (java app). Structure it at all in a library except UI in a java project (swing) or web rendering.
2018-04-08 - Wyze Cam
Category DEVMy main objection with the Wyze Cam is still the cloud-only and reports of outbound traffic.
Also “cell phone only, no web site”
So, way to work around this: https://openip.cam/
The base for the Wyze is the Xiaomi XiaoFang (see fang-hacks), which is not actually cheaper.
In Cab2 / RTAC, the mDNS discovery generally gives IPv6 addresses before IPv4.
2 things to investigate:
- Why the code always seems to fail to connect to the IPv6.
- Can I programmatically convert an IPv6 into an equivalent IPv4 (at least for local networks) and try that instead?