Ben James :: adventures in gaming

100101.org

11
Jan

Collision Detection Hurts My Brain

So, I’ve hit the point in developing my Sopwith Clone where I’m starting to have performance issues when I run it. It started when I was implementing the machine gun fire, because it involves collision detection between a relatively high number of sprites.

I’ve been using Ziggy’s Per-Pixel Collision Detection algorithm (slightly modified to account for animated sprites) to do all my collision detection, which has been working very well so far, but it looks like I’m going to have to decide which collisions actually require per-pixel accuracy and which will make do with bounding box collisions.

This is the part of development I enjoy the least, but I’m going to do my best to slog through and get the performance back up to an acceptable level. I’m going to have to look into the best way for detecting bottlenecks in the code, because surely there has to be a better way than just whacking a time measurement around the code you think is causing the problem…

I’ve also started thinking about my next game (getting ahead of myself a bit, I know), which I’m hoping I’ll be able to enter into Microsoft’s Dream, Build, Play contest. I’ve got a few ideas, it’s difficult coming up with something original though (it’s a shame the Sopwith game is a clone, otherwise I’d try to polish it up and enter it)

I’ve got a week off next week before I start my new job, so hopefully I’ll be able to finish off Sopwith and start on the next game in that time.

Leave a Reply

Powered by Wordpress 2YI.NET Web Directory