Collision representation in game overworlds

Posted by Akroy on Game Development See other posts from Game Development or by Akroy
Published on 2012-06-03T23:00:28Z Indexed on 2012/06/04 4:49 UTC
Read the original article Hit count: 217

Filed under:

I'm implementing a 2D overworld where one can walk through an area that is not tile based. I was wondering the best way to implement collisions. In the past when I've done similar things, I've used one image (or set of images) to show an elaborately drawn world and then a second binary image that does nothing but differentiate "wall" and "not wall". Then, I'd use the first for all drawing to the screen, but the second for collision detection. Having another image of the same size to represent collisions seems like lots of overhead. Is there a better way to handle this?

(I'm currently using C++ with SDL, although I'm more interested in general concepts)

© Game Development or respective owner

Related posts about collision-detection