Regardless, here it is. This is, as far as I know, seamless walking. I was looking into how to make a walking character and found a post by Bartbes. However, when I looked at his/her code, I couldn't figure out for the life of me how it worked.
Code: Select all
function love.update(dt)
if walking then
anim:seek(step*4+direction)
steptime = steptime + dt
if steptime >= 0.25 then --change this
step = (step%2)+1
steptime = steptime - 0.25 --and this
--if you want another delay
end
else
anim:seek(direction)
end
end
Constructive criticism is always appreciated, It's nice to know exactly what is "not tickling everyone's fancy" so to speak.
EDIT: Oh, and before the posts come rolling in, I know the code is sloppy. I cleaned it up as best as I can, but.. well, you know.