Re: [TuxKart-devel] Ideas for AI
Status: Alpha
Brought to you by:
sjbaker
|
From: Steve B. <sjb...@ai...> - 2004-06-30 03:01:24
|
Jacob Persson wrote:
> Let's get a bit more specific on how the ai are supposed find it's way around
> the track. I think some kind of waypoint system would be nice to keep
> calculations down.
Well, that's pretty much what I have in TuxKart right now.
When I model a track, I build a second model which is just a set of
points that describe what I believe is a reasonable 'racing line'.
The AI attempts to follow that line.
However, there are some serious problems with that right now.
1) Think about a righthand hairpin turn (eg the first corner
in Oliver's math class where the 'walls' between the track
sections are very thin books and the track sections are very
wide). What happens is that if you are on the entry to that
curve and you hug the right-hand wall, you are actually closer
to the 'waypoint' on the other side of the wall than you are
to the waypoint on your side of the wall. This causes the AI
characters to head-butt the wall endlessly.
2) The waypoints are in 2D - not 3D. Hence, tracks with crossovers
in them (eg Gowns Bow) just flat out don't work. Head-butting
happens all the time in these tracks because the AI's forget
whether they are going over or under the bridge.
3) 3D waypoints don't work when there are jumps and such. The player
can sail over a waypoint at sufficient height that we cause problem
(1) but in 3 dimensions instead of 2.
4) Computer players only hit the powerups by luck.
5) You can't have tracks with alternative routes through them. There
is a really GREAT track on MarioKart'64 that's almost a maze. My
scheme can't cope with that.
6) You can't easily have tracks with dynamically changing routes through them.
I'd like stuff like large turntables that you have to hit at just the
right time if you want to take the shortcut - otherwise you're stuck
with taking the long way around. Things like in WaveRacer'64 where a
shortcut opens up only on the last lap.
So waypoints have their problems...maybe not insurmountable...but
certainly problems that you need to think through in the light of
my sad experience!
---------------------------- Steve Baker -------------------------
HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...>
HomePage : http://www.sjbaker.org
Projects : http://plib.sf.net http://tuxaqfh.sf.net
http://tuxkart.sf.net http://prettypoly.sf.net
-----BEGIN GEEK CODE BLOCK-----
GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M-
V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++
-----END GEEK CODE BLOCK-----
|