I'm working on the AI for my racing game. Does anyone have any suggestions or advice? Google doesn't turn up much.
So far, I have a basic waypoint system set up, so the AI caes follow the track. I also implemented a system of raycast "whiskers", so the cars can do some simple obsacle avoidance.
The proble is, they get stuck in corners way too easily, and generally look stupid.
Any ideas, hints or links would be appriciated.
Any suggesgions for a racing car AI?
Started by geon, Oct 14 2009 05:18 PM
6 replies to this topic
#1
Posted 14 October 2009 - 05:18 PM
#2
Posted 14 October 2009 - 06:09 PM
There's some old stuff here:
http://www.aiwisdom....nre_racing.html
There's Craig Reynold's stuff online on flocking/swarming.
http://www.red3d.com/cwr/steer/
Also check:
http://www.gamasutra...ion_.php?page=1
This should give you more than enough keywords to help make Google your b**ch...
http://www.aiwisdom....nre_racing.html
There's Craig Reynold's stuff online on flocking/swarming.
http://www.red3d.com/cwr/steer/
Also check:
http://www.gamasutra...ion_.php?page=1
This should give you more than enough keywords to help make Google your b**ch...
Hyperbole is, like, the absolute best, most wonderful thing ever! However, you'd be an idiot to not think dogmatism is always bad.
#3
Posted 15 October 2009 - 01:05 PM
Thanks for the links!
And I should mention that the game is for the iPhone, so it needs to be light-weight.
And I should mention that the game is for the iPhone, so it needs to be light-weight.
#4
Posted 19 October 2009 - 03:59 PM
Update:
I have the pathfinding working great now. I implemented this: http://www.red3d.com...PathFollow.html pretty much verbatim.
I want to combine it with some kind of obstacle avoidance. This:
http://www.red3d.com...r/Obstacle.html
or preferably this:
http://www.red3d.com...ontainment.html
would be great.
However, I don't have access to the same data. I can raycast into the scene or selections of it, and read the normal, position, object etc. from the hit, but that's pretty much it.
The "Obstacle" algorithm in the links use the center of the objects, which I guess would work fine for circles, but I use mostly boxes. The "Containment" algorithm use a general interface where it query the wall for the nearest-point-on-surface. I don't have that available in my engine (Unity), and I don't think it's feasible to implement it as a script. It also seems to work best with rounded corners.
Any other ideas?
I have the pathfinding working great now. I implemented this: http://www.red3d.com...PathFollow.html pretty much verbatim.
I want to combine it with some kind of obstacle avoidance. This:
http://www.red3d.com...r/Obstacle.html
or preferably this:
http://www.red3d.com...ontainment.html
would be great.
However, I don't have access to the same data. I can raycast into the scene or selections of it, and read the normal, position, object etc. from the hit, but that's pretty much it.
The "Obstacle" algorithm in the links use the center of the objects, which I guess would work fine for circles, but I use mostly boxes. The "Containment" algorithm use a general interface where it query the wall for the nearest-point-on-surface. I don't have that available in my engine (Unity), and I don't think it's feasible to implement it as a script. It also seems to work best with rounded corners.
Any other ideas?
#6
Posted 27 October 2009 - 01:45 AM
Thanks, monjardin. An interestng artcle. I had some thoughts about neural nets or whatnot, but I think that's out of my league for now. The actual path following works great as it is, while the obstacle avoidance could use some work.
I've implemented an epic hack to solve the problem of cars getting stuck. When they are off screen, i simply move them back on track if they have been too far frm the center of the path for too long. It works pretty well!
I've implemented an epic hack to solve the problem of cars getting stuck. When they are off screen, i simply move them back on track if they have been too far frm the center of the path for too long. It works pretty well!
#7
Posted 02 November 2009 - 04:49 AM
geon said:
i simply move them back on track if they have been too far frm the center of the path for too long. It works pretty well!
I remember a few games that did that bullshit, it annoyed me... 'Cause I knew they couldn't pop back on the track that fast.
“You may be disappointed if you fail, but you are doomed if you don't try.”
Beverly Sills
Beverly Sills
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


This topic is locked









