Sign in to follow this  

enemy collision

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

This topic is 1972 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this