Racing Game Checkpoints detection

Started by
1 comment, last by yewbie 12 years, 11 months ago
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:
  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.
  2. Calculate each frame, relatively to the position of the car, the previous Plane and the next Plane
  3. With this two planes, we have information about what checkpoint we have left back, and which is going to be reached.
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!!
Advertisement
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.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

You could try preventing them from taking shortcuts by using walls.

This topic is closed to new replies.

Advertisement