Same issue here after building my app for my device. I hold my thumbs hoping for a fix in the daily build very soon!
[import]uid: 106083 topic_id: 18556 reply_id: 81187[/import]
Could this problem be related to storyboard saving “oldscene.jpg” to the tmp directory each time you load a new scene?
Is there no way to simply turn off that functionality? [import]uid: 35618 topic_id: 18556 reply_id: 85915[/import]
Hey Jonathan,
any news about the delays when you specify an effect?
Thanks!
Nick [import]uid: 77183 topic_id: 18556 reply_id: 87159[/import]
Still waiting on this too, the oldscene.jpg find is interesting, I wonder if they are some how using that for the transition. [import]uid: 8600 topic_id: 18556 reply_id: 87163[/import]
Dear Ansca,
Could You inform us about possible schedule (target date) to solve this issue called “Latency in storyboard” (or in general quality of this API) - need target date for some budget planning.
a) FEB
b) MAR / APR, use Director instead
c) forever Young 
Improved transitions: pause/resume methods is a part of roadmap but without any target date or progress level.
Regards,
Tom
[import]uid: 111283 topic_id: 18556 reply_id: 87165[/import]
This delay issue and the full page ads not being able to be skipped is holding up a release of a new app and a release of an upgrade.
[import]uid: 19626 topic_id: 18556 reply_id: 87167[/import]
This happening to me too and im really needing a fix update. Any leads? [import]uid: 42417 topic_id: 18556 reply_id: 87414[/import]
i hope fix update to storyboard API will be made soon… not when pigs fly
Regards,
Tom [import]uid: 111283 topic_id: 18556 reply_id: 88179[/import]
I’m working on fix for this. Just got my app to work much better but I think there is more to optimize in my code (I noticed some performance issues when switching to views with alot of objects). Also I have just included some effect transistion while testing.
storyboardGotoScene.lua
-- Project: Storyboard MoveTo
--
-- Version: 1.0
--
-- Author: Johan Johansson @ Baboons.se
--
-- Support: www.baboons.se
--
-- Copyright (C) Baboons. All Rights Reserved.
--
local storyboard = require "storyboard"
-- OnComplete Event
local function onComplete(view)
view.lastScene:exitScene()
view.scene:enterScene()
end
-- Set helper
local function Set(list)
local set = {}
for \_, l in ipairs(list) do set[l] = true end
return set
end
-- Move To Scene
local gotoScene = function ( sceneName, effect, effectTime)
local loadedScenes = Set{unpack(storyboard.loadedSceneMods)}
-- Get The previous scene name
local lastSceneName = storyboard.getPrevious()
pr("Last Scene " .. lastSceneName)
-- Get the previous scne
local lastScene = storyboard.getScene( lastSceneName )
-- Get or Load New Scene
local scene = storyboard.getScene( sceneName ) or require( sceneName )
pr("Testing " .. sceneName)
-- Create Scene if not loaded
if loadedScenes[sceneName] == nil then
scene.view = display.newGroup()
storyboard.scenes[sceneName] = scene
table.insert(storyboard.loadedSceneMods, sceneName)
scene:createScene()
end
-- Create View Group
scene.view.scene = scene
scene.view.lastScene = lastScene
-- Set positions
local newX = 0
local newY = 0
local curX = 0
local curY = 0
if effect == "fromRight" then
newX = -display.contentWidth
elseif effect == "fromLeft" then
newX = display.contentWidth
elseif effect == "fromTop" then
newY = -display.contentHeight
elseif effect == "fromBottom" then
newY = display.contentHeight
elseif effect == "toBottom" then
curY = display.contentHeight
elseif effect == "toTop" then
curY = -display.contentHeight
elseif effect == "slideLeft" then
newX = display.contentWidth
curX = -display.contentWidth
elseif effect == "slideRight" then
newX = -display.contentWidth
curX = display.contentWidth
end
-- Move New Scene View out of screen
scene.view.x = newX
scene.view.y = newY
-- Move New Scene
transition.to( scene.view, { time=effectTime, x=(0), y=(0), onComplete=onComplete } )
-- Move Current Scene
transition.to( lastScene.view, { time=effectTime, x=(curX), y=(curY) } )
end
return gotoScene
And then in you’r scene file just add
storyboard.gotoScene = require("storyboardGotoScene")
…to overide the built in function [import]uid: 106083 topic_id: 18556 reply_id: 88181[/import]
I haven’t tried Baboons fix yet but I can confirm that Storyboard has the same issues on android Gingerbread as people mention on ipad/iphone. [import]uid: 42417 topic_id: 18556 reply_id: 88187[/import]
I think having the option to turn off the ‘copy to jpg’ of the old scene would be very useful. I think in some cases it simply isn’t needed as performance won’t be affected by transitioning all the objects in a scene. The fact that it is so slow and doesn’t work properly if the screen is scaled make storyboard very frustrating to use at times! [import]uid: 102112 topic_id: 18556 reply_id: 88341[/import]
Hey @Johantd04
I love what you did, but I’m hitting an error and instead of me hacking around it, maybe you can give your official update.
If it’s the first invocation, then you get a crash because of this code:
-- Get The previous scene name
local lastSceneName = storyboard.getPrevious()
pr("Last Scene " .. lastSceneName)
lastSceneName is nil if you haven’t been to a scene yet, i.e. you’re in main.lua and you haven’t called gotoScene().
I’m overriding this call in main, so all of my other files will inherit it.
Also where is “pr” defined. Is that a native short cut for “print”? Or do you have some other definition?
Thanks
Rob
[import]uid: 19626 topic_id: 18556 reply_id: 88550[/import]
That should say print. [import]uid: 42417 topic_id: 18556 reply_id: 88553[/import]
I did elegantly **hack** the previous scene problems and it kind of works aa long as i’m going forward, when swipe to go back (so I’m transitioning from left to right) it gets funky in a hurry.
scene1 swipe Right to left to scene2, everything is okay.
scene2 swipe left to right and scene 2 doesn’t make it all the way off the screen.
Scene1 swipe right to left to scene 2 and it transitions all the way to the other side
I’ll try to shoot a video when I get a chance and put it somewhere to see.
But I’m too tired to try and figure out it. [import]uid: 19626 topic_id: 18556 reply_id: 88557[/import]
Just comment out the pr call. It’s my debug function that lists tables/arrays (if any).
Still alot of improvments to be done and if anyone wants to contribute we can put up a project for this. [import]uid: 106083 topic_id: 18556 reply_id: 88624[/import]
Removed pr() and fixed getPrevious bug
[code]
– Project: Storyboard GoTo
– Version: 1.0
– Author: Johan Johansson @ Baboons.se
– Support: www.baboons.se
– Copyright © Baboons. All Rights Reserved.
local storyboard = require “storyboard”
– OnComplete Event
local function onComplete(view)
if view.lastScene then
view.lastScene:exitScene()
end
view.scene:enterScene()
end
– Set helper
local function Set(list)
local set = {}
for _, l in ipairs(list) do set[l] = true end
return set
end
– Goto To Scene
local gotoScene = function ( sceneName, effect, effectTime)
local loadedScenes = Set{unpack(storyboard.loadedSceneMods)}
– Get The previous scene name
local lastSceneName = storyboard.getPrevious()
– Get the previous scne
local lastScene = storyboard.getScene( lastSceneName ) or nil
– Get or Load New Scene
local scene = storyboard.getScene( sceneName ) or require( sceneName )
– Create Scene if not loaded
if loadedScenes[sceneName] == nil then
scene.view = display.newGroup()
storyboard.scenes[sceneName] = scene
table.insert(storyboard.loadedSceneMods, sceneName)
scene:createScene()
end
– Create View Group
scene.view.scene = scene
scene.view.lastScene = lastScene
– Set positions
local newX = 0
local newY = 0
local curX = 0
local curY = 0
if effect == “fromRight” then
newX = -display.contentWidth
elseif effect == “fromLeft” then
newX = display.contentWidth
elseif effect == “fromTop” then
newY = -display.contentHeight
elseif effect == “fromBottom” then
newY = display.contentHeight
elseif effect == “toBottom” then
curY = display.contentHeight
elseif effect == “toTop” then
curY = -display.contentHeight
elseif effect == “slideLeft” then
newX = display.contentWidth
curX = -display.contentWidth
elseif effect == “slideRight” then
newX = -display.contentWidth
curX = display.contentWidth
end
– Move New Scene View out of screen
scene.view.x = newX
scene.view.y = newY
– Move New Scene
transition.to( scene.view, { time=effectTime, x=(0), y=(0), onComplete=onComplete } )
– Move Current Scene
if lastScene then
transition.to( lastScene.view, { time=effectTime, x=(curX), y=(curY) } )
end
end
return gotoScene
[/code] [import]uid: 106083 topic_id: 18556 reply_id: 88676[/import]
I’m crunching on some other items at the moment but perhaps to save me some time - does this fix work? It gets rid of all delays between storyboard transitions? [import]uid: 42417 topic_id: 18556 reply_id: 88679[/import]
It’s experimental but it did remove the inital delay tough i found the animation (at least in my app and device) to feel just a bit laggy. [import]uid: 106083 topic_id: 18556 reply_id: 88681[/import]
Short answer: in certain cases this will speed up transitions. I am using something similar and it is quicker.
Longer answer:
My guess is that the delay in transitions are caused by:
1 creating the new scene
2 moving the new scene on screen
3 moving the old screen off screen
In all these cases if you have lots and lots of objects in your scene then any / all of these will be slow.
In order to get round 3 being a potential slowdown what you can do is take a screen shot of the screen and move that off screen (as 1 object) instead of moving the real scene (potentially lots of objects) so it should be quicker. However, it seems that taking the screen shot is in itself very slow.
What the the code above does is simply move the scene offscreen. Again my guess is that for not very complex scenes this will be quicker, for very complex scenes it might actually be slower and look worse. [import]uid: 102112 topic_id: 18556 reply_id: 88717[/import]
When will we get a fix for this issue from Ansca ?
Performance on simulator is way faster than on device, I hate this storyboard gotoScene delay
[import]uid: 10141 topic_id: 18556 reply_id: 89164[/import]