Computer Science Canada Animation Question |
Author: | revangrey [ Sat Dec 20, 2008 6:51 pm ] | ||||
Post subject: | Animation Question | ||||
Could someone please explain to me in simple terms how to do two things? I have two questions and they consist of: How do you make two or more animations run at the same time (like how would you make snow fall, while a snowman waves his arms, while santa does the can't dance?)? next how would you make one animation start when another stops?(or start one animation midway through another, such as when my death star laser starts firing somewhat backwards how do I make a red line going across where it has passed?)? I do not expect anyone to do my work for me but graphics is my worst unit so you may want to be fairly exact in your explanations. I know some of this may be obvious to some of you but please no "you are just trying to get people to do your work for you" comments. I'm really not. what I have so far consits of:
the Christmas program is quite unfinished and I am going to make some adjustments but I would like to know how to animate properly asap. The christmas program is an assignement.
the death star thing is purely for fun and not very important any and all help is appreciated, thank you for your time |
Author: | Amit [ Sat Dec 20, 2008 10:08 pm ] | ||
Post subject: | Re: Animation Question | ||
I would use procedures. You already have the snow animation working, so just take all the code and put it into a procedure. The main part should be a loop calling the procedure. Each procedure would move, then draw the animation. As for stoping and starting the animation, just have a boolean variable to control each procedure. It would look something like this ...
|
Author: | revangrey [ Sun Dec 21, 2008 12:14 am ] |
Post subject: | Re: Animation Question |
thank you for the suggestion, but could you or anyone for that matter explain how to use procedures properly? My teacher has not taught us how, and I doubt she will. Any additional suggestions are much appreciated, I know almost nothing about graphics. Ignorance most certainly is not bliss ![]() |
Author: | revangrey [ Mon Dec 29, 2008 12:20 am ] |
Post subject: | Re: Animation Question |
sorry about the double post but could someone please help me with these programs before the end of the break? the christmas project is due at the end of the break... |
Author: | Tony [ Mon Dec 29, 2008 1:31 am ] |
Post subject: | RE:Animation Question |
links to the common tutorials, including use of procedures, can be found in Turing Walkthrough. The idea behind animation is that you have a single loop that draws frame after frame. A procedure is simply a way to group a block of code together, that can later be called from any other place -- for the purposes of animation it simply makes things a lot cleaner and easier to understand. I really like Amit's suggestion on using flags (boolean variables) to set when a particular part of a frame should or should not be drawn. |
Author: | revangrey [ Wed Dec 31, 2008 6:17 pm ] |
Post subject: | Re: Animation Question |
thanks for the advice! new question: is there a way to move an object you have drawn? like say I drew a tree or a star, and I want to move it to a new area but keep the same size etc. without having to find the right numbers all over again. (like is there some formula I am unaware of ?) any and all suggestions appreciated (regarding anything to do with this assignment and I mean ANYTHING)! thanks in advance! |
Author: | The_Bean [ Wed Dec 31, 2008 6:33 pm ] |
Post subject: | Re: Animation Question |
You've already moved objects with the snow. When moving boxes you just have to make all points relative to the one that is moving. |
Author: | Homer_simpson [ Wed Dec 31, 2008 6:47 pm ] | ||
Post subject: | Re: Animation Question | ||
set x,y position variables e.g.
|
Author: | revangrey [ Wed Dec 31, 2008 7:18 pm ] |
Post subject: | Re: Animation Question |
sorry I wasn't clear enough I meant like if I have already drawn something and I put it in a stupid place how would I move that object into a new place within the code that is say my moon is on the left and I now want it on the right for example I don't mean a moving object within the animation I mean literally changing the code but I am now doubting that there is an "easy" way... |
Author: | Homer_simpson [ Thu Jan 01, 2009 3:42 pm ] | ||||
Post subject: | Re: Animation Question | ||||
yeah if u dont want to rewrite all the coordinates, you just add an x and y to your orginal coordinated, for example if u want to move your moon to the right :
Mod Edit: Remember to use syntax tags! Thanks ![]()
|
Author: | revangrey [ Thu Jan 01, 2009 4:17 pm ] |
Post subject: | Re: Animation Question |
thanks a million! |