Page 1 of 2

help with animation

Posted: Sat Apr 21, 2012 10:08 pm
by BEANSFTW
I'm having trouble with figuring out how to make aan animation. Can anyone
give me an example source code or just exlain to me how it works?

Re: help with animation

Posted: Sat Apr 21, 2012 11:10 pm
by tentus
https://github.com/bartbes/love-misc-li ... L/AnAL.lua

Essentially, we make a quad from the frame sheet, and then render different parts of that quad depending on time passed.

Re: help with animation

Posted: Sun Apr 22, 2012 12:15 am
by kikito
There is also https://github.com/kikito/anim8

You may find an explanation of how to use it on that same page.

Disclaimer: I'm the author of anim8

Re: help with animation

Posted: Sun Apr 22, 2012 1:01 pm
by BEANSFTW
Can I get an example animation of AnAL or anim8 cause I don't get it.

Re: help with animation

Posted: Sun Apr 22, 2012 1:09 pm
by Kasperelo
Me neither

Re: help with animation

Posted: Sun Apr 22, 2012 2:08 pm
by richapple
BEANSFTW wrote:Can I get an example animation of AnAL or anim8 cause I don't get it.
Kasperelo wrote:Me neither
ahem
kikito wrote:You may find an explanation of how to use it on that same page.
anim8

AnAL < this one I didn't try but I am sure it's not deprecated

Re: help with animation

Posted: Sun Apr 22, 2012 2:46 pm
by kikito
You may find a working demo of anim8 on its forum thread (the source code of the demo can also be seen on github, but in the demo branch)

Re: help with animation

Posted: Tue Apr 24, 2012 7:57 pm
by BEANSFTW
I don't get how to make the grids.

Re: help with animation

Posted: Tue Apr 24, 2012 9:31 pm
by kikito
Animations are made from a single image. That image contains the animated character in several positions, arranged in files and columns.

Grids allow you to define how big or small are those columns and rows. They are made with the anim8.newGrid(tw,th,iw,ih) function. The first two parameters are the dimensions (width and height) of the frames - the individual "squares" that compose the rows and columns - in pixels. The next two parameters are the total dimension of the image in pixels (again, width and height). You can ignore the rest from now, you'll probably don't need them yet.

Re: help with animation

Posted: Fri Apr 27, 2012 8:36 pm
by BEANSFTW
I still don't get it...