I'm currently thinking on making a pokemon clone to test out some of my libs and I wanted to make this clone a little different from others, I wanted to make all pokemon animated like the Black and White (1 and 2) animations, it was realy hard to find the pokemon spriteSheets (front, back, shiny front and shiny back) animations but I came across this website which has ALL of the pokemon in all their state, it's an awesome compilation.
The thing is LÖVE doesn't load gifs, I've tried unpacking a gif but I got 680 pngs as output and I don't want to make huge spriteSheets out all the pngs, maybe my problem here is the program I used to unapck, ffmpeg and this was the command I used:
Code: Select all
ffmpeg -i 494.gif assets\frames\a%d.png
Then I used this code to pack them all into a png sheet file:
Code: Select all
sheet = love.image.newImageData(53*680,62)
local rem = 0
for i,file in ipairs(love.filesystem.getDirectoryItems('assets/frames')) do
if string.find(file, '.png') then
local img = love.graphics.newImage('assets/frames/'..file)
sheet:paste(img:getData(),53*(i-rem)-53,0,0,0,53,62)
else
rem = rem +1
end
end
sheet:encode('sheet.png')]]
This was the output:
(link to the image on mediafire)
And then I tried loading it into ANaL, I got a static image:
How I loaded it:
Code: Select all
function love.load()
test = newAnimation(love.graphics.newImage('assets/sheet.png'),53,62,1,680)
end
function love.update(dt)
test:update(dt)
end
function load.draw()
test:draw(0,0)
end