So, I am trying to create a simple game with love, I would like to include animations in this game, unfortunately, the tutorial on the wiki for AnAl does not seem to want to work for me.
I am not exactly sure how to get animations working in Love, does anyone have any sort of detailed resources or examples I could utilize? I would love you forever if you were able to help me, thanks!
Animations in Love.
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Animations in Love.
To animate something in LÖVE, you can either use a lot of images, one for each frame, or a single picture, which has all the frames next to each other.
You can use Quads to pick one portion of the image at the time and draw it.
Those are the basics. What sort of resources would you like to see? Tutorials, or animations used in actual games?
You can use Quads to pick one portion of the image at the time and draw it.
Those are the basics. What sort of resources would you like to see? Tutorials, or animations used in actual games?
Help us help you: attach a .love.
Re: Animations in Love.
I would love to get some sort of sprite-sheet tutorial for animation in love if anyone has a good one.
Re: Animations in Love.
Here's something I made for someone in IRC a while back. It might help.
- Attachments
-
- animation.love
- (5.91 KiB) Downloaded 26413 times
Re: Animations in Love.
What a bummer expecting an animation and seeing a static blank square #PO2problems #firstWorldProblems
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Animations in Love.
But an animated blank square!
Re: Animations in Love.
Thanks bro, this is going to help some much.thelinx wrote:Here's something I made for someone in IRC a while back. It might help.
You are on my imaginary list of totally awesome people.
Re: Animations in Love.
I have been wondering how to do a timer of sorts (and animation), very cool.
-Kazagha
-Kazagha
- rhezalouis
- Party member
- Posts: 100
- Joined: Mon Dec 07, 2009 10:27 am
- Location: Indonesia
- Contact:
[Response]Bartbes's AnimationLibrary Usage Sample
Hi Garb,
You could take a look at the minimum usage of bartbes's AnimationLibrary (sounds so wrong if typed as is, doesn't it? Guys, please stop making lewd library names; parents would forbid their kids to code on löve .. ) And one with a bit more twist: I hope they could help you pick up the library. Enjoy.
Note: sprites are borrowed from Advance Wars (Copyright belongs to Intelligent Systems I suppose).
You could take a look at the minimum usage of bartbes's AnimationLibrary (sounds so wrong if typed as is, doesn't it? Guys, please stop making lewd library names; parents would forbid their kids to code on löve .. ) And one with a bit more twist: I hope they could help you pick up the library. Enjoy.
Note: sprites are borrowed from Advance Wars (Copyright belongs to Intelligent Systems I suppose).
Aargh, I am wasting my posts! My citizenshiiiip...
Re: Animations in Love.
I saw the garb animation thing, and coded an animation myself and this is how it looks like.
and got this
Whats wrong with my code?
Code: Select all
function love.load()
require(anal)
spritesheet = love.graphics.newImage("animationtest.png")
spritesheet.setFilter("nearest", "nearest")
animation = newAnimation(spritesheet, 20, 20, 5, 4)
end
function love.update(dt)
animation:update(dt)
end
function love.draw
animation:draw(20, 20, 0, 5)
end
Code: Select all
Syntax error: main.lua:15:'(' expected near 'animation'
Traceback
[C]: ?
[C]: in function 'require'
[C]: in function 'xpcall'
Who is online
Users browsing this forum: Google [Bot] and 11 guests