
-----------------------------------
starlight
Sun May 29, 2005 10:08 am

animation using process
-----------------------------------
I am trying to do a animation using process. This is my first time using it after i read the tutorial session. This is the code that i came up with. but i don't understand why the screen is keep flickering. Did i did something wrong? Thanks


setscreen("offscreenonly")
var m1,m3:int

process movement 
for decreasing m:200..50

cls
m1:=m+100
drawline(m,0,300,m1,black)
delay(50)
View.Update
end for
end movement

process movements
for decreasing m2:100..70
cls
m3:=m2+100
drawline(m2,0,200,m3,black)
delay(50)
View.Update
end for
end movements

fork movement
fork movements


-----------------------------------
jamonathin
Sun May 29, 2005 10:28 am


-----------------------------------
The screen keeps flickering because you're updating it at two different times, and clearing it a two different times as well.  use a different method, because forking sucks.

Just use 'if' statements to tel the program how long to add to a variable.

for example.




var x,y:int := 0
View.Set("offscreenonly")
loop
    cls
    if x < 200 then
        x+=1
    end if
    if y 