Sign in to follow this  
forgosss

Racing Game Checkpoints detection

Recommended Posts

Hello everyone,
This is my first post, so I introduce myself: I'm Javier, I'm studying Computer Engineering.
Our work-team (9 people) is developing and designing a racing game in python-Ogre. It's being a hard job, python is one of those kind of things that burst one's brain up...
thank you all in advanced, I have been reading some threads of conversation overhere, and found very useful information!

So, this is the question:

We have 3d racing-circuits, with its shortcuts and so on, so we are trying to detect cars positions in every stretch of the already mentioned circuit.
One first look for this problem, was:
[list=1][*]Add kind of planes : pair of nodes one on the left-side and the other on the right-side of the track all around it.[*]Calculate each frame, relatively to the position of the car, the previous Plane and the next Plane[*]With this two planes, we have information about what checkpoint we have left back, and which is going to be reached.[/list]This "kind of algorithm", works very efficiently when the car doesn't take shortcuts, and when it does it, it causes troubles

any idea on how can we implement this behavior?
Thank you again!!

Share this post


Link to post
Share on other sites
How about add planes or boxes to the shortcuts? Another alternative, add a hidden checkpoint to each branch of the circuit. That is, add one at the "entrance" to the shortcut and one on the "main" track just beyond where the shortcut turns off. Depending on which of the two hidden checkpoints the car goes through, you can determine whether the shortcut or the main track is being followed.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this