aungsithu at November 6th, 2008 03:27 — #1
I'm working a racing sim.
There's no player controlled car in this application.
All the cars will race automatically.
I could implement AI cars following waypoints as a guide on the track.
One specific requirement for my application is these cars must be finished the race in specific order (ranks, position, whatever).
If I use pure AI and physics then the result may not be exactly as I want.
So, any ideas on this specific requirement?
Thanks in advance.
alphadog at November 6th, 2008 08:41 — #2
vrnunes at November 7th, 2008 19:38 — #3
I used splines (ex: http://en.wikipedia.org/wiki/Cubic\_spline) in one racing game with a great success.
First I created some base splines around the track, then randomized slightly every knot, giving the AI racers a visually natural feeling of "intelligent" driving, because they never followed exactly the curves.
That was just quick to implement and quite rewarding.