Animations And LÖVE (AnAL) - The animations replacement lib

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
bartbes
Sex machine
Posts: 4944
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Animations And LÖVE (AnAL) - The animations replacement lib

Post by bartbes » Sun Sep 13, 2009 7:12 am

Since it appears everybody has moved to the pre-release builds in attempts to port their projects, I figured I might as well post AnAL now.

What does AnAL do? It replaces the removed Animations functionality in LÖVE 0.6.0
Do I need code changes? Yes, a little, let me list the 2 (!) changes:
  • newAnimation instead of love.graphics.newAnimation
  • anim:draw() instead of love.graphics.draw(anim)
If you don't want to change this and keep old behavior, add this code before you require the file:

Code: Select all

Animations_legacy_support = true
However, notice this does change love.graphics.draw behavior, it now calls the draw field if it exists when there is a table passed to love.graphics.draw.

You can find it in my love-misc-libs repo on github.
Enough talking, here it is:
AnAL.zip
Version 1.5
01102010
(8.14 KiB) Downloaded 2422 times
^-- contains docs!
animation.lua
Version 1.1
September 19th 2009
(3.72 KiB) Downloaded 826 times

User avatar
kalle2990
Party member
Posts: 245
Joined: Sat Sep 12, 2009 1:17 pm
Location: Sweden

Re: Animations And LÖVE (AnAL) - The animations replacement lib

Post by kalle2990 » Sun Sep 13, 2009 12:41 pm

Nice work! :ultrahappy:
I might change some new 0.6.0 functions so they behave like the 0.5.0 ones, the most stuff is alot less complicated than this (even if this isn't too complicated to understand).
A little question, shouldn't :stop() be called :pause() instead, because that's what it does. To really stop you have to use :stop() :reset() but I guess the original animate doesn't reset on stop.

User avatar
bartbes
Sex machine
Posts: 4944
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Animations And LÖVE (AnAL) - The animations replacement lib

Post by bartbes » Sun Sep 13, 2009 6:46 pm

The goal was to replicate the old animations as closely as possible, to minimize porting difficulty.

paclito
Prole
Posts: 35
Joined: Wed Apr 22, 2009 8:33 pm

Re: Animations And LÖVE (AnAL) - The animations replacement lib

Post by paclito » Sun Sep 13, 2009 11:09 pm

god work men!!!

Perhaps you can add an event when animation reaches end? It can help in some cases and perhaps you can add some exampes of usage isn't?

User avatar
osgeld
Party member
Posts: 303
Joined: Sun Nov 23, 2008 10:13 pm

Re: Animations And LÖVE (AnAL) - The animations replacement lib

Post by osgeld » Mon Sep 14, 2009 1:23 am

cant wait to try it (since both my os's seem to be on the 0.6 borked list, ubuntu and windows XP64)

User avatar
bartbes
Sex machine
Posts: 4944
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Animations And LÖVE (AnAL) - The animations replacement lib

Post by bartbes » Mon Sep 14, 2009 5:56 am

It should be fine on ubuntu, or any linux for that matter, I run it on ubuntu!

User avatar
napco
Party member
Posts: 129
Joined: Fri Jun 12, 2009 9:28 pm
Location: Ital... ehm...

Re: Animations And LÖVE (AnAL) - The animations replacement lib

Post by napco » Mon Sep 14, 2009 10:26 am

Nice work! Maybe i'll start using animations too when i'll upgrade to 6.0 (i don't like to use separate files for every character direction)... By the way, don't you think the name AnAL is a bit... ambiguous? ^^

User avatar
osgeld
Party member
Posts: 303
Joined: Sun Nov 23, 2008 10:13 pm

Re: Animations And LÖVE (AnAL) - The animations replacement lib

Post by osgeld » Mon Sep 14, 2009 1:49 pm

bartbes wrote:It should be fine on ubuntu, or any linux for that matter, I run it on ubuntu!
http://love2d.org/forum/viewtopic.php?f ... t=50#p9402

waiting on this magic build that works :)

User avatar
bartbes
Sex machine
Posts: 4944
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Animations And LÖVE (AnAL) - The animations replacement lib

Post by bartbes » Mon Sep 14, 2009 2:24 pm

I hoped it was fixed in yesterday's build?

User avatar
osgeld
Party member
Posts: 303
Joined: Sun Nov 23, 2008 10:13 pm

Re: Animations And LÖVE (AnAL) - The animations replacement lib

Post by osgeld » Mon Sep 14, 2009 2:42 pm

Ah didnt see that, Ill check when I get home

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 0 guests