Jump to content

  • Log In with Google      Sign In   
  • Create Account


enemy collision


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 ms75214   Members   -  Reputation: 143

Like
0Likes
Like

Posted 22 July 2012 - 08:14 AM

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

Sponsor:

#2 DavitosanX   Members   -  Reputation: 271

Like
0Likes
Like

Posted 22 July 2012 - 09:00 AM

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.

Starting out in game programming? Me too! Check out my blog, written by a newbie, for the newbies. http://myowngamejourney.blogspot.mx/


#3 Neometron   Members   -  Reputation: 313

Like
0Likes
Like

Posted 22 July 2012 - 10:50 AM

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.

#4 Narf the Mouse   Members   -  Reputation: 318

Like
0Likes
Like

Posted 22 July 2012 - 12:36 PM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS