Sign in to follow this  

enemy collision

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

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