The Lightspeed bug


Does your car move at an uncontrollable speed, like in the videos below? Then you're experiencing the lightspeed bug. I don't know why this happens and it doesn't happen on any of my systems. Pretty frustrating if you want to locate the bug. For this reason I've uploaded a logger version. It does what is says: log data. You simply have to run the game and the car will drive by itself for a couple of seconds. It shuts down automatically and writes 2 log files: CarModelData.csv and PlayerData.csv. If you can send those files to me (yves_dorny@telenet.be), I can try to locate where the data goes haywire and solve the bug. (Don't try to read the message at the start. It was meant for a friend of my wife.)



Files

Turbo Outrun clone logger.zip 34 MB
Jul 03, 2023

Get Turbo OutRun Reimagined v0.4.1

Download NowName your own price

Comments

Log in with itch.io to leave a comment.

Good job to grab data. I sent you the data files from my machine. It is clear the bug is still active, just as in my prior videos.

Even better: I've found which variables go wrong. A couple of very small floating point variables are 100x bigger than they should be. Also interesting: when I run the logger, the decimal separator in the files is a comma, while in your files (and someone else's) it's a point. How this is possible, I don't know. But I've added an option that will divide those variables by 100. This might do the trick for now. (Probably only your own car, not the AI.)

It gets even better: it has nothing to do with my code, but with the regional settings of Windows. I changed the country from Belgium to USA and yes, the car went uncontrollably fast. The option to multiply the values didn't solve the issue, but perhaps I can now find a solution.

And finally, I believe I've found the culprit: a text file that represented the tire slip curve had commas as the decimal separator. English systems wouldn't recognize this and simply removed that comma, multiplying the values by 100. I removed the comma altogether and divided the value in the code itself. Problem solved!

(1 edit)

I think you're using C#. Look into System.Globalization. Try using CultureInfo.InvariantCulture. Then try using TryParse on the data type you are reading into. I believe it should parse any global / culture format.

However, if you just changed all of your floats into integers (x100) then that also works, but you should then read them into integers -- this is so it fails when someone later adds a float to that text file by accident.

In other words, your code should fail at the location of the bug. Not in the middle of gameplay where anything may have caused the error. Fail fast. Then my report to you would be "here's the exception", which can be solved in seconds.

Nonetheless, good debugging!