Animation Best Practice?
Hello GameSaladers,
I don't need any advice on drawing animation - got the 'frame by frame' covered. What I am wondering about though, is the application of frames within GameSalad.
I've seen 'programmatic animation' alluded to on the forums, where non-timer timers are apparently used to replace the Animate behaviour (with superior results?).
Can anyone point me at a tutorial or working example of 'programmatic animation' within GS? My Google Fu has failed me on this one.
Many thanks in advance!
I don't need any advice on drawing animation - got the 'frame by frame' covered. What I am wondering about though, is the application of frames within GameSalad.
I've seen 'programmatic animation' alluded to on the forums, where non-timer timers are apparently used to replace the Animate behaviour (with superior results?).
Can anyone point me at a tutorial or working example of 'programmatic animation' within GS? My Google Fu has failed me on this one.
Many thanks in advance!
Best Answer
-
MarkOnTheIron Posts: 1,447
I'm using that method extensively on a project and so far the results are amazing.
Here's a sample display of how the rule works:
The "Mod" attribute is a self attribute and I've set it at 0.02. On this example the animation is composed of 12 frames and it runs at 20 fps (one frame every 0.05 seconds).
The great thing of this method is that it allow you to change the fps during runtime, you just have to replace the 0.05 with an attribute that you can change whenever you want.
Answers
http://forums.gamesalad.com/discussion/44707/timers-are-for-chumps-gs-optimization-tips
"I've been able to create iterations as quick as every 0.04 seconds with this sort of calculation with no issue, fast enough for very smooth programatic animation or constrain-like updates on background attributes. In fact, I recommend using these sorts of timers for animation instead of the standard animate function, it seems to play smoother and being able to adjust the animation parameters at runtime can be particularily useful for complex actors."
I am specifically looking for a tut or working example of this kind of animation.
Honestly, unless you are running into problems, I would not go to extremes to try to figure this out just yet. When used properly in conjunction with timers, attributes, and any additional behaviors the animate behavior works VERY well. Even with the limitations and hurdles found in the GS creator many of the animated train wrecks out there are the result of bad code and image export options.
Ah well - maybe someone who has used this will pop up at some point. @domenius himself, even!
Thanks again!
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
http://forums.gamesalad.com/discussion/40335/gss-animate-is-screwed/p1