Runtime EnterFrame

What happens when I have code in enterframe that takes longer than the time enterframe has to execute?

Do the iterations build up or does enterframe wait for my code to complete?

I am doing a cleanup loop in enterframe to remove my dead enemies and was noticing that it appears to be a bit quirky…

local function gameLoop( event )

    for i = #enemy, 1, -1 do
            if enemy[i].isdead == true then
                if enemy[i].timer then         – cancel shoot timer
                    timer.cancel(enemy[i].timer)
                    enemy[i].timer=nil
                end
                mte.removeSprite(enemy[i], false)            --event.target, true)
                physics.removeBody(enemy[i])
                table.remove(enemy,i)
            end
        end  

If your listeners are too slow to finish, your code will delay the next frame, effectively decreasing the framerate.

More information: https://developer.coronalabs.com/content/animation#Time-based_vs_Frame-based

If your listeners are too slow to finish, your code will delay the next frame, effectively decreasing the framerate.

More information: https://developer.coronalabs.com/content/animation#Time-based_vs_Frame-based