Jump to content
  • Advertisement

Archived

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

Kagemusha

Not-so-simple 2D Collision

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

Let''s say that you were making a Lunar Lander type game using Pouya''s signature as the background: How would you test for collision detection with the hills? A tilemap probably wouldn''t be accurate enough (unless the tiles were very small, and that would bring up tilemap generation issues), and testing per-pixel would be too slow... Any ideas?

Share this post


Link to post
Share on other sites
Advertisement
hi, man, i think u must set the collision detection in the x,y
between the x ,y for the player and the x,y for the mountain

Ahmed Saleh
EGYPT

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I would use lines and polygons and test the spaceship against those polygons or lines...

Share this post


Link to post
Share on other sites

Maybe you could use bitmask detection.
A bitmask with the lunar lander, and a bitmask with the tiles. The bitmask with the tiles would be colour specific. The colours that make up the mountains would turn the bitmask to TRUE. The sky and clouds would be FALSE for no collision detection. However, this would only make the sky clear of collision and you couldn''t land in the foreground.

Guy

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!