Ashok Patidar
Ashok Patidar

Reputation: 53

AI opponent car logic in car race game

hello i want to develop AI car(opponent) in car race game what should be my direction to develop them with less complexity because i don't have any idea. because the player car is moving on the scrolling track plz suggest me should i have to use relative motion or way point concept but that should also be change on the scrolling track (i.e. player car movement)

Upvotes: 3

Views: 2071

Answers (3)

PATRY Guillaume
PATRY Guillaume

Reputation: 4337

There is a lot of explanation on this page, with java demonstration (applets) to explains the differents solutions.

regards Guillaume

Upvotes: 0

Shaggy Frog
Shaggy Frog

Reputation: 27601

A simple first pass would be to just "cheat" and keep the opponent car within X distance of the human car, and then slow it down if the human ever gets too far behind. You vary this behaviour with the difficulty level. This is kind of how Super Mario Kart for SNES works.

If you want something more realistic then I think egarcia's opensteer idea sounds like an interesting way to go.

Upvotes: 0

kikito
kikito

Reputation: 52641

You can have a good start by browsing/using the opensteer library.

Upvotes: 1

Related Questions