Storyboard API Questions

@kbradford I have the same problem you get with transitions in the storyboard API, seems like there no answer in the forum from @Jonathan or anyone else, have you can solve this issue with transitions? I’m running in Mac simulator and various devices and get the same result (cropped when transition begins) [import]uid: 80980 topic_id: 17828 reply_id: 83513[/import]

Anyone else noticed slow transitioning between scenes using storyboard?
On simulator everything works fine but on an actual device (ipad, iphone), it takes almost half a second to a second from the time i press the button to the time transition to another scene starts.

I tried building my own app and also demo storyboard app… no difference. Both have the same “lag”.
I had no similar problems using director. Anyone has any advice?

Thank you!
Nick [import]uid: 77183 topic_id: 17828 reply_id: 83527[/import]

Transitions performance is know by Ansca - but nothing happens…I can’t imagine why they don’t release a fix for this. Maybe funnier to develop new stuff instead of correcting bugs…looks like tha- This is bad, a lot of people sitting in the same boat.

Jaokim [import]uid: 81188 topic_id: 17828 reply_id: 83530[/import]

would be nice if someone from Ansca team could confirm whether they are planning on fixing this bug!???

thanks.
Nick [import]uid: 77183 topic_id: 17828 reply_id: 83548[/import]

Good to know that other folks are having the same problem. I was pulling my hairs out to figure why the damn transition is so slow on all the devices I tested. [import]uid: 19297 topic_id: 17828 reply_id: 83552[/import]

Jonathan Beebe, anyone from Ansca team…could you please tell us when are u planning on fixing this?

Please let us know!!!

thank you.
Nick [import]uid: 77183 topic_id: 17828 reply_id: 83746[/import]

Hi bdjones,

thanks for sharing this. I will need to do something like on your topic (3.) in the next days - can you tell me what delay you picked? Is 50 ms fine or does Storyboard need a longer time to clear the former scene?

Best,
Andreas
[import]uid: 107675 topic_id: 17828 reply_id: 83764[/import]

I played around with a bunch of delay times (1ms, 50ms, 500ms, 1000ms), and I always received that malloc exception if my delay was less than 1000ms long. 1000ms is an awfully long time…I have no idea why it would take that long for the storyboard to clean itself up. [import]uid: 82003 topic_id: 17828 reply_id: 83818[/import]

@bdjones: Thanks!

I guess Jonathan Beebe is on vacation or away because of other reasons, he hasn’t answered any posts here since 12th of January.
As soon as he’s back he will answer all our questions (transition delays etc.), I’m sure about it. :slight_smile:
[import]uid: 107675 topic_id: 17828 reply_id: 83948[/import]

I’m trying to test for memory leaks in one of my scenes by repeatedly loading the scene then purging it. But I’m getting a strange error when I try to reload the purged scene:

Runtime error
bad argument #-1 to ‘save’ (Proxy expected, got nil)
stack traceback:
[C]: ?
[C]: in function ‘save’
?: in function ‘?’
?: in function ‘gotoScene’
/Users/Bryant/Projects/Test/main.lua:53: in function ‘_listener’
?: in function <?:514>
?: in function <?:215>

Has anyone seen this before?

Here’s the code I’m using:

[code]
local storyboard = require “storyboard”
storyboard.gotoScene( “scenes.title” )

timer.performWithDelay( 1500, function()
storyboard.removeScene( “scenes.title” )
systemMemory = collectgarbage(“count”)
print("System Memory " … systemMemory … " Texture Memory: " … system.getInfo(“textureMemoryUsed”))
end )
timer.performWithDelay( 3000, function()
storyboard.gotoScene( “scenes.title” )
systemMemory = collectgarbage(“count”)
print("System Memory " … systemMemory … " Texture Memory: " … system.getInfo(“textureMemoryUsed”))
end )

timer.performWithDelay( 4500, function()
storyboard.removeScene( “scenes.title” )
systemMemory = collectgarbage(“count”)
print("System Memory " … systemMemory … " Texture Memory: " … system.getInfo(“textureMemoryUsed”))
end )
timer.performWithDelay( 6000, function()
storyboard.gotoScene( “scenes.title” )
systemMemory = collectgarbage(“count”)
print("System Memory " … systemMemory … " Texture Memory: " … system.getInfo(“textureMemoryUsed”))
end )
[/code] [import]uid: 82003 topic_id: 17828 reply_id: 84071[/import]

Have you’ll tried using removeScene instead of purgeScene?

Larry
[import]uid: 11860 topic_id: 17828 reply_id: 84072[/import]

Yeah, I tried both removeScene and purgeScene but they both cause the same error… :-\ [import]uid: 82003 topic_id: 17828 reply_id: 84074[/import]

yeah i found that purgeScene leaks somewhere as well reloading several times back and forth, somewhere along the way the they get lost and events ( for my buttons were no longer firing )

Larry [import]uid: 11860 topic_id: 17828 reply_id: 84075[/import]

Hi folks,

ISSUE A
I was wondering why storyboard does not have method to be run BEFORE scene has moved onscreen.

This would be run immediately before scene has moved onscreen as addition to enterScene event which works after scene has moved onscreen.

Now its required to run getScene in previous scene to update next scene. This could be done in enterSceneBefore event…

ISSUE B
Does fade transition changes alpha of all object ? So try to draw several object one top off the other… with fade transition they are somewhat transparent. This is screen from transition fade to scene (so scene is starting). Its easy to see that alpha is changed.

http://imageshack.us/photo/my-images/825/samplez.png

Its build 732.

Regards,
Tom [import]uid: 111283 topic_id: 17828 reply_id: 84076[/import]

What is this…
Feb 1 23:57:16 Mac-mini.local Corona Simulator[3116] : CGImageCreate: invalid image size: 0 x 0.
Feb 1 23:57:16 Mac-mini.local Corona Simulator[3116] : CGContextDrawImage: invalid context 0x0
Feb 1 23:57:16 Mac-mini.local Corona Simulator[3116] : CGBitmapContextCreateImage: invalid context 0x0
ImageIO: CGImageDestinationAddImage image parameter is nil
ImageIO: CGImageDestinationFinalize image destination does not have enough images

What in the world.,… (?)
happens when I try to purge a scene. I even stripped it down to be very simple.

help! [import]uid: 100299 topic_id: 17828 reply_id: 84133[/import]

Can you post your code, Lava Level? I’ve gotten that exception a few times… The Storyboard API is finicky :slight_smile: [import]uid: 82003 topic_id: 17828 reply_id: 84145[/import]

Are Storyboard transitions incompatible with the spritesheet API? Every sprite I add to my scene turns into a black box during transitions.

Has anyone else noticed this problem? [import]uid: 82003 topic_id: 17828 reply_id: 84147[/import]

YES!

ok, I figured out why I was getting that error… apparently what I was looking at was NOT storyboard, but my graphics onTop of the screen. I figured that out when I put graphics on another screen and they where not showing up. So it was purgeScene on what I thought had graphics in it.

I solved it by sending a background image to the group. However, now I am perplexed why my layouts are not going IN storyboard, but resting ontop of it, on the display.

[code]function scene:createScene( event )
local group = self.view
–[[-------------------------------------------------------------------------
– CREATE display objects and add them to ‘group’ here.
– Example use-case: Restore ‘group’ from previously saved state.

local background = display.newImageRect( “background.jpg”, display.contentWidth, display.contentHeight )
group:insert( background ) --< this works, the ones below don’t.

local sf = require(‘loq_sprite’).newFactory( ‘sheet_items’, currentMap.levelSheet, ‘sheet_npc’)
group.gfx = require(‘layout_game’).createLayout(sf)

local ui_sf = require(‘loq_sprite’).newFactory( ‘sheet_gameUI’, ‘sheet_fps’ )
group.ui = require(‘layout_ui_disect’).createLayout(ui_sf)

group:insert(group.gfx.groups.TheGame)
group:insert(group.ui.groups.TheUI)


end[/code]
[import]uid: 100299 topic_id: 17828 reply_id: 84149[/import]

@ optionniko

https://developer.anscamobile.com/forum/2011/12/03/initial-delay-storyboardgotoscene [import]uid: 40334 topic_id: 17828 reply_id: 85002[/import]

I have a stationery background in main.lua that doesn’t transition when a scene animates in. the next scene that animates in is just a fullscreen tranparent png image for testing. When this fullscreen transparent png uses slideLeft as it’s animation the transparent background turns black as it animates.

Why is this happening? I assume it has to do with caching the bitmap or something? It seems similar to what bdjones describes above. [import]uid: 69160 topic_id: 17828 reply_id: 85060[/import]