help with animation

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
BEANSFTW
Prole
Posts: 28
Joined: Sun Apr 15, 2012 2:58 pm

help with animation

Post by BEANSFTW » Sat Apr 21, 2012 10:08 pm

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?

User avatar
tentus
Inner party member
Posts: 1060
Joined: Sun Oct 31, 2010 7:56 pm
Location: Appalachia
Contact:

Re: help with animation

Post by tentus » Sat Apr 21, 2012 11:10 pm

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.
Kurosuke needs beta testers

User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: help with animation

Post by kikito » Sun Apr 22, 2012 12:15 am

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
When I write def I mean function.

User avatar
BEANSFTW
Prole
Posts: 28
Joined: Sun Apr 15, 2012 2:58 pm

Re: help with animation

Post by BEANSFTW » Sun Apr 22, 2012 1:01 pm

Can I get an example animation of AnAL or anim8 cause I don't get it.

User avatar
Kasperelo
Party member
Posts: 343
Joined: Fri Apr 13, 2012 1:47 pm
Location: The Milky Way

Re: help with animation

Post by Kasperelo » Sun Apr 22, 2012 1:09 pm

Me neither

User avatar
richapple
Citizen
Posts: 65
Joined: Sun Dec 25, 2011 10:25 am

Re: help with animation

Post by richapple » Sun Apr 22, 2012 2:08 pm

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

User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: help with animation

Post by kikito » Sun Apr 22, 2012 2:46 pm

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)
When I write def I mean function.

User avatar
BEANSFTW
Prole
Posts: 28
Joined: Sun Apr 15, 2012 2:58 pm

Re: help with animation

Post by BEANSFTW » Tue Apr 24, 2012 7:57 pm

I don't get how to make the grids.

User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: help with animation

Post by kikito » Tue Apr 24, 2012 9:31 pm

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.
When I write def I mean function.

User avatar
BEANSFTW
Prole
Posts: 28
Joined: Sun Apr 15, 2012 2:58 pm

Re: help with animation

Post by BEANSFTW » Fri Apr 27, 2012 8:36 pm

I still don't get it...

Post Reply

Who is online

Users browsing this forum: dwilso and 12 guests