Per Pixel collision

Nibbie
Posts: 2
Joined: 2008.10
Post: #1
Hi.
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?

Thanks
Quote this message in a reply
Moderator
Posts: 1,560
Joined: 2003.10
Post: #2
If you have the raw image data for the player and for the map in memory, it should be easy enough to check the pixels manually based on the player's position.
Quote this message in a reply
Nibbie
Posts: 2
Joined: 2008.10
Post: #3
The map might be quite large, I don't want to waste too much memory
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [Problem] Loading image with OpenGL orthogonal view pixel-to-pixel Lexis 2 3,629 Aug 21, 2009 01:35 AM
Last Post: Lexis