A Return to Cycling, Virtually
At one point in my life, I was on a road bicycle racing team, working my way up the categories, while developing a low-cost 3D training simulator where none existed. Things happened. Fifteen years later, I pulled my bike out of the basement.
Dusting It All Off
After one last training race in early 2008, I closed that chapter of my life completely. That is, until the summer of 2022! I wanted to get back into better shape, and before I knew it, the garage was clean and my old racing bike was mounted in my old trainer. Inspiration struck, and I ordered a mini projector. I can’t tolerate a skewed image, so of course, then came building a quick hanging ceiling mount for it.
Upgrades
This lasted about a week or two before I started thinking about my old “FrosTrainer” simulator project from 2006. I discovered two major things have improved since then:
- Several affordable smart trainers are available that dynamically simulate inclines with resistance
- Just as many polished virtual cycling applications that work with said smart trainers
Exactly what I wanted years ago, delivered to my doorstep? Yes, please. Here’s what arrived, sorted by most-to-least essential:
Shopping List
- This is the most essential, the smart trainer. It connects via Bluetooth or Ant+ to be controlled by your phone/tablet/computer to change the resistance to simulate up to a 12% grade climb. It also reports your speed and wattage. Really an all in one package. You could stop right here. I didn’t. But you could.
- I actually had this already from healthcare R&D work in 2015-2016, exploring the Open Mobile Alliance GotAPI
- Bluetooth heartrate chest sensor. This feeds valuable data alongside the Kickr, and can even control the Headwind.
- Essential? Yes. As Ash Williams might say, “Train Smart. Train S-Mart!”
- Blasts you with up to 30mph directed wind
- Can match wind speed to your virtual speed
- You’ll think this is pretty spiffy until you hit the first climb and the fan effectively turns off.
- Can scale the fan speed based on your heartrate, with custom ranges.
- Once I found that feature, I used nothing else.
- Essential? No. Cool? Yes.
- There are great reasons to have a Bluetooth cadence sensor syncing with all of the above. Mine wasn’t among them.
- Helped reconcile a discrepency between my virtual legs on screen and my real legs. The things you never expect to bother you.
- Essential? Not really, unless you’re doing more serious training.
Let’s put it all together!
Nice. But wait. Something still isn’t quite right…
Perfect. 15 years of neglect politely erased, just add bar tape.
Software
I tried both Zwift and Wahoo RGT on my phone (Pixel 3), sharing the screen to a Chromecast plugged into the projector. This was “fine.” It worked. The framerate was jerky, more for RGT.
Right now, what I do is run either RGT or Zwift on an Android tablet that sends HDMI (via a USB-C dongle) directly to the projector. I then have my phone on a handlebar mount with the companion app for either option. This works out great, though it does mean I have to swap inputs if I want to go back to casting.
Sidenote: Even better would be a native Linux client, but neither option supports it. Zwift can technically run in Wine, but it was unreliable in my tests.
Wahoo RGT
I signed up for RGT first. I like the visual style of RGT, streamlined interface, and the custom roads feature. However, I’m coming into this out of shape and alienated from the sport. RGT seemed to amplify that, to where I was waiting for the ride to end at my 60min goal. That may change as I get stronger. It would have been a great fit back when I was racing, and had a team to socialize with outside. Here in 2022? It’s just me alone in my garage wheezing. RGT hurt emotionally as much as physically.
Zwift
Zwift was a much more engaging experience, happy to meet me where I am. I thought I would be turned off by the “game-ness” of it, having been serious-racer-type-person, but on the contrary! It starts you off with a tutorial ride that walks you through the features and establishes your baseline. What’s different was that this wasn’t a fixed course - it was like any route in a larger world, where I was free to deviate. I loved being able to just explore the fictional island of Watopia. Sometimes pacing groups would catch up with me, and I’d join them for a few miles. Other times, I found myself pacing along with 3-4 other riders, all sending a thumbs-up “Ride on!” gesture. 60min came and went, and I wanted to keep going. After 90min, and a third and final dinner call, I reluctantly stopped.
Zwift gave me back that friendly group training atmosphere I had lost more than 15 years ago. Thank you, Zwift! 👍
…All that’s missing is a track editor…
What about FrosTrainer?
FrosTrainer was the cycling simulator I developed in my free time around 2006-2008. Here are some quick facts:
- Developed in C99 for MS-DOS, Linux, and Windows to target any old computer a user had available
- Remember, this was 2006! Plenty of early-to-mid 90s machines kicking around, no tablets, and the rare smart phone was running Palm or Windows CE.
- The hardware interface was the reed switch wheel sensor from a wired Cat Eye that I patched into a 3.5mm line-in
- I used Portaudio to sample the sensor as an audio stream at 44khz. Measuring the distance between peaks gave me the approximate speed.
- I had a vision where anyone could build their own sensor out of a few old connectors and sensors lying around
- Resistance was simulated by applying a scalar to the speed used in-game. e.g. a given hill grade with a .5 scalar would reduce 20mph to 10mph. The rider would have to work harder to compensate.
- The 3D engine was a pure software renderer. I had to work out perspective projection, depth sorting, etc.
- Later when I ported it to OpenGL, it felt like cheating ;-)
- Featured a complete track editor with block edit functions for elevation, curve, and scenery
- Custom user themes for scenery and sprites, with a theme compiler tool
Here’s a demo video I made around that time and a few vintage photos. Please excuse the quality. Screen captures are another thing that has dramatically improved over the years.
You might be wondering why I stopped riding, and by association, stopped developing FrosTrainer.
In a nutshell: 3 career pivots, 2 family deaths, 1 major back injury, and the dissolution of the racing team.
…Life, eh?
What’s next?
Who knows. I have the FrosTrainer source still. It might just be wild if I can somehow get it to talk to the Kickr… and just maybe, we’ll see this guy again:
Ride on!
-POTTER