I split it into two aspects, vertical and horizontal. Vertical being the speed and horizontal being the steering.
I decided to use the same system I use to track car position to also guide the AI. Each little yellow square you see is a node on the track. To manage the steering, the car aims towards the next upcoming node, then once it gets close to it (within 20 units) it starts to aim towards the node following the one it was originally aiming for. This gives pretty solid curving.
Speed is managed quite simply. It gets the current position along the nodes, and if it is 3/4 of the way, it gives input to slow down, breaking harder as it get's closer to the corner. Then once it switches nodes puts the foot down again.
The AI controls input rather than directly controlling the car if that makes sense. So it doesn't control the speed, just emulates a player pressing keys etc. This I found plugs easily into my existing car controller, and gives a more realistic aspect which the player can emulate, as the car isn't cheating in terms of faster acceleration.
If this doesn't make sense, let me know. I can't explain things all to well
Taken from ProjectTaurus, an arcade racing game I'm developing. Current aim is a multiplayer and singleplayer title. With the goal of creating something fun over realism, for any amount of time or amount of players.
Ubuntu 16 had the name Xenial Xerus
I split it into two aspects, vertical and horizontal. Vertical being the speed and horizontal being the steering.
I decided to use the same system I use to track car position to also guide the AI. Each little yellow square you see is a node on the track. To manage the steering, the car aims towards the next upcoming node, then once it gets close to it (within 20 units) it starts to aim towards the node following the one it was originally aiming for. This gives pretty solid curving.
Speed is managed quite simply. It gets the current position along the nodes, and if it is 3/4 of the way, it gives input to slow down, breaking harder as it get's closer to the corner. Then once it switches nodes puts the foot down again.
The AI controls input rather than directly controlling the car if that makes sense. So it doesn't control the speed, just emulates a player pressing keys etc. This I found plugs easily into my existing car controller, and gives a more realistic aspect which the player can emulate, as the car isn't cheating in terms of faster acceleration.
If this doesn't make sense, let me know. I can't explain things all to well
Taken from ProjectTaurus, an arcade racing game I'm developing. Current aim is a multiplayer and singleplayer title. With the goal of creating something fun over realism, for any amount of time or amount of players.
More can be seen at /r/ProjectTaurus
Undecided on that one, but thanks for checking everything out!
Yup, customisation is a core aspect of it. Got a little gfy of what is currently in (recorded it for this comment).