GS's 'animate' is screwed !
Last night I hit a bit of a disaster with my current working project . . . .
I am relying fairly heavily on the animate behaviour for most parts of the game play, sound sync is fairly important to what I am doing.
What I discovered . . . after hours of playing around trying to get my audio to sync with my animations (even loosely sync, and even just for as short a period as 2 or 3 seconds) . . . what I discovered is that the animate behaviour is completely broken !
: (
That slider at the bottom of the animate behaviour might display a range of frame rates going from 1fps to 30fps but those frame rates are all screwed up.
Rather than 30 fps being the fastest and the speed getting incrementally slower as you select a lower frame rate - all the way down to 1 fps - the frame rates are all over the place:
First we have . .
30 fps
. . . . then we step down to . . . .
29 - 28 - 27 - 26 - 25 - 24 - 23 - 22 - 21 fps
(all these frame rates are identical, 29 fps is no faster than 21 fps)
. . . . then we step down to . . . .
20 fps
. . . . then we step down to . . . .
19 - 18 - 17 - 16 fps
(all these frame rates are identical, 19 fps is no faster than 16 fps)
. . . . then we step down to . . . .
15 fps
. . . . then we step down to . . . .
14 - 13 fps
(these two frame rates are identical)
. . . . then we step down to . . . .
12 fps down to 1 fps seem to be in order (ie: incrementally slower) although it's hard to say for sure without a more exacting test.
Anyhow, personally I'm screwed, weeks of work in a real mess, I really didn't think of making painstaking tests of all the functions I was aiming to use in GameSalad (who does!).
This all might seem a little esoteric but hopefully this is of some use to someone out there.

I am relying fairly heavily on the animate behaviour for most parts of the game play, sound sync is fairly important to what I am doing.
What I discovered . . . after hours of playing around trying to get my audio to sync with my animations (even loosely sync, and even just for as short a period as 2 or 3 seconds) . . . what I discovered is that the animate behaviour is completely broken !
: (
That slider at the bottom of the animate behaviour might display a range of frame rates going from 1fps to 30fps but those frame rates are all screwed up.
Rather than 30 fps being the fastest and the speed getting incrementally slower as you select a lower frame rate - all the way down to 1 fps - the frame rates are all over the place:
First we have . .
30 fps
. . . . then we step down to . . . .
29 - 28 - 27 - 26 - 25 - 24 - 23 - 22 - 21 fps
(all these frame rates are identical, 29 fps is no faster than 21 fps)
. . . . then we step down to . . . .
20 fps
. . . . then we step down to . . . .
19 - 18 - 17 - 16 fps
(all these frame rates are identical, 19 fps is no faster than 16 fps)
. . . . then we step down to . . . .
15 fps
. . . . then we step down to . . . .
14 - 13 fps
(these two frame rates are identical)
. . . . then we step down to . . . .
12 fps down to 1 fps seem to be in order (ie: incrementally slower) although it's hard to say for sure without a more exacting test.
Anyhow, personally I'm screwed, weeks of work in a real mess, I really didn't think of making painstaking tests of all the functions I was aiming to use in GameSalad (who does!).
This all might seem a little esoteric but hopefully this is of some use to someone out there.

Comments
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
"That's why I create my animations at ten frames per second and then I use pencil to make a movie of it and build my sounds In GarageBand or sound track pro while synced to the movie track."
The problem is with Gamesalad not Pencil / After Effects / C4D / Logic / Garageband (etc etc . . )
You can be working with a Pencil generated movie in Garageband - and all is well - everything is in sync - but it's when you place those files (your Garageband bounce and your image sequence) in GameSalad that all bets are off because although your sound now sits perfectly against your 10 fps sequence, the animate behaviour in GameSalad is unlikely to play your frames back at anything close to 10 fps.
Check out 10 fps on the above graph - the left hand edge of it's bar should be touching the red line.
I am (was) doing a similar thing . . . After Effects + C4D . . . rendered movie thrown into Logic Studio for sound sync to movie . . . the two elements put together in Gamesalad, I was not hoping for perfect sync, near enough would do, but everything is way way way out - and not always in a predictable way (like a simple offset).
http://www.mediafire.com/?b0e1pxmi45ligmr
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
I did some fairly detailed tests, not only in the viewer, it was the same deal outside the viewer - the frame rates are screwed.
"I have just finished a lip sync animation and a dance animation and it stays in perfect sync at ten frames. I've never had problems doing this way and have tons of animations. That clip is in the latest version of GS"
Nice bear !!
To be honest I can't tell much from that particular example of yours, he's just a bear (albeit a cute bear) swaying with the music, he could be running 3 fps too slow or 12 fps too fast and I wouldn't really have any way of telling !? There's nothing obvious to check sync against.
Although i do see some anomalies in the framerate , i think its less severe than you describe it .
if you want to test frame rates per second in GS, you shouldn't test it with 100 frames , but with 30 frames . cause 30 is the max value GS can reproduce for animations.
See how this modified version of your test is much more accurate about frame rates because the animation has 30 frames :
http://www.mediafire.com/?o8hyfgrv9msj4jr
In the long run , all the aligned lines lose the sync , and represents different frame rates .
But yes , indeed some anomalies , i believe its due to the current engine of game salad , its a bit ..... slow with animations
Roy.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Yeah that was my meaning , its just your english is better for explaining this in a more professional way
Roy.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Although i do see some anomalies in the framerate , i think its less severe than you describe it .
I described it exactly as it is, really ! Those figures above are accurate, I promise !!
if you want to test frame rates per second in GS, you shouldn't test it with 100 frames , but with 30 frames .
I am testing the relationship between the frame rates rather than testing how accurately GS measures a second.
I have 30 frame rates laid out next to each other, the amount of iterations is irrelevant - but the more iterations you have the more clearly you can see the discrepancies between the frame rates - cutting this range down to 30 frames (why choose 30 ? We are not measuring 30 fps any more than we are measuring 25 fps or 9 fps . . ?) only makes the measurement less accurate. You need to run this over more frames not less to increase the temporal resolution - which gives us a better view of the relationship between the frame rates (especially at the low end where 30 iterations renders over just a few pixels).
See how this modified version of your test is much more accurate about frame rates because the animation has 30 frames
I can't see how it is more accurate ? It shows the same disparity between the frame rates, but to a lesser degree ?
In the long run , all the aligned lines lose the sync , and represents different frame rates .
Are you even looking at the same thing as me !
8-X
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
p.s. with tables it might well be possible to set up import of the magpie frame data to run the frames against sound, and fire it off timers to keep it in sync. Not tried it yet as have too much on my plate but will shout if I get it going.
kipper
"tynan this may be where you are having problems.
GameSalad's animate behaviour plays back your image sequences at frame rates that bear little resemblance to what you set the animate behaviour to play them back at, it even shows no coherency within it's own range of frame-rates . . . like I say 30 fps goes off and does it's thing while 29 - 28 - 27 - 26 - 25 - 24 - 23 - 22 & 21 fps all play back an image sequence at the same frame rate !
This has nothing to do with "[creating] your animations at a real frame rate" - For example, you can open Photoshop, make 100 separate documents, paint the numbers 1 to 100 on each subsequent file and save them off as a series of images . . . . now we have an image sequence of 100 frames . . . but what frame rate are they ? . . . have we created our image sequence at a 'real frame rate' ? No, in fact not only do they not have a 'real frame rate', they have no frame rate at all.
I hate to sound rude, but I know what I am talking about, I have a masters in animation, I worked for 6 years as technical director of a (very big and very well known) computer animation facility and have been approached by people like Nikon (amongst many others) to advise on technical implementations of audio and video, I have bored people to death at breakfast explaining why NTSC runs at 29.97 and not 30 fps (CSC), and as far back as 1997 (maybe even earlier ?) did a talk for Sony on PAL/NTSC . . . . blah blah blah
It is crucial you create your animations to a real frame rate and match that frame rate in GS, if not your animation will drift out of sync.
I think you misunderstand the basic point of my original post, regardless of what frame rate we work at Gamesalad's animate frame rates are near arbitary, for example as I have pointed out all the frame rates from 21 up to 29 frames per second run at the same speed !! - the rest of frame rates are all over the place, 16 - 17 -18 - 19 for instance are all locked together . . . 21 fps is around 4 fps faster than 20 fps !! 30fps runs much slower than an (external) 25 fps source . . . etc etc.
As a film and video person we deal with these issues when matching film and video because film is 24 frames per second and video is either 30fps or drop frame which is 29.97
This is not a drop frame issue or a PAL / SECAM / NTSC / SMPTE / BBC / RAFLMAO / C.S.I Miami (etc etc etc etc) issue ! :-)) The problem is inside Gamesalad, it's animate behaviour is screwed ! 8-X 8-X 8-X 8-X 8-X 8-X 8-X - I promise on my children's eyes and LeonardDeveloper's next 5 logos.
Or to use highly technical language, the frame-rates are screwy.
P.S . . . "film is 24 frames per second and video is either 30fps or drop frame which is 29.97"</> . . . you missed out the most common rate for video, 25fps. . . and don't forget 24fps, 50fps, 59.94fps, 23.976fps, 50i and 60i . . . . 30 and 29.97 might be what the US and a few other countries use, but the majority of the globe use 25.
"I came to the conclusion that something was up when I tried doing lipsync."
I can imagine that would be a problem, you need your animation to playback at the right speed for any sync to work, but for lip-sync you really need things to be tight !
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
"I didn't even remotely say anything about your skill level or knowledge."
No, I've not said you have, I was just trying to point out that I wasn't lost in a maze of numbers and ideas I was unfamiliar with, I hate blowing my own trumpet (did I tell you about my Olympic Gold in grandstanding?) but I wanted to give you some context.
"Let's hope when they drop lua the lag might clear up.
That's part of the issue, it's not simply a lag, or a generalised offset, it's all over the place !
Yep, let's hope the fabled Lua-Drop™ will give us stable frame rates.
"He is my latest lip sync test. This is 17 frames created at 10fps and synced to audio at 10fps."
Looking nice !! : )
I expect with only 17 frames (and a low frame rate like 10 fps) you probably avoid the worst of the GS frame rate mayhem, I'm running sequences @ 25 fps for between 90 and 150 frames.
"I do know a little something about audio sync as a sound engineer and I worked with Jack Hart A friend of mine who lives just up the road who developed the algorithm for the satellite syncing of “Ode to Joy” simultaneously on 5 continents for the 1988 Nagano winter Olympics it was brilliant work."
Can you get him to sort out GameSalad's numerous bugs !?
The animate behaviour is set to 25 fps . . . . but as you can see the red (single frame) flash at the start drifts out of sync very quickly as 25 fps in 'animate' is nowhere near 25 fps, in fact do this experiment with the file . . . change the animate fps to 30 . . . and you will see that even at 30 fps 'animate' doesn't manage to keep up with the 25 fps click track, that is to say: animate's 30 fps is not even running at 25 fps, let alone 30.
http://www.mediafire.com/?us9fg5v1xs2wyyx
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
"Can I ask why you need to use a high frame rate?"
For me it's the lowest frame rate that allows (realistic) phi phenomenon / beta movement, to be honest 24fps would do it, but I am so programmed to type 25fps into everything I touch (PAL land) I went for the extra 1 fps out of habit. Lower frame rates can work really well depending on the style of the piece, in fact for cartoon-ish stuff smooth 25/30 can look too fluid - but for what I am doing I need 25 fps - my iPad (1) handles it all just fine (so far!) . . although I am thinking of pushing the whole thing out of the realms of iPad 1 land and make it iPad 2 + only
"Have you publishedd your animation with a click track to ad hoc?"
No, never published an ad hoc in my life, I wouldn't know how to. I have passed all these tests over to my iPad and they do exactly the same as the Gamesalad project on my Mac.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
"in this case you will not see any fundamental difference between the viewer and an adhoc. They both use the same engine and both parse your project file in an identical fashion"
I kind of suspected that might be the case, the discrepancies are so marked that I couldn't really see it being a platform issue.
ps I never said what a bloody elegant demo 'frame rates04' was.
" . . . desktop may effect performance"
Here the thing, let's imagine there was performance loss, let's imagine the processor was struggling with something or other - then we'd expect to see everything equally brought to it's knees.
For example, if we overload some device with a really heavy (processor wise) car racing game, when things get really bogged down and the game keeps freezing, you wouldn't expect to see one (just one) of the cars racing off while all the other's got stuck behind, when a processor is overloaded the whole system slows or freezes . . . now if you look at what the animate behaviour is doing, rather than all the frame rates lagging or playing back slowly or glitching and jumping frames or even being subject to a universal offset or delay . . it's instead producing a pattern, a repeatable pattern where some frame rates bunch up with others and race off while others stick to a lower speed and other's still seem to be locked to their neighbouring frame rate - and this is repeatable and persistent.