-- hide device status bar display.setStatusBar( display.HiddenStatusBar ) -- require controller module local composer = require( "composer" ) -- load first scene local scrOptions = { effect = "fromRight", time = 2000 } composer.gotoScene( "game", scrOptions ) -- -- Display objects added below will not respond to storyboard transitions local MemUsageDisplay = display.newText( "0", 400, 25, native.systemFont, 20 ) MemUsageDisplay:setFillColor( gray ) local monitorMem = function() local textMem = system.getInfo( "textureMemoryUsed" ) / 1000000 collectgarbage() local date = os.date( "\*t" ) MemUsageDisplay.text = date.hour .. ":" .. date.min .. ":" .. date.sec .. " / Lua: " .. math.round(collectgarbage("count")) .. "K " .. "Tex: " .. math.round(textMem\*10) \* 0.1 .. "MB" end timer.performWithDelay( 500, monitorMem, 0 )
In the simulator everything is fine.
On the device however the splashscreen flashes for less than a second, then the screen goes black for about 5 seconds, and then the game starts.
There is no transition.
I have to add that my game.lua contains a lot of code, but if I understand the docs correctly, all of that should be processed while the splashscreen is visible? I also ran the app while watching it in debugging mode (catlog…) and put some markers in it to see how fast the code executes. The whole game.lua is processed in less than a second.
Is this normal behavior?