Who was it who said the fastest line of code is the one that doesn't get executed....
Well, (brief bit of history) I started writing the core units for my game a LONG TIME AGO.. (when Kylix 1st came out) and all in all, they're very stable.. If a little slow. They handle a lot of stuff from animation, sound and multi layered parallax scrolling and pixel level collision detection.. blah blah blah (enough history)
What was I smoking at the time? The collision detection routine was the culprit the entire time (OK more history.... earlier on on this forum I complained that my logic loop was taking 40ms to complete and I was blaming the lists) By making sure that collision detection isn't even attempted on layers which have no moving elements and that objects can be set as active or passive for collision checks and that the collision loop is only called once!! ops: I've got my logic loop down to 11-15 ms in places.. And thats will a lot of stuff going on including some invisible AI-sensor type objects scanning to see if anything dangerous is coming... they check everything.. and each sprite has 17 of these.
That my friends in my book... is a result
I feel a whole lot better about the way my game is going now.. Expect to see something soon. (ish)
Bookmarks