Re: how does anim8 reads an image?
Posted: Mon Jun 15, 2015 2:32 am
Quads? interesting..
Ah, but you would be sacrificing code readability for some theoretical speed. Before the code didn't have to know that there were differences between animations and single quads. It could treat everything as an animation. Now you have to make at least 1 if somewhere to differentiate between animations and "stills".Positive07 wrote: That may be wasting too much (I mean, anim8 creates data needed to animate like all the assets in the grid in a table, and position, width... etc etc, you just need the image section), use a [wiki]Quad[/wiki] instead, you can create one with [wiki]love.graphics.newQuad[/wiki]
The animation code does a bit less work if it doesn't "change frame", so for still animations it will be slightly better if you use a bigger number there - like 1 or 10 seconds. But the difference is so small that I doubt you will notice it (you might notice some percent points difference it if you animate thousands of objects simultaneously)lex wrote:do I still use the 0.1?
Oh!! Memoizing, yeah then you have a win there, also about checking if is an animation or not, you are totally right, it is better if you dont have to differentiatekikito wrote:-snip-
Code: Select all
g = anim8.newGrid(64,65, 1024,768, 167,498, 1)
land = anim8.newAnimation( g (1,1), 1)<---1-10 ?