Jump to content
  • Advertisement
Sign in to follow this  
Dennis sun

About racing game cars place in a competition

This topic is 4403 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello every ,I am a racing game programmer ,and we are working to make an online racing game ,the question is how to judge the cars' places in a competition,we have a way to set some points on the road ,and get the distance between car and the terminal ,but you can run from different way to the same terminal ,how to judge it ? any help will be thankful. I think maybe it can be describe by a tree or a graph ,but can someone give me some advice ? can any guy have another way to resolve the quesiton ? thanks !!!!

Share this post


Link to post
Share on other sites
Advertisement
I use several 2d line segments that cross the track and distance-to-line checks. These can be very useful.. the obvious use is at the start/finish line but by using at least two others you can prevent cheating by making sure the player crosses them in order.

If you use enough line segments your position in the race can be determined by sorting the players according to;

Lap Number
Last line segment passed
Distance from that segment

- Matt

Share this post


Link to post
Share on other sites
Quote:
Original post by matibee
I use several 2d line segments that cross the track and distance-to-line checks. These can be very useful.. the obvious use is at the start/finish line but by using at least two others you can prevent cheating by making sure the player crosses them in order.

If you use enough line segments your position in the race can be determined by sorting the players according to;

Lap Number
Last line segment passed
Distance from that segment

- Matt


thanks Matt........
good luck ,do you have experience of making racing game ?
and if possible can you leave me some way to contact with you ?

best wishes and good luck .

Share this post


Link to post
Share on other sites
I've played about with driving/racing games in the past -- who hasn't? :)

My most recent attempt was a simple project using Newton Dynamics (physics engine) and my game engine. It includes a simple car set up and driving model, all physics (car control, collisions etc) are done by Newton, but it does use the line intersection tests I mentioned above for lap/sector timing and preventing cheating (it stops the player just reversing over the start-finish line and driving over again to clock up laps).

I was considering working on some AI and improving the car parameters, adding torque output curves etc but I simply don't have the time to put into it.

If you want a look click this and if you want to play it (trust me it's not worth it!) click here.

You can PM me here or my email address is on the engine site but I'm no racing game expert ;)

- Matt

Share this post


Link to post
Share on other sites
An alternative to a line test is a plane, a surface, or a trigger volume placed to start at the point where you want to detect. For example, you can place a tall, shallow box that's as wide as the road, aligned with the starting line. This makes it so that you "hit" the trigger even if you happen to be jumping in the air when crossing.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!