Animations And LÖVE (AnAL) - The animations replacement lib
Re: Animations And LÖVE (AnAL) - The animations replacement
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.
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.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Animations And LÖVE (AnAL) - The animations replacement
As I said before, this lib is here to provide legacy support for animations.
Re: Animations And LÖVE (AnAL) - The animations replacement
IOW, if you are using this for new projects, you are doing it wrong.bartbes wrote:As I said before, this lib is here to provide legacy support for animations.
"We could make a program for doing this for you, but that is for the LÖVE IDE, planned to be released in March 2142." ~mike
Networking with UDP uLove Proposal CCG: Gangrene
Networking with UDP uLove Proposal CCG: Gangrene
Re: Animations And LÖVE (AnAL) - The animations replacement
What's a better alternative? The only thing I could think of doing differently is using spritebatches.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Animations And LÖVE (AnAL) - The animations replacement
No spritebatches, quads (AnAL uses quads internally). They are like the animations of old, only far more powerful.Lap wrote:What's a better alternative? The only thing I could think of doing differently is using spritebatches.
Help us help you: attach a .love.
Re: Animations And LÖVE (AnAL) - The animations replacement
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?
Side question- Does anyone know at about how many draws of the same image it becomes worthwhile to switch to spritebatches?
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Animations And LÖVE (AnAL) - The animations replacement
I knew that's not what you meant, and that's not what I said either.Lap wrote:I know AnAL doesn't use spritebatches. I wasn't asking if it did.
You can't use SpriteBatches for this, but you can use Quads. I proved I was right by saying that AnAL uses Quads.
Because Quads are much more powerful than the old animation library. And I have my own animations in Tribe.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.
No, but in general it is: the more things stay the same, the better suited SpriteBatches are (which rules them out for animations).Lap wrote:Side question- Does anyone know at about how many draws of the same image it becomes worthwhile to switch to spritebatches?
Help us help you: attach a .love.
Re: Animations And LÖVE (AnAL) - The animations replacement
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.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.
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?
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Animations And LÖVE (AnAL) - The animations replacement
Chill, dude.
I didn't mean it is completely impossible, just that it just plain wrong, like using binary strings to represent numbers.Lap wrote:I can easily use spritebatches to make a similar animation system, it would just be slower under most situations.
It proves that Quads can be used, and that was my point.Lap wrote:AnAL using quads doesn't prove anything besides the fact that AnAL uses quads, which we already knew.
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.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?
Help us help you: attach a .love.
Who is online
Users browsing this forum: No registered users and 8 guests