Ben James :: adventures in gaming

100101.org

29
Jun

Collision Detection Still Hurts My Brain

function liveJournal()
{
var listeningTo = new Band(”killswitch engage“);
var mood = “frustrated”;
}

Game programming would be so much easier if it weren’t for all the damned maths. What frustrates me is I’ve dealt with this exact same problem before, but my brain’s just not in the right place to think about it, no matter how hard I might try.

I’ve moved away from my Tower Defense style game for the moment to try to put together an entry for a contest I found on the NewGrounds BBS, it’s pretty much a derivation of Joust, but with some kiddy graphics and a bit of educational value (which are requirements for the contest). My brain is having difficult working through simple bounding box collisions at the moment though, so I’m not working on it any more tonight.

Sorry, I should say the collisions part isn’t what I’m having difficulty with, because MovieClip.hitTest does that for me, it’s what to do with each object after a collision is detected. I pretty much just want to do a projection and move the character so it’s not overlapping the level object anymore, but that’s complicated by the fact that what I’m actually doing the detection against are sub-clips of each object, so the different co-ordinate systems come into play.

It’s probably not actually that difficult a problem, but I’ve been wrestling with it all evening trying to get my head around it, and I’m just not there. (This is why I failed my Maths course at Uni the first time)

Leave a Reply

Powered by Wordpress 2YI.NET Web Directory