
-----------------------------------
msimard8
Mon Nov 29, 2004 6:02 pm

flickerfree animation
-----------------------------------
is there a way to make this flicker free

CAUTION MY CAUSE SEISURES!  


  for c : 1 .. 400
        drawfilloval (335, 235, 20 + c, 20 + c, blue)
        delay (10)
        drawfilloval (335, 235, 1 + c, 1 + c, 53)
        delay (10)


    end for



ok ... how do i run to counting loops at once...i want to make a warp screen

thanks

-----------------------------------
Cervantes
Mon Nov 29, 2004 6:20 pm


-----------------------------------
Sure is.

setscreen ("offscreenonly")
for c : 1 .. 400
    drawfilloval (335, 235, 20 + c, 20 + c, blue)
    drawfilloval (335, 235, 1 + c, 1 + c, 53)
    View.Update
    delay (10)
end for


EDIT:
counting loops = for loops I take it?
to run two for loops at the same time:

for loop 1
  for loop 2
     %code
  end for loop 2
end for loop 1

or, you could try this:

loop

  for loop 1
    %code
  end for loop 1

  for loop 2
    %code
  end for loop 2

end loop


-----------------------------------
Viper
Thu Dec 02, 2004 2:18 pm


-----------------------------------
you gotta be carefull with setscreen ("offscreenonly") since if your program isnt made in a certian way it will create a blank screen

-----------------------------------
DanShadow
Tue Dec 14, 2004 12:01 am


-----------------------------------
Im pretty sure that this question has alerady been answered...but owell. To utilize the setscreen correctly, I suggest this:

loop
setscreen("offscreenonly")
View.Update
%Code, drawing, etc.

delay(5)
end loop
%This assumes your program wants to run in a loop

What this should do (this is making the -wrong- assumption that all your code does is draw a circle) is every time it goes through the loop, it sets the screen offset of its max parameters, updates the screen, redraws everything, then gives a slight delay so the image stays on. Then this whole set of instructions resets and starts over. I hope this helps your 'non-flicker' question.
