Advanced - Not for the faint hearted
Bringing balls to life!
Without animations balls seem rather lifeless and flat. They do not wobble or stretch or do anything that makes them appear to be made of Goo.
Obviously it is sometimes desirable to have them appear "lifeless", Bones, Bombs, Blocks etc...
But for balls made of Goo the animations are really the thing that brings them to life!
<sinvariance>
The tags hold information about the variation of the aniamtions (from ball to ball) and contain sinanim tags which actually describe the animations.
When each ball is created, the game selects a random value for each of the variance attributes [0 -> variance]
This is then applied to all the corresponding attributes in each of sinamin tags the sinvariance contains.
Setting all the variance attributes to 0, will make every ball animate in exactly the same way, at exactly the same time. This looks a bit odd.
You should take care that the variance values are less than the values set in the sinanim tags.
If the variance is equal (or greater than) the sinamin value this can result is very strange effects, such as negative scaling.. where the ball shrinks to a point, then expands again as its mirror image, then shrinks to a point and expands back to its normal appearance.
<sinanim>
These tags define elements of the balls animation. Each element is a simple sinusoidal oscillation, but when several are combined (correctly) the resultinf animation can be quite complex.
Experimention is the key to understanding
These are not easy concepts to understand, and its difficult to explain how these animations will work and the effects they will produce when combined.
Your best bet is...
Take an original ball... simplify it, so it has only a single sinvariance and sinanim.
Set the sinvariance values to 0, and have try out some values in the sinanim.
Once you think you've "got" that, add some variance, or a second sinanim tag... and play with that...
Eventually you'll "get it", and be able to produce all sorts of weird and wonderful things.
Alternatively.. just clone an existing ball, and keep whatever 2DBoy had set!
- Printer-friendly version
- Login to post comments