Hi all,
Since I first released the FCR demo the AI has been very basic.
The cars basically just follow the waypoints set up to define the layout of the circuit to move around the track.
This results in the vehicles making their way around on mostly the same path every lap, making the same mistakes each lap and it’s not a very convincing solution.
I sat down yesterday and began re-writing the AI system to make it more realistic.
I still use waypoints but instead of the cars following the path rigidly they now follow a ‘rabbit’ object which follows the waypoints.
Here’s a gif to help me better explain.
the Rabbit is rendered in front of the car as a sphere.

Here’s how it looks in the game.

The footage above was captured on a work in progress circuit which will make it into the game for the next update.
The rabbit varies it’s distance from the car depending on the cars speed.
If the rabbit is too far to either side of the car, the car will drift to turn tighter towards the rabbit object.
The system isn’t perfect and it requires a lot of tweaking but I think this looks more convincing already, cars now make mistakes and don’t follow the same line around the track.
I can easily add more randomisation to the AI vehicles by factoring in aggression and driver skill values.
The next thing to do is to add sensors to the vehicle so I can program in local avoidance, AI cars tipping other cars in and smashing into them on purpose.
That’s all for now, I’ll be back soon with more progress about new vehicles.
Paul.
0 comments