Per Pixel Collision

Discussion in 'iOS Programming' started by Bliddo, Oct 15, 2008.

  1. Bliddo macrumors newbie

    Oct 15, 2008
    I'm currently developing an iPhone game, I need some help to implement the collision detection.
    The basic idea is that I have a large han drawn map, tha player should be able to move in all the black regions of it. In OpenGL I obtained that by performing a 1:1 check between the player 32x32 texture and a 32x32 portion of the map texture(the portion where tha player is on obviously).
    I used the glGetTexImage and glReadPixels methods to do this, but now in OGL ES there's no glGenTexImage and the ReadPixel is too slow for an handheld device.
    Is there a better way to perform per pixel collision checks? I only need a true/false check.
    Any ideas?

  2. copenhagencocoa macrumors newbie

    Oct 14, 2008
    Try to look at the open-source game-/physics-engine cocos2d/chipmunk.

Share This Page