Sign in to follow this  

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

This topic is 3837 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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)

Share this post


Link to post
Share on other sites

This topic is 3837 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this