Jump to content
  • Advertisement
Sign in to follow this  
phil67rpg

simple game

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

I am developing a game where a space ship shoots bricks at the top of the screen from the bottom of the screen. I have done alot of research on collision detection and bounding boxes in particular but I am still confused about how to implement a good collision detection routine.If you know of any really good web sites please share them with me.

Share this post


Link to post
Share on other sites
Advertisement
For collision detection for shooting bricks, you could just go with the InsersectRect() function as the bullets would just travel straight up and always hit from below (I'm assuming). That should mostly suffice your needs depending on what you want to do. If it was a ball/brick collision like BreakOut, now that's a different story. wink.png

Share this post


Link to post
Share on other sites
You may experience the problem of your bullets travelling too fast, e.g. gone all the way past a brick without a collision in one time step. In that case intersecting a line with a rectangle might make more sense, e.g. the line from bullet_old_y to bullet_new_y.

Share this post


Link to post
Share on other sites

You may experience the problem of your bullets travelling too fast, e.g. gone all the way past a brick without a collision in one time step. In that case intersecting a line with a rectangle might make more sense, e.g. the line from bullet_old_y to bullet_new_y.


Thank you jefferytitan. I forgot to mention that part. smile.png

Share this post


Link to post
Share on other sites
I am currently working on a breakout/space invaders cross.I am using dx9 and c++.There sure is alot to learn but things are going along nicely.the hardest part is the collision detection.

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!