3D Racing AI
Hello,
I am working on the AI for a street racing game project, currently I am a lil confused and stuck on the best approach to do this without using much cpu. As it stands now I plan on doing the following:
Creating waypoints around the track, having the cars use these waypoints as reference but use a lookup table to change the exact position they travel in accordance to the waypoint to try to avoid repetetive paths. Then I plan on extending a vectore in front of the car and beside the car that will cause it to steer around problems and help with overtaking.
Right now I sort of have the waypoints going, the object does not turn to face the object htough it just kind of glides. To make it face the object would I preform a turntowards algorithm? Using the waypoint pos as the targetpos and the car position as the origin? If anyone has some pseudo code for a turn towards algorithm I would appreciate it.
Also there is one last problem I am faced with, due to the way my track is created:(screenshot of track below)
http://www.10-94racing.com/images/sstrack.jpg
I am not sure how to handle the median strip on the road. Do I set up two different sets of way points or what is the best way to handle that since there is collision set up on it.
I appreciate any help you may have on this situation. It would really mean alot, thanks.
I get the impression that you don't have a vehicle physics model sorted out. The waypoint idea is fine, but it's best to work the AI into the same control interface as the player. In other words, get a controllable vehicle first, then create AI to control it.
I have to say that mwtb's advice is very wise indeed. Not doing so is like trying to learn to tie your shoes but your shoes don't have shoe laces yet.
To add to this advice, I would say, create the car, use standard input (keyboard or mouse) to test the behavior of your car and car's physics in relation to your racing track. Once the car drives "normally according to the game's goals" then you can start to see how you can get the computer to drive the car instead of you. So on and so forth.
To add to this advice, I would say, create the car, use standard input (keyboard or mouse) to test the behavior of your car and car's physics in relation to your racing track. Once the car drives "normally according to the game's goals" then you can start to see how you can get the computer to drive the car instead of you. So on and so forth.
When they say it can't be done, THAT's when they call me! ;-)MystikShadows a.k.a. Steph
http://www.10-94racing.com/images/sstrack.jpg
I agree also. On your median strip, I think to model it as two seperate roads is best, if there is a physical barrier between the lanes.
I agree also. On your median strip, I think to model it as two seperate roads is best, if there is a physical barrier between the lanes.
Thanks for the advice and yeah I understand its hard to conceive a working model of AI until after you have a working player model.
However as my project goes I am on a tight schedule and we have 2 months to complete the project, the project just started recently and the physics and such will not be fully completed for another month or. Which will leave me less than a month to fix the AI. Right now I am searching for a pathfinding solution, I know the rest of the AI will have to fall into place, but just getting it to follow the track in a non static way is sort of what I am searching for.
Still looking for a solution the rest of this week then starting code next week. Even if its just the begining framework.
However as my project goes I am on a tight schedule and we have 2 months to complete the project, the project just started recently and the physics and such will not be fully completed for another month or. Which will leave me less than a month to fix the AI. Right now I am searching for a pathfinding solution, I know the rest of the AI will have to fall into place, but just getting it to follow the track in a non static way is sort of what I am searching for.
Still looking for a solution the rest of this week then starting code next week. Even if its just the begining framework.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement