; FrontBuffer Example ; ------------------- Graphics 640,480,0,2 SeedRnd MilliSecs() ; Show the instructions once via the back buffer and Flip SetBuffer BackBuffer() Cls Text 0,0,"Hold the left mouse button to spray paint Esc: exit" Text 0,20,"Everything below is drawn straight to FrontBuffer() - no Flip needed" Flip ; From now on draw straight to the VISIBLE front buffer SetBuffer FrontBuffer() While Not KeyDown(1) ; Each star appears the instant it is drawn Color Rand(100,255),Rand(100,255),Rand(100,255) Plot Rand(0,639),Rand(50,479) ; Spray paint under the mouse pointer If MouseDown(1) Then Color Rand(255),Rand(100,255),0 Oval MouseX()+Rand(-15,15),MouseY()+Rand(-15,15),4,4,1 EndIf ; Small delay so the drawing is watchable Delay 5 Wend End