DevMaster.net Forums
[[ Home | Forums | 3D Engines Database | Wiki | Articles/Tutorials | Game Dev Jobs | IRC Chat Network | Contact Us ]]

Go Back   DevMaster.net Forums > Programming & Development > Artificial Intelligence
User Name
Password
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
Old 10-14-2009, 11:18 AM   #1
geon
Senior Member
 
geon's Avatar
 
Join Date: Sep 2005
Location: Jönköping, Sweden
Posts: 546
Default Any suggesgions for a racing car AI?

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.
___________________________________________
Topmost webbyrå i Jönköping - webbutveckling & design
geon is offline   Reply With Quote
Old 10-14-2009, 12:09 PM   #2
alphadog
DevMaster Staff
 
Join Date: Sep 2008
Location: Left Of Albakurky
Posts: 734
Default Re: Any suggesgions for a racing car AI?

There's some old stuff here:
http://www.aiwisdom.com/bygenre_racing.html

There's Craig Reynold's stuff online on flocking/swarming.
http://www.red3d.com/cwr/steer/

Also check:
http://www.gamasutra.com/view/featur...on_.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!
alphadog is offline   Reply With Quote
Old 10-15-2009, 07:05 AM   #3
geon
Senior Member
 
geon's Avatar
 
Join Date: Sep 2005
Location: Jönköping, Sweden
Posts: 546
Default Re: Any suggesgions for a racing car AI?

Thanks for the links!

And I should mention that the game is for the iPhone, so it needs to be light-weight.
___________________________________________
Topmost webbyrå i Jönköping - webbutveckling & design
geon is offline   Reply With Quote
Old 10-19-2009, 09:59 AM   #4
geon
Senior Member
 
geon's Avatar
 
Join Date: Sep 2005
Location: Jönköping, Sweden
Posts: 546
Default Re: Any suggesgions for a racing car AI?

Update:

I have the pathfinding working great now. I implemented this: http://www.red3d.com/cwr/steer/PathFollow.html pretty much verbatim.

I want to combine it with some kind of obstacle avoidance. This:
http://www.red3d.com/cwr/steer/Obstacle.html
or preferably this:
http://www.red3d.com/cwr/steer/Containment.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?
___________________________________________
Topmost webbyrå i Jönköping - webbutveckling & design
geon is offline   Reply With Quote
Old 10-26-2009, 10:47 AM   #5
monjardin
Senior Member
 
Join Date: Oct 2005
Location: Pensacola, FL
Posts: 1,028
Default Re: Any suggesgions for a racing car AI?

I recall reading an interesting interview with the developer of a rally car racing game that used neural networks. I believe this is it.
___________________________________________
monjardin's JwN Meter (1,2,3,4,5,6):
|----|----|----|----|----|----|----|----|----|----|
*
monjardin is offline   Reply With Quote
Old 10-26-2009, 07:45 PM   #6
geon
Senior Member
 
geon's Avatar
 
Join Date: Sep 2005
Location: Jönköping, Sweden
Posts: 546
Default Re: Any suggesgions for a racing car AI?

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!
___________________________________________
Topmost webbyrå i Jönköping - webbutveckling & design
geon is offline   Reply With Quote
Old 11-01-2009, 09:49 PM   #7
Hyper
Member
 
Hyper's Avatar
 
Join Date: Mar 2009
Location: USA, Texas
Posts: 83
Default Re: Any suggesgions for a racing car AI?

Quote:
Originally Posted by geon
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
Hyper is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Forum Jump


All times are GMT -7. The time now is 01:56 PM.


Powered by vBulletin
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.