So I was looking into creating a custom scene transition between two scenes. Something similar to the cloud transition in both angry birds 2 and boom beach. However as composer is transitioning between the two scenes it causes my animation to hiccup. I was wondering if there was any way to prevent this hiccup or performance dip for my animation. This is the code that controls my animation, its basically two sets of clouds that move together at the center of the screen then move back offscreen, and while they are together the new scene loads.
local function changeScene(destination) local function preventTouch( ) return true end local touchBlock = display.newRect(centerX, centerY, \_rW, \_rH) touchBlock.alpha = .01 touchBlock:addEventListener( "tap", preventTouch ) touchBlock:addEventListener( "touch", preventTouch ) local function listener( ) composer.gotoScene( destination ) end local topBg = display.newImageRect( "images/menu\_scenechange.png", \_rW, \_rH ) topBg.x, topBg.y = centerX, \_y0 - \_rH\*.5 topBg.xScale, topBg.yScale = -1,-1 local botBg = display.newImageRect( "images/menu\_scenechange.png", \_rW, \_rH ) botBg.x, botBg.y = centerX, \_rH + \_rH\*.5 local function deleteAll() display.remove(touchBlock) touchBlock = nil display.remove(topBg) topBg = nil display.remove(botBg) botBg = nil end changeTransitions[#changeTransitions + 1] = transition.to( topBg, { time=transitionTime\*.5, y=centerY } ) changeTransitions[#changeTransitions + 1] = transition.to( botBg, { time=transitionTime\*.5, y=centerY, onComplete=listener } ) changeTransitions[#changeTransitions + 1] = transition.to( topBg, { delay=transitionTime\*.55, time=transitionTime\*.5, y=\_y0 - \_rH\*.5} ) changeTransitions[#changeTransitions + 1] = transition.to( botBg, { delay=transitionTime\*.55, time=transitionTime\*.5, y=\_rH + \_rH\*.5, onComplete=deleteAll} ) end