Page 4 of 8

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

Posted: Sun Jan 10, 2010 12:14 pm
by bartbes
No problem

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

Posted: Tue Jan 12, 2010 5:08 pm
by scirath
So ... Are we to assume that AnAL is compatible with LUBE?

(Sorry. Couldn't help it...)

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

Posted: Tue Jan 12, 2010 7:12 pm
by bartbes
You might want to ask your girlfriend if she's okay with anal before putting lube all over her...

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

Posted: Wed Jan 13, 2010 3:35 am
by scirath
Okay, I had a look over it a bit ago, and it looks pretty straightforward.

Will we need to pay attention to the power-of-two image dimensions on the anims for now as well? And, if so, will "buffer" space around a frame do the trick?

E.g., I've a character animation that's framed at 32x48. If I need to bring it in line with power-of-2, can I just reframe it to 32x64 and call it a day?

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

Posted: Wed Jan 13, 2010 4:20 am
by TechnoCat
scirath wrote:Okay, I had a look over it a bit ago, and it looks pretty straightforward.

Will we need to pay attention to the power-of-two image dimensions on the anims for now as well? And, if so, will "buffer" space around a frame do the trick?

E.g., I've a character animation that's framed at 32x48. If I need to bring it in line with power-of-2, can I just reframe it to 32x64 and call it a day?
Check the example at the bottom http://love2d.org/docs/ImageData.html

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

Posted: Wed Jan 13, 2010 7:08 am
by scirath
TechnoCat wrote:
scirath wrote:Okay, I had a look over it a bit ago, and it looks pretty straightforward.

Will we need to pay attention to the power-of-two image dimensions on the anims for now as well? And, if so, will "buffer" space around a frame do the trick?

E.g., I've a character animation that's framed at 32x48. If I need to bring it in line with power-of-2, can I just reframe it to 32x64 and call it a day?
Check the example at the bottom http://love2d.org/docs/ImageData.html
Sweet. Thanks, TechnoCat.

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

Posted: Wed Jan 13, 2010 7:14 am
by bartbes
That is a good question, whether the base image or the quad needs to be power-of-two, really, the only way to find out is trying (though my guess would be the original image.)

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

Posted: Wed Jan 27, 2010 11:02 pm
by killerasus
Hey bartbes,

I believe I found a bug in AnAL. As for checking for collisions with the border of the screen, I was using the following code

Code: Select all

function Player:move (dt)
	--Horizontal movement
	if love.keyboard.isDown("right") then
		if (self.position.x + (self.speed.x*dt) + self.sprite:getWidth() < love.graphics.getWidth()) then
			self.position.x = self.position.x + (self.speed.x * dt)
		else
			self.position.x = love.graphics.getWidth() - self.sprite:getWidth()
		end
...
sprite is an animation created with AnAL. I was getting nil value for method getWidth and getHeight, so I decided to check what what both functions were doing

Code: Select all

function animation:getWidth()
	return self.frames[self.position]:getWidth()
end
Printing the values for self.position and self.frames[self.position], I noticed that each frame is a Quad, which doesn't has a getWidth or getHeight method. I modified the methods so I could get the frame properties using Quad:getViewport()

Code: Select all

function animation:getWidth()
	print(self.position)
	print(self.frames[self.position])
	local x, y, w, h = self.frames[self.position]:getViewport()
	return w
end
It worked pretty neat =)

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

Posted: Thu Jan 28, 2010 6:43 am
by bartbes
Yeah, I think I noticed that bug before.. but apparently I haven't done anything about it, will fix it, thanks for reporting.

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

Posted: Thu Jun 03, 2010 3:37 pm
by quetzlcoatl
where can I download the files? The attachment link is broken... please, I need this lib. to try these animation...

ty..

[EDITED] Sorry, i found the file :D