[Gambas-user] smooth animation using double buffering

Rob sourceforge-raindog2 at ...94...
Fri Jun 18 16:59:20 CEST 2004


On Friday 18 June 2004 10:07, danielcampos at ...282... wrote:
> Then, may be that example should be revisited, as a little
> sprite should not be a problem for a 500Mhz processor!

Oh, it's not just a little sprite, it's also the background and 
both are being redrawn into an offscreen buffer on every frame, 
and then copied into the DrawingArea.  That's what double 
buffering is.

If you just made the ship and background Gambas controls or 
something, it would flicker terribly whenever you moved.  No, I 
thought I was pretty upfront about it being a bit slow on my 
laptop in power save mode, and I expect a 500MHz box would be 
too slow to play it at full speed, but I don't know why it's 
drawing the game at nearly full screen but ignoring input.  
Probably needs a WAIT at the end of the timer's event handler 
before it re-enables itself.

Rob





More information about the User mailing list