Page 5 of 8

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

Posted: Thu Jun 03, 2010 3:56 pm
by bartbes
Reuploaded.

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

Posted: Wed Jun 16, 2010 8:44 pm
by Lap
I edited my personal copy to have a new arg and a couple of functions that I think would be pretty useful here.

The new arg is a number that tells the animation how many times it should play before stopping and calling an onStop() function. You can also return how many loops the animation has played through.

In my game I make the onStop() function destroy the animation and remove it from the animation table I have. I can think of some other nifty uses that would save you from needing to make separate timer functions.

Adding mode to the newanimation args is also nice.

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

Posted: Thu Jun 17, 2010 6:17 am
by bartbes
As I said before, this lib is here to provide legacy support for animations.

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

Posted: Thu Jun 17, 2010 8:36 am
by Elvashi
bartbes wrote:As I said before, this lib is here to provide legacy support for animations.
IOW, if you are using this for new projects, you are doing it wrong.

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

Posted: Thu Jun 17, 2010 2:18 pm
by Lap
What's a better alternative? The only thing I could think of doing differently is using spritebatches.

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

Posted: Thu Jun 17, 2010 2:56 pm
by Robin
Lap wrote:What's a better alternative? The only thing I could think of doing differently is using spritebatches.
No spritebatches, quads (AnAL uses quads internally). They are like the animations of old, only far more powerful.

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

Posted: Thu Jun 17, 2010 3:20 pm
by Lap
I know AnAL doesn't use spritebatches. I wasn't asking if it did. I'm at a loss for why I wouldn't want to use this for new projects and was wondering how different you could even make another animation library.

Side question- Does anyone know at about how many draws of the same image it becomes worthwhile to switch to spritebatches?

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

Posted: Thu Jun 17, 2010 3:33 pm
by Robin
Lap wrote:I know AnAL doesn't use spritebatches. I wasn't asking if it did.
I knew that's not what you meant, and that's not what I said either.

You can't use SpriteBatches for this, but you can use Quads. I proved I was right by saying that AnAL uses Quads. ;)
Lap wrote:I'm at a loss for why I wouldn't want to use this for new projects and was wondering how different you could even make another animation library.
Because Quads are much more powerful than the old animation library. And I have my own animations in Tribe.
Lap wrote:Side question- Does anyone know at about how many draws of the same image it becomes worthwhile to switch to spritebatches?
No, but in general it is: the more things stay the same, the better suited SpriteBatches are (which rules them out for animations).

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

Posted: Thu Jun 17, 2010 3:52 pm
by Lap
Robin wrote: You can't use SpriteBatches for this, but you can use Quads. I proved I was right by saying that AnAL uses Quads. ;)
I can easily use spritebatches to make a similar animation system, it would just be slower under most situations. AnAL using quads doesn't prove anything besides the fact that AnAL uses quads, which we already knew.

The question is, why wouldn't I want to use AnAL? If we agree that quads are the best way to do animations and AnAL uses quads what's the problem here?

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

Posted: Thu Jun 17, 2010 4:07 pm
by Robin
Chill, dude.
Lap wrote:I can easily use spritebatches to make a similar animation system, it would just be slower under most situations.
I didn't mean it is completely impossible, just that it just plain wrong, like using binary strings to represent numbers.
Lap wrote:AnAL using quads doesn't prove anything besides the fact that AnAL uses quads, which we already knew.
It proves that Quads can be used, and that was my point.
Lap wrote:The question is, why wouldn't I want to use AnAL? If we agree that quads are the best way to do animations and AnAL uses quads what's the problem here?
Because it is inherently less powerful than using Quads. Sure, you can use AnAL, but it probably won't be supported, and you'll need to work around the limitations of the legacy Animation system.