Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

The Lightspeed bug Locked

A topic by Sk1ds created Jul 03, 2023 Views: 206 Replies: 3
This topic was locked by Sk1ds Jul 05, 2023

Solved

Viewing posts 1 to 4
Developer (1 edit) (+1)

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.)



Developer (2 edits)

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 the files from the bugged version 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.)

This is the first formula with the bad number:
maxSlipWeighted = massaR * 9.8f / maxWheelForceR - 1f;
maxSlipWeighted, massaR and maxWheelForceR are floats. Does someone understands why maxSlipWeighted is suddenly 100x bigger? MassaR and maxWheelForceR are the same as on my system, except for the decimal seperator now being a point instead of a comma.


EDIT:
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.
That means if you change your setting to Belgium, the game might work. (The downloadable version at least.)

EDIT 2:
Never mind, 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!

Sweet, this is working great now!

Developer

Awesome! I'm happy to read this!

Developer locked this topic