Strange problem importing animated GIF
So, recently I have been working on the title screen for my game. It's supposed to look like the Metroid title screen for NES, with the twinkling stars in the background and the title that comes in after a couple of seconds. To do this, I realized that I need to make the twinkly star background separate from the title. I created an animated GIF for the background and imported it, and it worked beautifully. It animated at the right framerate and everything. Next was the title, which would be another GIF that appears over the background. That's where I had trouble.
For some reason, when I imported that GIF, it would not animate properly. There were two problems. First, it animated at a very, very slow framerate. I still don't know why this happened but I was able to work around it by using an event to modify the frame duration of the GIF. The second problem still baffles me. I'll try to explain...
Here is a link to the animated gif: http://www.vertigofx.com/public/games/fangame/title-main.gif
It plays about 8 frames (first one being blank), and I made it so it doesn't loop, which is fine. If you watch the animation, you'll see that the text has "shadow" that comes in at about the third frame and stays with it the whole time. For some ODD reason, when I put this into MMF2, that 7th frame (the second to the last frame), that shadow is NOT there. It shows a frame, and it has the title, but the shadow isn't there, and that just doesn't make any sense to me at all. Where is MMF2 getting this strange unintended frame?
I have a little beta of my game here: http://www.vertigofx.com/public/games/fangame/fangame_beta_v1c.exe
If you like, you can download and run that, and when the title comes in you can see what I mean. Happens a bit quick, but you will notice that just before that last frame and the title is done fading in, there is a frame that shows the title without the blue shadow.
I'm absolutely perplexed. Any ideas?
Re: Strange problem importing animated GIF
How about an MFA of the frame with the problem?
Re: Strange problem importing animated GIF
Quote:
Originally Posted by Jeff
How about an MFA of the frame with the problem?
lol... duh... I should have thought of that. Yes, here it is:
http://www.vertigofx.com/public/games/fangame/00_FANGAME_temp.mfa
I've removed the music and other frames not related to the issue in order to reduce the size of the file. It was about 50mb before. Now it's only around 100k (big improvement).
Maybe you'll find something...
Thank you for your help!
Re: Strange problem importing animated GIF
Try the build 249 (link on top of this forum - it's a beta but it should be safe). We have fixed bugs in the GIF filter in a recent build, but I don't remember if it was the build 248 that you use or a more recent version, and I haven't the full bug list handy right now.
PS: I had to check the "Save background" option in the Animation 2 object to make it work with the build 249 (I haven't tested with the build 248).
Re: Strange problem importing animated GIF
Quote:
Originally Posted by Yves
Try the build 249
I installed the build 249 update, but it didn't fix the problem with the GIF.
...I also tried checking "Save background" as well. No good.
Re: Strange problem importing animated GIF
I'm not to familiar with gifs. Never did like them because they always had some funky settings.
Anyway opened it up in ImageReady CS2 and noticed frame7 had "restore to background" set while the other frame were set to "do not dispose". I changed frame7 to match the others and it plays correctly. I also tried changing all to "restore to background" and that worked as well. Tested on MMF2Dev build 248
Sorry had nowhere else to upload the fixed file:
http://img.photobucket.com/albums/v621/joxgfx/stuff/title-main_test.gif
The delay on frame1 was set to 2sec while the rest was set to 0.2sec, was that intended? I changed it to 0.2sec.
Interesting to note, importing the file as an active object's animation loses the shadow as well. Opening the file in imageready retained the shadow and also playback with irfanview had no problem.
Re: Strange problem importing animated GIF
Hmmm... Where was the "restore to background" setting that you saw? I don't know how that happened as I thought I did the same thing for each frame.
Yes, the 2 second first frame is intentional. The title isn't supposed to show up until a couple of seconds after the background appears, and that was just easier than making more events.
Thank you for your research and help. I appreciate it!
Re: Strange problem importing animated GIF
In imageready, right-click on a frame in the "animation" tab. There are 3 options to choose. "Automatic", "Do not dispose" and "Restore to background". I tried Automatic but that didn't work, frame7 still lost its shadow.
You're welcome.
Re: Strange problem importing animated GIF
Quote:
Originally Posted by JohanessR
In imageready, right-click on a frame in the "animation" tab. There are 3 options to choose. "Automatic", "Do not dispose" and "Restore to background". I tried Automatic but that didn't work, frame7 still lost its shadow.
You're welcome.
Haha! What an easy fix! Thank you so very much. Works wonderfully now. While we're at it, I have an additional question...
At the title screen, the player presses ENTER to begin. Ever since I added that title GIF, sometimes pressing ENTER doesn't "take". There have been cases where I have had to press it about 5 times before it finally "took" and went on to the next screen.
Any idea what causes that?
PS: How can I change this thread's subject to include "SOLVED"? I like to do that for the convenience of others. I only see how to edit my most recent post.