on May 30th, 2016, 11:54pm, michael wrote:| There is of course these commands too that allow you to do draws behind the scenes and show the draws at will. |
|
Except that they only work when drawing graphics into the mainwin, so are not generally useful.
The easiest way to achieve 'flicker free' animated graphics in LBB (other than using sprites) is to use the normal JB/LB commands but to put them all - including the initial CLS - into a single string. That makes the best use of LBB's double-buffering:
Code: timer 40, [animate]
wait
[animate]
g$ = "cls;"
g$ += "<graphics commands>;"
g$ += "<more graphics commands>"
#g g$
wait
By concatenating all the graphics commands for one 'frame' into a single string (sadly you can't do that if text is included) you avoid the possibility of Windows refreshing the screen when the graphics are only partly drawn, which is what results in flickering.
There may still be some 'tearing' (because the drawing isn't synchronized with the display refresh rate) but with care you can get good results this way.
Richard.