Jump to content
  • Advertisement
Sign in to follow this  
CodeBoyCjy

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

This topic is 4122 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

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!!!

Share this post


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

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!