Jump to content
  • Advertisement
Sign in to follow this  
ms75214

enemy collision

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

What is the best way to handle the case where enemies (UFOs) collide in a game?
1. make them never collide
2. make them kill each other if they collide
3. just ignore it and have one overlap the other in the drawing
4. just ignore it and not worry about what the drawing looks like

Share this post


Link to post
Share on other sites
Advertisement
If I assume correctly, and this is in 2D, just let them overlap. It just gives the feeling of one passing in front of the other.

Share this post


Link to post
Share on other sites
I would guess number 3 is best, however it would be interesting if combined with number 2. Say if you shoot ufo and it looses control and crashes into nearest ufo.

Share this post


Link to post
Share on other sites
Assuming 2D, a few points:

1) This may appear unrealistic, depending on how it's handled.
2a) Do you want them to be incompetent?
2b) Do you want to include collision avoidance?
3) This allows you to specify which object overlaps the other, which can allow you to do psuedo-3D (such as scaling the sprite of the object that's passing over/under).
4) This can result in flickering, as your drawing code draws one or the other first each frame.

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!