@Sonicblaston That’s another bug… I need to check for the lap count after the placements have been calculated instead of allowing it to detect in between calculations. Here’s a fixed version:
Also, I know there is a bug where you can get infinite speed and have it glitch from corners of walls, but I won’t be fixing that in this thread. If that bug gets fixed it will be in a separate thread where I update the game with color customization, kart colors, a friend code system, and more (implementing ideas I already had but didn’t add due to time constraints).
I knew about that; it will probably happen in most corners if it is pulled off correctly due to how collision bouncing backwards works. I talked about this on my fourth bug fix version post above. If I make a new version, that will most likely be fixed but it’s not big enough of a bug to impact gameplay imo. When you hit a wall, it sets your velocity to be at a greater value (but negative) than that of which you were traveling at the wall with. If you hit walls and can build up speed, your speed can go past the integer limit because speed isn’t limited. This makes your position shoot into the negatives too, and you and all the car’s lines get stuck at 0,0. I think that’s what happens, or it may be that the position overflows before the speed so it gets stuck at a negative number. When this happens, 0,0 is always a wall so I don’t think there is any getting out of this bug when it occurs.
Also, fun fact: While making this game, I at first planned to have 8 tracks, finishing off in classic Mario Kart style with a lava level (like Bowser’s Castle) then a track like Rainbow Road. Then, as I knew I didn’t have enough time, I bumped my goal down to 4 tracks, but I didn’t have time to make the fourth track. Although, a lava themed track is an ok ending imo.