View Single Post
Old 28 November 2015, 22:14   #90
Mrs Beanbag
Glastonbridge Software
Mrs Beanbag's Avatar
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,202
Originally Posted by Codetapper View Post
But then you'd have to have your engine keep track of which bobs have a different mask between animation frames so as to know which ones don't need saving/restoring?
that's true, and currently i don't bother doing that, but if a bob is completely unchanged from one frame to the next (or rather, from one frame to two frames ahead, because double buffering) then it doesn't redraw the background.

3 bullets that that partially obscure different parts of the same tile will then have 3 operations to restore it!
But that is the case anyway, if you are saving the background behind each bob.

All i'm doing is redrawing the map, in rectangular regions, over the bobs from the last frame. In theory i could process that somehow so that such regions never overlapped, and you might be right that that isn't really worth doing. Sure there is some CPU overhead but i "guessed" that it wouldn't be as much overhead as the extra blitting, in the average case. Maybe in the worst case it's not as good, but in the best case it is definitely better, and in the average case, well, i honestly can't give you any concrete numbers.

I apologise for being wrong about Chuck Rock, you seem to be really angry about that, i did say i was "guessing" how it works. I know i don't actually take games apart and analyse them like you do, so i bow to your superior knowledge in that respect.
Mrs Beanbag is offline  
Page generated in 0.04736 seconds with 10 queries