Jump to content

  • Log In with Google      Sign In   
  • Create Account

Clashing Enemies


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.

  • This topic is locked This topic is locked
3 replies to this topic

#1 mypel16000   Members   -  Reputation: 46

Like
0Likes
Like

Posted 24 January 2013 - 02:04 PM

Hi, many of you might have been following the process of my game, and I have got very very far. I encounter a problem though. I have multiple enemies that chase the player around the screen. (2D seen from above). A big problem that I have encountered is that as you walk past them in circles, they all start coming together, and as there is no collision, they all group onto the same point and are seen as one, they all get to the same X and Y if you don't get me. Now, I can perfectly check collision, either pixel circle, bounding box or polygonal, but i don't know what to do if the collision returns true... do I make it go upwards, downwards..... Is there a way to simple revert the movement of the last frame?



Sponsor:

#2 glf1311   Members   -  Reputation: 412

Like
0Likes
Like

Posted 24 January 2013 - 05:46 PM

Any reason why you posted your question twice?

#3 mathew_653   Members   -  Reputation: 107

Like
0Likes
Like

Posted 24 January 2013 - 06:02 PM

I can see two possable solutions, if an enemy is collideing, apply velocity to the one to push em away from each other.

or use the enemy that is collided with and the players position to recalculate a path.

 

Hope i am being helpful.



#4 ApochPiQ   Moderators   -  Reputation: 15683

Like
0Likes
Like

Posted 24 January 2013 - 06:05 PM

Closing duplicate thread.

See original here.

Edited by ApochPiQ, 24 January 2013 - 06:05 PM.





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