I want to make a race game,but I don't know how to do the CD work.

Started by
1 comment, last by Antheus 16 years, 10 months ago
Hey I'm wondering how the racing game do there CD( Collision Detect ) Work??? Does BSP suit for the racing game?? Or there is something else can handle it ??? Appreciate your help!!!
Advertisement
That depends, is it a 2D or 3D game?

If it's a 3D game, you'll need BSP's for rendering but not for collision detection. You still have to do collision detection the same way, just with a z-axis.

If it's a 2D game, it all depends on the perspective. If it's a side-scroller or top-down game, collision detection should be the same. If you're thinking about making a Mode-7 racer, I'm not sure how the collision detection would work.
Quote:Of course justice isn't equal. Rich people can afford lawyers, where poor people get McLawyers.
It comes down to precision you want.

The simplest way is to check for circle/sphere collision. This won't give you accurate results, but makes calculation of collision response trivial. In addition, the non-determinism (or determinism, depends on gameplay) may add much more game-y feeling.

For accurate collisions, you'll likely need to partition your search space first (quad-, oct-, R-, sphere- trees) for proximity checks, then perform geometry collision checks.

Much of this will also depend on your overall design of the world. How the static geometry is uses, how complex are dynamic objects and how many different objects move during frames.

A variation of the first system is to aproximate the object that can collide with a set of spheres. So rather than comparing thousands of triangles, you end up testing for dozens of spheres. Depending on the shape of the objects, these approximations can be surprisingly accurate (humanoid shapes are suitable, buildings less so, but then, those can be approximated with boxes, box/sphere test is still cheap)

This topic is closed to new replies.

Advertisement