Would it be more efficient to handle 2D collision detection with polygons, rather than both squares/polygons?

Posted by KleptoKat on Game Development See other posts from Game Development or by KleptoKat
Published on 2013-10-21T09:40:36Z Indexed on 2013/10/21 10:17 UTC
Read the original article Hit count: 210

I'm working on a 2D game engine and I'm trying to get collision detection as efficient as possible. One thing I've noted is that I have a Rectangle Collision collider, a Shape (polygon) collider and a circle collider. Would it be more efficient (either dev-time wise or runtime wise) to have just one shape collider, rather than have that and everything else? I feel it would optimize my code in the back end, but how much would it affect my game at runtime? Should I be concerned with this at all, as 3D games generally have tens of thousands of polygons?

© Game Development or respective owner

Related posts about 2d

Related posts about collision-detection