Computer Science Canada flashing screen |
Author: | bahomit250 [ Wed Apr 19, 2006 12:45 pm ] | ||
Post subject: | flashing screen | ||
i got a proablem with my program ewhen the characther moves the screen flash and the background erases then reappers but it makes it look terrible here the code [/code] setscreen ("graphics:max;max") var trees := Pic.FileNew ("trees.bmp") var birdy := Pic.FileNew ("birdy.bmp") var x, y : int := 100 Pic.Draw (birdy, x, y, picXor) Pic.Draw (trees, 25, 0, picCopy) var chars : array char of boolean Pic.Draw (birdy, x, y, picXor) loop Pic.Draw (trees, 25, 0, picCopy) Pic.Draw (birdy, x, y, picXor) Input.KeyDown (chars) if chars (KEY_LEFT_ARROW) then x := x - 10 Pic.Draw (birdy, x, y, picXor) delay (20) cls Pic.Draw (birdy, x, y, picXor) Input.KeyDown (chars) end if if chars (KEY_LEFT_ARROW) then x := x Pic.Draw (birdy, x, y, picXor) delay (20) cls end if Input.KeyDown (chars) if chars (KEY_RIGHT_ARROW) then x := x + 10 Pic.Draw (birdy, x, y, picXor) delay (20) cls Input.KeyDown (chars) end if if chars (KEY_RIGHT_ARROW) then x := x Pic.Draw (birdy, x, y, picXor) delay (20) cls end if end loop
|
Author: | codemage [ Wed Apr 19, 2006 1:12 pm ] |
Post subject: | |
You'll be interested in offscreenonly & View.Update http://www.compsci.ca/v2/viewtopic.php?t=3077 |
Author: | bahomit250 [ Wed Apr 19, 2006 1:30 pm ] |
Post subject: | |
we only have turin 4.0.3 |
Author: | do_pete [ Wed Apr 19, 2006 1:40 pm ] |
Post subject: | |
Then you'll have to try using cls as little as possible and draw everything in one chunk of code. |
Author: | Andy [ Wed Apr 19, 2006 1:55 pm ] |
Post subject: | |
view.update works fine with 4.03, even works with 4.01, just not 4.00 and before |