nowfound

Life & fun · April 4, 2024

CI

CycleQuest – Indoor Cycling game with steering

Hello HN! I made a game for smart bike trainers focused on gamified progression, real-world locations, and steering using a smartphone. It differs from other apps by requiring you to complete routes in a specific order, without the ability to skip or make it easier. It's available for Windows and macOS. Last year, I got into road cycling. Because of this, I acquired a smart bike trainer (you attach it to your bike and apps can control its resistance via Bluetooth). I tried a couple of apps but quickly became bored. I feel they are mostly focused on either online racing or a serious…

What it does

In the maker’s words, at launch

Hello HN! I made a game for smart bike trainers focused on gamified progression, real-world locations, and steering using a smartphone. It differs from other apps by requiring you to complete routes in a specific order, without the ability to skip or make it easier. It's available for Windows and macOS. Last year, I got into road cycling. Because of this, I acquired a smart bike trainer (you attach it to your bike and apps can control its resistance via Bluetooth). I tried a couple of apps but quickly became bored. I feel they are mostly focused on either online racing or a serious structured training. I'm not really interested in these. My favorite part of cycling are cycling trips. You go to some destination and try to complete the world-known routes and climbs. I thought to myself that I would love to somehow replicate this with my bike trainer. A way to have a clear progression, challenge, and no repetition. To sum up, I wanted to have: - Real-world terrains and routes - Clear progression - A sense of accomplishment from completing a challenging route - No aids like decreasing grade difficulty or skipping routes - Modern graphics - Steering to keep you engaged I chose to go with each chapter as a real-world location (e.g., Mallorca) that contains multiple routes. You need to complete the previous route to unlock the next one and complete the previous chapter to unlock the next chapter. I chose Unity3D to create the game. I wanted to have real-world locations, so realistic routes, terrain, and vegetation were a priority. To save time, I used assets from the Unity Asset Store whenever possible. I used Gaia Pro to create terrains. It handles: - Generating (stamping) the terrain from a heightmap - Textures and vegetation spawning based on rules (e.g., spawn trees on flat terrain, rocks on slopes, etc.) - Dividing the terrain into tiles and managing their loading during gameplay - Comes with ready-to-use models and textures To generate roads, I downloaded .gpx files from my Strava activities, then implemented a parser to take coordinates and elevations and build roads in-game using EasyRoads3D. These tools combined worked quite well but required some manual work. I had to go over the entire length of the road to smoothen it up (due to GPS noise in .gpx files). The terrain also didn’t always perfectly align with the road, so I had to manually modify it. I figured that steering would be a good way to keep the user engaged in the gameplay, instead of just sitting on the bike and pedalling. With required steering, you need to be engaged to not drive off the road. There are some solutions to virtual steering in other smart trainer games, but they are hardware-based - e.g., for Zwift, you need to buy their hardware controller. I really wanted to keep it as simple and inexpensive as possible, so I used a smartphone mounted to the handlebars as a steering controller. I implemented native apps for both iOS and Android. They use the gyroscope to get the steering value and broadcast it as a BLE peripheral. Implementing Bluetooth in Unity was a little tricky as there is no built-in solution. The implementation depends on the platform the game is running on. It boils down to writing a native plugin for each platform you support. For macOS, there is an open-source library written in Swift - https://github.com/codeinversion/sensors-swift. It already has the necessary services and characteristics implemented. I had to modify it a little and compile it into a Unity plugin. For Windows, there also is a library - https://github.com/adabru/BleWinrtDll, but it wasn’t working too well. Because I targeted UWP, I was able to implement my own Bluetooth logic in C# and compile it directly in Unity. Overall, it was a really fun project to work on. I’m particularly happy that I was able to release it starting from scratch in just a couple of months, and I hope to continue working on it.

Does the same job

all alternatives →
  • UrbanCyclers2017 · ▲83

    App and social platform for boosting cycling in cities

  • Does not commute2016 · ▲110

    A strategic driving game!

  • SpeedForce2015 · ▲88

    Turn your bike into a smart bike

  • BEAKOR2016 · ▲87

    A new cycling experience!

  • Free Rider2015 · ▲88

    Race a bike on tracks drawn by other players

  • Rollout for iOS2017 · ▲83

    Meetup for runners, cyclists, and athletes

More life & fun this month

the category →
  • TL

    Life & fun · 10d ago · louisabraham.github.io

  • Photosynthesis fires two of your iPhone

    Life & fun · 28d ago · photosynthesis.camera

  • SoloUno310

    Take control of hair pulling, nail biting & skin picking

    Life & fun · 28d ago · solouno.io

  • Scroll through all 43,252,003,274,489,856,000 reachable Rubik's Cube permutations.

    Life & fun · 26d ago · everycube.alen.is

  • The Interactive 3D Encyclopedia

    Life & fun · 21d ago · expeditione.fun

  • Hi HN, I built Eigendrum, a web tool that solves the 2D wave equation for arbitrary shapes so you can hear what they sound like as drums. How it works: * Solves -∇²u = λu using finite element analysis (Kφ = λMφ) on a triangle mesh. * Validated to <0.1% error against closed-form solutions for circles (Bessel zeros) and rectangles. * Sound model factors in strike location, Rayleigh damping, and mallet width. * Includes Kac drums I & II to demonstrate identical sound spectra from different geometries. * No frameworks, build steps, or dependencies. Repo and tests:…

    Life & fun · 26d ago · baselashraf81.github.io

Launched alongside, April 2024

the whole month →
  • Supabase2,328

    The Postgres developer platform is now generally available

    Dev tools · 2024 · supabase.com

  • Build your pixel-perfect booking experience with Atoms

    Dev tools · 2024 · cal.com

  • PaddleBoat1,161

    Perfect your sales pitch with realistic AI roleplays

    AI · 2024 · padboat.com

  • deco.cx 2.01,080

    Build web apps 10x faster with Deno, JSX, TS & Tailwind

    Dev tools · 2024 · decocms.com

  • IXORD AI955

    Navigate tasks, ignite creativity

    AI · 2024

  • A central nervous system for all your productivity apps

    AI · 2024 · getassista.com