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
Animation Create Question
-
- Prole
- Posts: 47
- Joined: Thu Sep 24, 2009 1:49 pm
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Animation Create Question
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)
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Animation Create Question
Apart from that it is now a pure-Lua library, AnAL.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)
Help us help you: attach a .love.
Re: Animation Create Question
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.
Who is online
Users browsing this forum: Bing [Bot] and 5 guests