Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9061859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T15:35:30+00:00 2026-06-16T15:35:30+00:00

I was surprised I couldn’t find much about this online, maybe I just don’t

  • 0

I was surprised I couldn’t find much about this online, maybe I just don’t know the right terms to search for.

I’m making a top-down racing game, and wondering what the best way to track the progress of cars around the course is, I.e. for telling at any given point around the course which cars are ahead of which other ones, and also making sure that entire laps are completed, etc. the course is defined as a series of coordinates for the outer and inner track boundaries.

I can think of a couple of ways of doing it – e.g. placing checkpoints at every corner and getting a car’s progress by its position between the previous and next checkpoints – but this doesn’t seem particularly elegant or robust. is there a “standard” way of doing it? or just a better way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T15:35:31+00:00Added an answer on June 16, 2026 at 3:35 pm

    Here is my suggestion – it may not be absolutely accurate but should be more than enough for what you need.

    First of all define a central axis for the course – as your course seems to consist of a series of straigh segments, this will probably be the line that is equidistant from the courses boundries. Now tracking the progress on a line is easier than tracking the progress on something that is 2D, so I suggest you project the poisitions of the cars on that central axis. I think simple orthogonal projection would do best here. Simply find the point on the central axis that is closest to the cars position and use it for the tracing of the progress.

    Compute the total length of the central axis and than compute the total length along the central axis up until the projection of each of this cars. This would give you the car’s progress. If the total length is T and the distance up until the projection is t, the car will have passed t/T of the course or t*100/T percents of the course.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm surprised I couldn't find a similar question on this site. Maybe my search
I was pretty surprised I couldn't find this anywhere online, including stackoverflow. I'm looking
I'm surprised I couldn't find an answer to this anywhere. I'm writing a roguelike
I've run into an issue I was surprised I couldn't find any discussion about
I was very surprised that I couldn't find this answer on Google. I have
I would honestly be surprised if anything like this exists, but I couldn't find
Surprised that i havent been able to find this myself, but anyway. Let's say
I was surprised, if I noticed it right, that $this->Js->object() autosorts the array i
I am surprised I couldn't find it on google, what's the best way to
Quite surprised that I couldn't find a similar question around here. I'm looking for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.