This is not a specific programming question, I'm just curious if anyone knows the general answer.
I've been playing a lot of Mario Kart recently, and I've been puzzling over the way the game determines the rankings. In racing games, how do you determine when one player is ahead of another player, when the course is so non-linear? And how do you tell when a player has completed a full lap?
I'm not even building a racing game, so I don't need specific code or anything. But if anyone has dealt with this before, how did you go about accomplishing it?