stardance has been extended another month! the new deadline is october 31 :)

You are browsing as a guest. Sign up (or log in) to start making projects!

1h 17m 22s logged

Devlog 29 - The end

So this is the last one, huh.

Here is the full write up on this project as I promised.

Chapter 1 - The beginnings


This project started about 3 months ago. I started experimenting with just getting the data and plotting it. Just for fun as an exercise to learn rust. Then I realized that there actually isn’t a proper working telemetry tool that works on linux. So I did some research… and I decided that I am going to make the app in Dioxus.

Chapter 2 - The Dioxus era


This leads us to the shortest of eras. The Dioxus era. Nothing really happened here and quite frankly I don’t even remember it that much. There aren’t really any git commits because I didn’t have that setup yet. One thing i remember tho is that I couldn’t figure out how to draw the garphs, because Dioxus is based on web technologies but weirdly becuase you are writing HTLM like syntax but in rust. And that was the main reason I decided to switch to Tauri.

Chapter 3 - The Tauri era


At first Tauri was the best framework ever made for me. That is because I already kinda knew react, it was simple to understand and I could really lean into the split frontend and backend architecture. This sadly proved very inefficient for the graph view which needs to render thousands of points each frame. Since it was too much for the basic HTML canvas I have switched to using WebGL with numerous downsampling techniques. This was just a bandaid fix though. I have also ran into bunch of architectural issues with the whole split frontend and backend thing. Accessing the telemetry data proved to be very difficult and inefficient. I remember that I ran each of the graphs on a separate thread. This was so stupid. I don’t even remember how I could’ve come up with such a stupid idea :D. It just led to memory leaks and threads uncontrollably spinning up and not stopping. I am sure that all of that could’ve been easily avoided with simpler architecture but at that point I was at my lowest point of this project, so I didn’t even have the energy to do it. I also had the state of the frontend so fragmented which didn’t help. And the whole retained mode GUI thing just wasn’t well suited for this kind of app. And that is when I decided to do a complete rewrite in pure rust!

Chapter 4 - The sweet EGUI


I didn’t know it at the time, but this was the best idea on what to do with the project. I remember that I was very split between just shipping it half done and finishing it just because of how bad the development experience with Tauri was (sorry Tauri devs, it’s not a you thing, it’s a me thing). It took about 30h to fully rewrite the app with EGUI, which looking back at it isn’t too bad. It felt like ages though. It didn’t help that almost none of the work in this “chapter” did AI. Which at the end of the day is better! Although my style of writing EGUI code was let’s say original… I have just put everything into one file and that grew very fast :D. I had like 5 files that were about 800 lines each. That has since luckily changed. (I have adopted more of a React style file structure.) Anyway at the end of the rewrite I kinda started loving EGUI and that hasn’t stopped since. I continued to develop the Map page in EASY which was pretty easy. But then I needed the track limits data for the map page. This was a bit of a roadblock… First I have tried to extract the data directly from the game, however this was inaccurate and the track width was missing entirely. So then I tried to download an up to date image of the top down view of the track and extract the inside and outside line from it and match it to the in game data. This partially worked better, still not great tho. So there was only one option left. And that was to painfully drive each layout of each track by hand. This took almost 7h of just driving in circles. After that it was smooth and buggy sailing until the ship.

Everyone who read this, have a beautiful day.

1
49

Comments 0

No comments yet. Be the first!