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

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
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 lib

Post by bartbes » Sun Jan 10, 2010 12:14 pm

No problem

scirath
Citizen
Posts: 85
Joined: Mon Feb 23, 2009 4:44 am

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

Post by scirath » Tue Jan 12, 2010 5:08 pm

So ... Are we to assume that AnAL is compatible with LUBE?

(Sorry. Couldn't help it...)
(USER MIGHT BE BANNED FOR THIS POST.)

User avatar
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 lib

Post by bartbes » Tue Jan 12, 2010 7:12 pm

You might want to ask your girlfriend if she's okay with anal before putting lube all over her...

scirath
Citizen
Posts: 85
Joined: Mon Feb 23, 2009 4:44 am

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

Post by scirath » Wed Jan 13, 2010 3:35 am

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?
(USER MIGHT BE BANNED FOR THIS POST.)

User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Denver, CO
Contact:

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

Post by TechnoCat » Wed Jan 13, 2010 4:20 am

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

scirath
Citizen
Posts: 85
Joined: Mon Feb 23, 2009 4:44 am

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

Post by scirath » Wed Jan 13, 2010 7:08 am

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.
(USER MIGHT BE BANNED FOR THIS POST.)

User avatar
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 lib

Post by bartbes » Wed Jan 13, 2010 7:14 am

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.)

User avatar
killerasus
Prole
Posts: 1
Joined: Wed Jan 27, 2010 10:46 pm
Location: Rio de Janeiro, Brazil
Contact:

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

Post by killerasus » Wed Jan 27, 2010 11:02 pm

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 =)

User avatar
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 lib

Post by bartbes » Thu Jan 28, 2010 6:43 am

Yeah, I think I noticed that bug before.. but apparently I haven't done anything about it, will fix it, thanks for reporting.

quetzlcoatl
Prole
Posts: 1
Joined: Fri Jan 01, 2010 12:15 pm

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

Post by quetzlcoatl » Thu Jun 03, 2010 3:37 pm

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
Last edited by quetzlcoatl on Thu Jun 03, 2010 4:01 pm, edited 1 time in total.

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests