I feel so dumb..
I implemented the plant monsters in such a way that the full plant monster is rendered every frame, even when going up and down the pipe, because the pipe is blitted as a foreground tile over top of the plant monster.
This meant that, whenever the plant monster was moving up and down
- The monster would have to be blitted at full 32x16 pixels
- Four background tiles would need to be redrawn (fast unmasked blit)
- Up to to two foreground tiles would need to be redrawn when moving up and down (slow masked blit)
Although Scorpion doesn't (yet) natively support any kind of "cropping" method that would allow me to hide the bottom of the plant inside the pipe, there was no reason why I couldn't simply implement an up/down animation that scales from 1 pixel high to 16 pixels high. Which means that, other than the monster, I never have to redraw two background tiles to render it, and no foreground tiles at all. So I've done that, and it was (from a coding point of view) a much simpler solution. Doh.
|