Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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.

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

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
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

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

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