Jump to content
  • Advertisement
Sign in to follow this  
bigbanggames

Mask vs. BoundingBox Collision vs.....

This topic is 2120 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 making a 2D game in MonoGame. It revolves around keeping an orb on a path. My first idea was to create a mask using an array or a generic data structure. My second idea was to use sprites surrounding the path and then checking for collisions. I am sure some one here has worked on something similar. I was wondering which was a better approach or if there is an even better way to approach it? I understand asking which is "better" is a very subjective question, when I say "better" I mean: more efficient, easier to implement ( using XML for levels), and easier to extend. Here is an image I used to hash out the bounding box idea. The black is the path and the different gray boxes with red outlines would be the sprites used for collisions.
 

OTrYuar.png

 

Thanks in advanced!

Share this post


Link to post
Share on other sites
Advertisement

I would use bounding boxes collision. In my opinion it would fit better in that context. But is just my opinion.

Edited by Bratie Fanut

Share this post


Link to post
Share on other sites
Bounding boxes are the way to go. The only problem you might run into is in that path that's very narrow. If the box isnt to the very edges of the orb, you'll get a false collision

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!