I'm making a racing game, and I need to put on the cars the positions of the race and if possible the difference between two cars. Someone has a help for me?
P1 - Car Name
P2 - Car Name
P3 - Car Name
P4 - Car Name
P5 - Car Name
Develop games in your browser. Powerful, performant & highly capable.
Not this! It is the creation of the table with the placement of the race.
Here I made one way:
On a granular level you could just count laps. A little less granular would be to count checkpoints. In the above it also incorporates the distance to the next checkpoint on top of the number of checkpoints passed.
The only major math used finds the distance to a line instead of a point.