Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualtreiguts

Posted 17 October 2012 - 11:24 AM

HI!
I'm working at my very first game, 2D platformer, and I came across collision problem.

Given some random object in map ( object A ), how to find object B for collision check? I attached an image. At bottom, there is blue platform. That specific platform should be checked for collision with 3 objects: player, right and left rock. All other objects doesn't matter. Question: how do I keep link between those objects?

And player, should I brute-check with all objects in map, whether they collide? That seems ineffective.
I wouldn't want to keep two-dimensional array for tile positions, because I have moving objects besides player.

http://i.imgur.com/JnBbz.png

#1treiguts

Posted 17 October 2012 - 11:22 AM

HI!
I'm working at my very first game, 2D platformer, and I came across collision problem.

Given some random object in map ( object A ), how to find object B for collision check? I attached an image. At bottom, there is blue platform. That specific platform should be checked for collision with 3 objects: player, right and left rock. All other objects doesn't matter. Question: how do I keep link between those objects?

And player, should I brute-check with all objects in map, whether they collide? That seems ineffective.
I wouldn't want to keep two-dimensional array for tile positions, because I have moving objects besides player.

PARTNERS