Computer Science Canada animation using process |
Author: | starlight [ Sun May 29, 2005 10:08 am ] | ||
Post subject: | 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
|
Author: | jamonathin [ Sun May 29, 2005 10:28 am ] | ||||
Post subject: | |||||
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.
Or you can create your own delay.
|
Author: | starlight [ Sun May 29, 2005 10:49 am ] | ||
Post subject: | |||
Thanks for the advice. but our teacher want us to try out the process command. and i think the if statment is better if a line going straight , but it is harder to use if the line changes dirction.. base on ur advice. i change the code and it doesn't flicker anymore. but there is a weird shape that appear at the end of the loop. i am not sure how to get rid of it.
Thanks again |
Author: | Cervantes [ Sun May 29, 2005 12:10 pm ] |
Post subject: | |
That's because the process that has the View.Update and the cls finishes before the other one (less loops to go through). After that's done, it's only the other process that is working, and it doesn't have a cls or View.Update, so you don't see anything for a while until the program finishes, at which point it flips everything to the front buffer (ie. it does a View.Update automatically at the end of the program) so you see this mass of lines that was never cleared. |