So, I was chaining some sprite sequences recently and it took me a long time, considering the actual simplicity of the chain. I noticed, that if one wanted to do some more complex chains, that it would be extremely frustrating and probably not worth the effort.
This is a very simplified case with a sequence changing method of a sprite object, due to multiple image sheets, which works properly. But as soon as you get more complex, you end up with really hard to read code :
function fox:playSeq()
pcall(function() self:removeEventListener("sprite", self.sequenceChanger) end)
local counter = 0
function self.sequenceChanger(event)
if event.phase == "ended" then
counter = counter + 1
if counter == 3 then
counter = 0
end
self:setSequence("walking"..(counter + 1))
self:play()
end
end
self:addEventListener("sprite", self.sequenceChanger)
self:play()
end
I was just wondering if anybody here is aware of a plugin (module), that made the process of making a little more complex sprite animations (chaining them) easier.
Thanks for your help!
Greetings, Nils
I did not use sprite animation so far but maybe this advises will be useful for you. Try
use Spine (no free, Trial version available, export to Corona). Read more: Is Spine Essential For Basic Animation
how to make animations in Corona SDK - see video The Corona SDK - Ep 11 - Animation Sequences on YouTube
some useful tips from Tutorial: Dynamically-optimized sprites