PDA

View Full Version : combo cycling.



zora man
01-27-2003, 08:00 PM
Okay I need another animated tile to corospond with a combo that is cycling.
Could some one tell me the speed to set the tiles to?
Or the combos I need to set the combo cyclers set to.
here is the info to work from.
The first tile(animated tile)it 9 frames.
The second tile(combo cycler)7 combos.
One more thing tell me how you got the numbers.

Verbatim
01-28-2003, 08:25 PM
I don't think you can get them to correspond the way that you want to...even if you get the speeds right. Why? Combo animations start on the first combo when Link enters the screen. Tile animations change constantly, so that if you warp between identical-looking screens, the animations don't re-set.

In other words, if you need one of them to be showing frame "A" while the other is showing combo "a"...it's not going to happen. You'll have to make them both as combo animations, or both as tile animations if that's what you need.

In order to get things to time right...find a common denominator (Yes, there is a reason you study math in school). The first number is 9...break that down to its factors...we get 3*3. The second number is 7, which is a prime. There aren't any common factors that we can eliminate duplication of...so...

7 x 3 x 3 = 63. (if you didn't notice, this is also 7 x 9 --so if you don't understand how to do factoring and eliminate the duplication of common factors, you can always just multiply the # of frames in each animation...you won't get as flexible an answer at the end for numbers that do have common factors, but you'll get one that'll still work).

That's the total number of time units that needs to pass in order for the two to be able to correspond. How many do you need for each frame? Divide by the number of frames.

63/7 = 9

...for the 7 frame animation, we get 9 time units per frame.

63/9 = 7

...for the 9 frame animation, we get 7 time units.

If 7 and 9 are too fast, you can use multiples of them...

x 2 = 14 and 18
x3= 21 and 27
...
x10= 70 and 90
...etc.


About common factors and eliminating duplication:
(ignore this if you know how already, or if you don't get it after reading it a couple of times)

If you had, say, a six tile and an eight tile animation, you could do the problem like this...

First, divide the numbers by the lowest prime number--two:

8/2 = 4

6/2 = 3

We can still divide the 4 by a prime number, so we're not done yet...

4/2 = 2

I'll come back to those results in a moment..if we had some other number, though, like, say 23...

21/2 = 10 & 1/2

...that didn't divide evenly, so we try again with the next prime...3:

21/3 = 7

It divided evenly this time...if it didn't divide right into three, we'd go to 5, the next prime, then 7, 11, 13, 17, 23...

7 is also a prime, so we're done there...the factors for 23 are 3 and 7.

Let's go back to 8 and six...

8/2 = 4
4/2 = 2

6/2 = 3

What we get here is...the factors for 8 are 2, 2, and 2...we divided it twice by two, and got two left over. For six, we get 2 and 3. So for eight, we have three twos, for six we have one 2 and one 3. Since eight already has a two in it, we don't have to multiply by the two that's in the six...we can just go with the tree twos and the one three...

2 * 2 * 2 * 3 = 8 * 3 = 24

24/6 = 4 time units per frame

24/8 = 3 time units per frame

...interesting...the result is always the factors left over...ie, 8 didn't have a three in its factors, 6 was short by two twos...so the number of time units you need for eight is 3, and the number you need for 6 is 2 x 2 = 4.