The forums have permanently moved to This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.

Results 1 to 5 of 5

Thread: Determining rankings in racing games

  1. #1

    Determining rankings in racing games

    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?

  2. #2
    Registered User
    I played with a racing game, the way I did it is I created a series of checkpoints along the track. As you hit each one, it would update your status. If two people are on the same checkpoint, it would use their linear distance to the next checkpoint to decide who was first.

  3. #3
    The rankings are most likely determined by the player's distance from the finish line, so if you were on a different path than one of the other racers, the distance to the finish line based on the track you are racing would be the one used.

    don't know for sure though

  4. #4
    Registered User

  5. #5
    You usually have some kind of race-track measurement, which is a mapping of the current space-coordinates to a single parameter. You could simply use the shortest distance to the curve, but that would allow cheating --- so checkpoints of some sort seem mandatory.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Home About Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012