Computer Science Canada Need Some Explanation on View.Update |
Author: | The 10 [ Sun Jan 22, 2006 12:56 pm ] | ||
Post subject: | Need Some Explanation on View.Update | ||
Hi, i need help understanding this program, its the smooth animation example from the turing examples.
I dont understand what the array is doing in this program, whats the use of it? I also dont understand how they made the animation? Im trying to use this same tecnique in my final project so i would appreciate if someone could just explain this program for me. |
Author: | Tony [ Sun Jan 22, 2006 1:34 pm ] | ||||||
Post subject: | |||||||
the array just holds random locations otherwise the example is quite well commented you don't need to consern yourself with details of how animation is made, the important points are that the screen is set to
and that after you're done drawing your entire frame you update the buffer
so your program would look like
|
Author: | The 10 [ Sun Jan 22, 2006 2:46 pm ] | ||||
Post subject: | |||||
Tony wrote: the array just holds random locations
Thx for the reply Tony, but i still dont understand why you need the array there? I know it sounds like silly question, but i really wanna know. Also i understand this is the way animation should be done. Quote:
but i want to make the animation similar to the house one, so that's why i'd like to understand what happens in this part.
so if someone could explain this to me? ![]() |
Author: | Rasta Fella [ Sun Jan 22, 2006 4:45 pm ] |
Post subject: | |
Note the only difference between both techniques is that the later one has View.Update stuck into the loop. That's what makes the transition of all the "houses" smooth. As for learning Arrays... Or for further explanation on "flexible arrays" and more check the Turing Walkthrough. |
Author: | The 10 [ Sun Jan 22, 2006 6:09 pm ] | ||
Post subject: | |||
Ok i understand now that the array is there to hold different values in 1 variable name. Now i want to understand what's going on in this part of the program - the animation
I want to understand what's going on, as i dont understand how the houses move the way they do, and how they bounce of the edge. |