Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have no experience in AI at all, but I would like to know how I could do this?
Even if the AI just followed a path how could I do this?

share|improve this question
    
How could you do what, precisely? –  Trevor Powell Oct 29 '12 at 3:50
    
It depends on a lot of other factors - e.g. if there's no car-car collision you can just hard-code car movements or use 'ghosts' from replays of previous races. –  Markus von Broady Oct 29 '12 at 17:33
add comment

closed as not a real question by Trevor Powell, michael.bartnett, Josh Petrie, Noctrine Oct 29 '12 at 17:47

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers

My first thought naive approach would be to create a list of points corresponding to the coordinates of the track curves (probably more points would be needed to prevent the AI keep going against walls after an unplanned collision with another car). When the AI car is close enough to the next point, you would put it (the point) in the end of the list. All the AI car would need to do is to always go in a straight line in the direction of the next point in the list.

share|improve this answer
3  
Yeah, basically waypoints. You have the car use basic steering behaviors to go from one waypoint to the next. –  bobobobo Oct 25 '12 at 2:28
add comment

Yes, make a type of path that the car follows. First, you need to make the car just drive. (Make the car drive forward forever). Create a rectangle at each turn on the track then make if statements for when the AI car intersects them. When the AI intersects them(the rectangles) make it rotate according to where it needs to turn.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.