List Info

Thread: Racing game second approach




Racing game second approach
user name
2006-03-27 07:16:27
>The idea is to use 4 ModelsUnderRays, one from each
corner of my car aiming
down towards the ground. These MODs will be used for the car
to follow the
ground and also work for collision detection with other
cars. Before the
MODs are casted everything in the 3Dworld will be removed
except the ground
and one simple #plane for each car (that is located on the
ground beneath
the real cars). If a ray hits one of those planes then it's
a collision with
that car. If the ray doesn't even hit the ground then the
car is outside the
track (i.e hitting a wall or something).

Sounds like a good approach, but I'd suggest that you use
meshes instead of 
planes; firstly because your car 'shadows' are going to
need to be skewed 
and scaled as the cars move around, and secondly for speed
(generally, Lingo 
primitives are a lot slower than meshes). The only major
problem you're 
going to encounter is that this is a detection system that
can only tell if 
a collision *is* occurring, not if it's *about to* occur.
This is likely to 
lead to problems. You might be able to avoid it by a)
limiting movement per 
frame to a small distance, and b) instead of using a mesh
showing the car's 
position, use one that shows the total area swept out by the
car during its 
period of motion (a kind of lozenge-shaped hexagon that
probably has a 
common name in game algorithm circles...) This won't avoid
all the problems, 
but it should mean that you catch most collisions, only
missing the more 
glancing ones.

Danny 

_______________________________________________
dirGames-L mailing list  -  dirGames-Lnuttybar.drama.uga.edu
http://nuttybar.drama.uga.edu/mailman/listinfo/dirgames
-l
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )