Hi,
I have been programming a road simulator/game, and I’m having problmes
with the driver’s AI.
The game uses a tile map(with directed streets)
My algorithm has two parts:
Road Following:
-The driver knows the next 4 tiles the car will go. (tile 1 is the current tile where the car is)
-If there is a change in direction in the tiles 2 or 3, slows down the car
-For each step the dirver tries to mantain the car aligned with the road (tile direction).
Collision Avoidance:
-The driver look for cars near.
-If the car found is in front if the driver’s car and in the next step the cars are nearer, then slows down the car.
I still have problems on crossings, and the cars never stops completely. I want to include semaphores.
Do some of you have some pointers to info on programming car driver’s AI??
Rafael.-