Advertisement

Collision Maps

Started by January 19, 2002 09:45 PM
0 comments, last by The Kid 23 years, 1 month ago
Does anyone have any information or links to information about determining colors, and working with a texture file (BMP, JPG, TGA ect) they would be willing to share with a beginner ? I want to detect collision based on a ''collision map''. Where in a read from a texture and decide if a space can be moved to based on the collision map''s color value (white or black). I suppose I could just store a 1 or a 0 in a huge 2D array, but I''d still like to know how to deal with a texture on a pixel by pixel basis. Thanks in advance for you help. The Kid I don''''t know what the future holds, but I know who holds the future.
I don''t know what the future holds, but I know who holds the future.
File formats ? Go there or there.

As to dealing with an image on a per-pixel basis, well, once your image is in memory, you can manipulate it there.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan

This topic is closed to new replies.

Advertisement