Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Elixir

Fast clipping on a 2d plane?

This topic is 6615 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''m building a 2D tile engine and you can of course collide with some tiles. Basic square tiles do not pose a problem, but I need tiles that can do all sorts of collion detection such as rounded edges, slopes, circles, etc. A good example of what I''m trying to replicate is like Sonic the Hedgehog that can fly. He only only walks on 1 plane, the ground. This makes for simple collions as you only need to test 1 column. I also need horizontal clipping. Does anyone have suggestions as to how I could do such things VERY quickly (the theory, not ASM code or something)?

Share this post


Link to post
Share on other sites
Advertisement
The way I did collision detection in my game was to have a set of blocking tiles that i drew to the screen first with a colour used to create the blocking shape, I checked for collision of the player with this colour then drew the proper tiles and the sprites.

Brett

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!