A first look at hotlaps.io — my new side-project

Björn Kaiser
Couch Racer
Published in
8 min readJun 16, 2019

Update: the beta is now ready! If you want to know more, head over here.

A few months ago I started messing around with the telemetry data that the Formula 1 game by Codemasters sends through the local network to build my own Rev Light using a Raspberry Pi Zero.

It was a fun little project to get warm with the data. I didn’t want to stop there though. While I am not really a data geek, I was still curious what I can do with all the telemetry data and most importantly: how can I use it to improve my driving?

The idea for hotlaps.io was born.

What is hotlaps.io about?

There are two main goals I have with this project. First, I want to help users improve their F1 driving skills by making important data available to them and strengthen my programming and product management skills by doing something completely unrelated to my day-job.

Let us look at each of those goals in a bit more detail.

Help users improve their F1 driving skills

Practice makes perfect, so they say. However, this takes time, a lot of time. Time some people may not have. And besides, it’s way more fun to geek out while looking at data points that can often reveal quick wins to unlock those crucial 100ths and 1000ths of a second to climb the leaderboards or compete online.

Race tracks have different characteristics and tuning a setup to perfection for each of them requires a deeper understanding of how the physics in the game behave.

I aim to help in both of these areas. Since hotlaps.io collects the car setup for each lap, everyone can compare their telemetry and setups to those of faster players and see what bit may make the difference. I also plan to run some analysis in the background to pro-actively help people find the setup that is right for them.

Since there is a lot of telemetry data available for each lap, over time I will have enough data points to work on some, buzzword alert, ML models to figure out automatically which setups and driving styles get you maximum points. And it is also a good excuse to actually do something productive with Machine Learning.

Strengthen my programming and product management skills

My full-time job is writing software but once you work in a company your exposure to new ideas and programming techniques will naturally get smaller. Working on hotlaps.io allowed me to break out of this “filter bubble” and use some tools and frameworks I’d probably would not use at work, at least not often enough.

I also enjoy coming up with ideas and pretending to be a Product Manager who makes the strategic calls on what gets build and what doesn’t. Using both of those skills at the same time allows me to become a better engineer and product manager.

While at least Product Manager is a big word to use in the context of a side-project, that’s eventually what you are when you work on side projects. In fact, you are everything at once. Engineer, Product Manager, Project Manager, QA, PR & Marketing exposing you to a wider variety of ideas and processes than usual, something that can only be beneficial to grow your career.

Even if it means that you figure out that being a Product Manager isn’t for you, knowing that will bring you closer to your next career move.

The current version of the desktop client on macOS

What features does it have right now?

  • Personal “Consistency Score”, overall and per-track: being consistent is key for a good performance on track and is the main performance indicator for users on hotlaps.io. Using consistency rather than only asking the question “how many fastest laps did you do” felt like a good way to promote being consistent vs. being the fastest person on track for one lap only to then drop back by 5 seconds a lap for the next 20 laps before you score a fast lap again. The tl;dr of it is that it takes your recent lap times for a given track and overall, then does some Vodoo with it and outputs a score from 0–100, where 100 is the best score. I figured this will be a good way to indicate how you are progressing over time. Further down the road I want to expand this to flow into a point-based system where you are awarded points for improving the consistency score, for scoring the fastest lap on a track and so on.
  • Desktop client (for Windows & macOS) to upload lap times + telemetry data from F1 2018 time trial runs.
  • View telemetry data online: currently you can see graphs for Speed, Braking, Throttle, Gear changes, RPM, Steering Angle, Wheel Slip and Wheel Speed
  • View the full car setup you used
  • View your racing line with throttle + braking zones
  • Compare telemetry, setup and racing line of two laps to each other
  • Leaderboards per track
  • A list of fastest setups per track
  • Built with ❤

What’s the plan?

  • I definitely still have a lot of reading to do to make sure that I present and analyse the data in a meaningful way
  • The client (probably) needs to be updated to support the 2019 version of the F1 game, assuming that the telemetry format will change
  • Add a dynamic graph that allows you to pick the data points you want and plot them side by side
  • An interactive graph that allows you to zoom in on certain parts of the lap
  • A badge system to reward players for achievements
  • Allow users to challenge each other
  • Introduce a “coach and driver” mode where users can mentor other users
  • Evaluate if the data can easily be synced to a video recording of the lap, if the user provides one
  • Allow users to add notes to the telemetry charts
  • Add a progress chart so players can see how well they’re improving on a given track
  • And many more things…
The rendered racing line from a run on the Melbourne circuit in F1 2018 on Xbox One — red parts are breaking zones, green acceleration, white means no brakes applied nor any acceleration.

Challenges I faced so far

Cross-platform is (still?) hard. Some people use Windows PCs, some use a Mac, some use Android phones, some iOS devices. Each of those platforms have their own “main language(s)” you’d use to build native applications for it.

Since hotlaps.io requires the user to run an app that receives the data from the game and then sends it to the server, I will need to find a good way to build this client in an efficient way. Efficient meaning that it will be easy for me to maintain and that there are few possibilities for platform specific bugs by sharing as much code as possible between them.

For now I have settled on using Electron for this. It gives me just about the right tools to ship the client on Windows and Mac for now. In the long term I may invest in dusting off my Java and Swift skills to build a client for phones and tablets instead of PCs/Laptops. But for now Electron works just fine for me.

It is very data-intensive. My current testing-sprint saw me drive around 250 laps on various circuits from the game. All the data points about acceleration, braking, wheel spin et cetera translates to roughly 900k rows in the “telemetry” table of the database for the 250 test laps. In total this table is about 250MB in size.

You can imagine that once hotlaps.io opens up for other users the database will grow to several Gigabytes in size fairly quickly. This will definitely be a focus for me going forward to find ways to have only the data available to deliver on goal #1 while also ensuring that the disk space required won’t grow into infinity and my database remains fast.

Of course this is nothing in comparison to the Terrabytes of data a real F1 team accumulates during a race weekend, but still something I need to keep an eye on to make sure things run smoothly.

Time and fighting Dr. Feature Creep. This is 100% a side-project that I work on by myself after work and during weekends as much as I can. For reference, I started working on this in February 2019. And I was initially eyeballing a launch for the new Formula 1 season. It is June now and the season is well underway. The new version of the F1 game is also coming out in just under 2 weeks from now and I am not at a place yet where I feel comfortable launching it.

And then there is the good old Feature Creep, I have so many ideas that I would like to see in the finished product that it can sometimes be easy to lose control and just adding more and more things which eventually leads to a launch so far away that one either loses interest in the project or by the time it is ready, other players have already taken the market.

I am a fan of the “ship early and iterate often” approach where I start shipping things that are usable enough and then keep improving them through updates over time until I am 100% satisfied with it. What I mean by this is that something shipped that doesn’t work perfectly yet is better than nothing at all.

That being said, after a break of a few weeks working on this, I am positive that I can strike the right balance for this one.

I am not a UI/UX designer. Don’t get me wrong, I think I am able to put together a decent enough UI but they are more based on personal preference rather than research and industry best-practices. At least for the UI bit I am super grateful that things like Bootstrap exist that allow me to have a good looking UI while I can focus on the “business logic” of all the features instead of spending a lot of time on writing CSS myself.

Eventually I want to pay a professional designer to design something that is consistent, appealing and also focus on the actual user-experience but for now Bootstrap will have to do.

Back to work

There is still lots to do so I should probably get back to working on hotlaps.io now ;) I hope to publish more on this project here in the future to document the whole process for all those that are curious. If you have any questions, feel free to leave a comment with your thoughts, feedback and criticism.

So long!

--

--