I think we are getting slightly off topic-- I was specifically referring to a racing game (not traffic)-- possibly something like Gran Turismo or F-Zero, or Wipeout or some sort of Nascar game where the physics of the vehicle around the turns is very important. Ideally, the vehicles would be driving at, or close to the optimal path around the track.
I think traffic would be much simpler to program in; I’d have nodes placed all over the place, and then have various things like stop light nodes, which would be attached to 4 sub nodes. If the light was yellow, it would tell anyone who reached a specific node to keep going, and any else to stop. You could even do something like have the nodes keep track of the vehicles and have the vehicles talk to eachother through the nodes when they reach things like 4 way intersections.
A game like Wipeout for example, (or even Mario Cart) gives the user of the game the ability to force the car into a skid, which can provide distinct advantages into aiming the vehicle into a certain direction-- and if you’ve watched Nascar, the cars look like the are just on the brink, or skidding ever so slightly around the track. However, I don’t think I’ve ever seen the AI in any of the above mentioned games utilize skidding for the AI (though, that would be pretty cool if they did).
I’m not sure how much you guys know about racing (and I claim to know very little) other than I know that you want to brake just before the turn and start accelerating at the apex. But that is a rule for only simple curves I guess, and for a track possibly F-Zero or Wipeout, where the track could be a cylinder or a half-pipe, have loops, etc, with various utilities to assist you like boost power or attacking, I can only imagine tough it must be to program the AI in as well.
I guess I am just trying to over complicate the AI though by mentioning the above games, because all I am really looking for is a way to calculate the ideal track route for a car (and I am glad you guys mentioned track traffic, because that definitely makes the need for multiple routes along a curve-- it might be more advantageous to be on the outside of a curve rather than the inside-- and that problem only gets worse if the curve is S shaped-- you might be able to pass a vehicle by being on the outside of the beginning curve, while being able to sneak in on the ending curve.
But to simplify, and set all things aside (such as missiles, various utilities to attack another vehicle, or some sort of boost power like Nitrous Oxide), has anyone tried to make a Nascar-esq racing style game where the way to win is to have a perfectly tuned vehicle looping perfect (or very close to perfect) routes around the track?
I’d like to know because if I were to end up making an F-Zero style game in the future, I’d like to know the technique for doing it rather than just trying to guess the track routes with various accelerate / brake nodes.
P.S. Thanks for the replies 