I've no easy way to profile the rendering code that I'm running, so the next best thing is to count instructions. The original, unoptimised tilemap render routine took 20,818 instructions per frame. After the above-mentioned simple optimisations, that's now down to 11,571, an almost 50% reduction. More than enough to continue with development without further ado.
After fixing one last bug - the sprite colour for an animated Mario - I've captured a small video of the Neo Geo boot-up and straight into the game-play, with Mario running back-and-forth along the bottom girder. Even the sprite priorities are correct, as you see him run behind the oil barrel.
And so from here-on in, I'll be adding code to allow Mario to traverse the entire girder level - including jumping of course - until he can reach Pauline waiting at the top. And although I've already encountered code specifically for the girder level, I suspect when it's all said and done, I'll be able to manoeuvre Mario around all of the 4 different levels.
No comments:
Post a Comment