Animation Create Question

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
poorenglish
Prole
Posts: 47
Joined: Thu Sep 24, 2009 1:49 pm

Animation Create Question

Post by poorenglish »

I can't create Animation by the attachment PNG files.
The code like the "Example 11: Create and use an Animation "
---------------------------------------------------------------------------------------------------------
function load()
-- Set a lovely pink background color.
love.graphics.setBackgroundColor(246, 198, 222)

-- Load the source of the animation.
local img = love.graphics.newImage("images/a.png")
--local img = love.graphics.newImage("images/anim-boogie.png")
-- Create an animation with a frame size of 32x32 and
-- 0.1s delay betwen each frame.
anim = love.graphics.newAnimation(img, 320, 240, 0.1)
-- anim = love.graphics.newAnimation(img, 32, 32, 0.1)
end

function update(dt)
-- The animation must be updated so it
-- knows when to change frames.
anim:update(dt)
end

function draw()
-- Draw the animation the center of the screen.
love.graphics.draw(anim, 400, 400)
end
-----------------------------------------------------------------------------------
when I change the picture for default,the program will run normal.
The attachment PNG is 4800*720,one frame is 320*240,is there more key that I ignroe?
Love version is 0.50,OS version is XP SP3
Much thanks
Attachments
The PNG to create Animation
The PNG to create Animation
a.png (396.11 KiB) Viewed 1735 times
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Animation Create Question

Post by Jasoco »

Just so you know, last I checked the Animation feature was being removed from 0.6.0 so you might as well not use it. (yet)
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Animation Create Question

Post by Robin »

Jasoco wrote:Just so you know, last I checked the Animation feature was being removed from 0.6.0 so you might as well not use it. (yet)
Apart from that it is now a pure-Lua library, AnAL.
Help us help you: attach a .love.
User avatar
napco
Party member
Posts: 129
Joined: Fri Jun 12, 2009 9:28 pm
Location: Ital... ehm...

Re: Animation Create Question

Post by napco »

Your image is too big. LOVE can't read huge images. I've already tryed it with a BIG tileset and the result were white (?) tiles.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest