Page 1 of 1

Using GIF Animations ?

Posted: Wed Oct 15, 2008 6:06 pm
by nightvenom
Is it possible to use GIF animations in love ?

:)

And how might one code this ?

Re: Using GIF Animations ?

Posted: Wed Oct 15, 2008 6:36 pm
by Merkoth
If your idea is to directly load a GIF file and play it I don't think it's possible. Right know, LÖVE can extract the frames from a plain image and then draw the correct image at any given moment (depending on the animation speed/lenght). You can also add frames to an already existing animation with the AddFrame() method IIRC. But don't take my word on that :oops:

A typical animation image looks something like this:
Image

Regarding code, there's a fine tutorial on animations here: http://love2d.org/index.php?page=tutorial&id=006

Re: Using GIF Animations ?

Posted: Wed Oct 15, 2008 11:47 pm
by nightvenom
k, i've seen and play around with the tutorial, so i'm trying to get a friend to just send me the frames :)

I'll test and see if that works properly.