Page 1 of 1

missing animation frame...

PostPosted: Mon Jun 11, 2007 1:20 am
by DST
I have a 5 frame explosion animation, but when i'm in game mode, it skips the first frame for no reason. The rest play fine. When in editor mode, i preview the animation and all frames are there fine. When i tell the sprite to 'move' in editor mode, the animation is fine.

But it still skips the first frame when in game mode. Very annoying. Tried a script under create actor telling it 'animpos=0;' but that didn't work either.

Any ideas?

PostPosted: Mon Jun 11, 2007 1:32 am
by d-soldier
Hard to say given the situation (hard to imagine the problem without seeing it...) Make a new game and add the exploding actor to it, with the same setup as the original game. Run that, and see if the problem is still there (without everything else going on). If it is, zip up that directory-tree and upload it here. Someone who is on will download it and check it for you. If it's not, then it's not the animation/sprites causing the problem.

Ok here it is

PostPosted: Mon Jun 11, 2007 2:17 am
by DST
I tried making a new file, and the same thing happens. What's more, it also ditches the last frame in the animation. Here is the Ged/data.
In game mode, press Spacebar to make the animation play.

The explosion is set to destroy itself at the end of its animation. The odd thing is, if you remove that command, then on the second + loop of the animation, all the frames are there! But still not on the first playthrough!

PostPosted: Mon Jun 11, 2007 2:57 am
by d-soldier
... I really dont know what to tell you with this one... I experienced the same problem, so heres what I did.
1)Set the animation direction to stop on create-actor script, which stopped on the first frame, though it doesn't start that way without doing so...
2)Imported an explosion sequence I made, which worked fine.
3)Loaded all your images into Photoshop to verify that they all shared the same properties (color mode/bits/etc.) - which they did.
4)Started my own NEW game, and imported the sprites into a new actor, which does the same thing (skipping the first frame)...
5)Renamed all the files, starting with 0 instead of 1 - no effect.

So in conclusion, I have no idea what the problem is. If the animation didn't play frame for frame when set to pause (animationdirection/stop) I would say it was a problem with the images somehow... but it plays fine like that... I'm stumped.

PostPosted: Mon Jun 11, 2007 1:10 pm
by pixelpoop
what the? I tried to figure this out as well, but I'm stumped.

PostPosted: Sat Jun 30, 2007 4:53 pm
by DocRabbit
I am confused on this one too. I thought maybe it could be an oddball buffer issue, so I loaded up the graphics in photoshop and adjusted canvas sizes to all be exactly the same. Still drops the first and last frame.

I would like to say maybe the name numbering but I use same numbers on all my animations like these and haven't had this issue.

Maybe it is the large size of image vs small frame count and computer ticks compensating for load by stripping off the first and last to deal with creating time / destroying time.

I did find that if you make a copy of first and last frame, 000 and 005 respectively, that the 4 frame original will play. Kinda like clearpixel for html tables, they are never seen, but help hold up the structure of the animation sequence.

*UPDATE - I also tried it with a filmstrip version (single file, multi frame) with the same results of dropped first and last frame. I made an additional filmstrip with dummy first and last frames, and it played all the interior frames.

PostPosted: Sat Jun 30, 2007 7:21 pm
by d-soldier
It is very strange. I make my own graphics for everything and have never had this issue. Appraently first and last dummy frames is the solve though, nice work.

PostPosted: Sat Jun 30, 2007 7:40 pm
by automail10
I'm confused to.
i think markslane needs to figure this out!

PostPosted: Sat Jun 30, 2007 8:27 pm
by makslane
I'm trying to solve this bug.

PostPosted: Sun Jul 01, 2007 1:35 pm
by DocRabbit
Eureka, I think I have it figured out. I think this will work, it did on mine. When you do the CreateActor, don't click immediate action, instead do a wait for frame, and in that box put: 0;
After that, on the destroyactor event, go ahead and click immediate action. This takes away the computer's ability to determine on its own to end it prematurely and to skip playing it from the beginning visually.

I think we have become Pavlovian in clicking immediate action so much that we forget about that other action just below it. I know I have. It also doesn't seem logical to even think about using it to start an animation, but when you think about it from a different perspective, it makes perfect sense to regain control over it.

This is why GE has become one of my favorite programs to use, where there is a will, there's a way kinda program. Hats off again to Makslane for creating this wonderful tool, and too everyone in this community who also join together to solve any questions or problems we have. :D

PostPosted: Wed Jul 04, 2007 1:30 pm
by 98700
LOL haha i found out the prob lol and im a noob
well anyway i found that what the problem was that the animation finish was making it skip!! take it off and watch it works...

PostPosted: Wed Jul 04, 2007 1:34 pm
by 98700
that is kinda funny even makslane didnt find out :shock: woot woot! :lol:

PostPosted: Wed Jul 04, 2007 1:52 pm
by DocRabbit
I agree that removing the animation finish would fix it also, but the wait for frame solution doesn't require removing the finish code at all, and it works too. I am fairly sure it is code both at front and back of animation draw that actually causes the odd behavior, but that is actually what wait for frame is there to cure.

Put in generalized terms, imagine two runners, one represents code execution, the other represents draw frame to screen. If you select immediately, the code runner starts running at the same time the animation starts, and code runner takes presidence over the animation runner. i.e.-the cameraman stays trained on him and misses the animation runners start off the blocks. With the wait for frames, you tell the cameraman its his job to watch the animation runner, and not miss anything he does. Thus we see him come off the blocks and code runner waits till he does before he starts.

PostPosted: Wed Jul 04, 2007 1:56 pm
by 98700
that was a good example :!: