StoryBoard Issues Thread : Please post any

For anyone interested, the storyboard.gotoScene() documentation has been updated to include information on how to use the new “parameter passing” feature that was included with build 2012.785. The storyboard.loadScene() documentation has been updated as well. [import]uid: 52430 topic_id: 24131 reply_id: 102480[/import]

Uh…well as we say in french, “de rien”. It’s nothing. Really. Try not to remember my dunce moment too hard. :wink: Any idea why getting the scene name returns nil in that situation I mentioned, btw?

(dives into info passing doc) [import]uid: 41884 topic_id: 24131 reply_id: 102481[/import]

Alright, a transition bug. 100% reproduceable in 3 steps with 3 scenes:

-- Assuming you're already on scene 1... --1 storyboard.gotoScene("scene3", "flip") -- works --2 storyboard.gotoScene("scene2", "slideRight") -- works --3 storyboard.gotoScene("scene1", "slideLeft") -- uh oh

On sliding back to Scene one, it slides from some form of display.CenterReferencePoint, meaning you only see the right half of the scene.

Is #13718 related to this? [import]uid: 41884 topic_id: 24131 reply_id: 102542[/import]

@richard9: You’re absolutely right, there is a problem when transitioning scenes in the order you mentioned above.

I was able to go in and correct the issue, as well as several other issues related to effects. There should *hopefully* be no more transition effect-related problems once all current changes are pushed into the daily builds.

And regarding the strange ‘nil’ issue, I’m not sure why that’s happening. I’ll have to see a test case (also, I’m not sure how safe requiring the target scene is — I’ll want to see a test case and investigate that as well).

Thanks again! [import]uid: 52430 topic_id: 24131 reply_id: 102579[/import]

If you really need me to cook up test cases and file bugs, let me know, but it’s pretty simple:

[code]–scene1.lua
local scene2 = require(“scene2”) – [1] Require the target scene

– goto the new scene
storyboard.gotoScene(“scene2”, “flip”)

– scene2.lua
local sceneName = storyboard.getCurrentSceneName() – nil (until you remove the include) [/code]

Generally speaking one should never need to include the target scene ahead of time but as you’ve probably seen me saying it’s a fast way to check if a scene is broken and not being returned, but still get the error lines (otherwise you just get the “warning” message about there being no scene.) I’m not really sure of another way to debug scenes otherwise?

[import]uid: 41884 topic_id: 24131 reply_id: 102583[/import]

One more issue. Whether it’s a bug or just weird implementation, not sure.

  1. Why is one just “getPrevious” and the other “getCurrentSceneName”? They both fetch names.
  2. They seem to function differently. Differently enough that I can’t use getPrevious as it is, but here’s how it works:

[code] – We’ve just arrived at scene2.lua from scene1.lua.

– scene2.lua
local doSomething = codebase.doThis()[/code]

--codebase.lua local function doThis() local thisScene = storyboard.getCurrentSceneName() print("thisScene", thisScene) -- "scene2" local prevScene = storyboard.getPrevious() print("prevScene", prevScene) -- "scene2" end

Basically, because it’s pulling the function from a different file, the current scene also becomes the previous scene. Or so it looks. (785/786 OSX)

EDIT: ugh, also just spent a half hour debugging a problem that just turned out to be that “credits” is a protected name. (or at least protected from use as a scene!) -_-;;; [import]uid: 41884 topic_id: 24131 reply_id: 102606[/import]

I have a small issue with transitions.

When i’m transitioning from a scene that’s quite heavy, that scene somethimes turns blank while transitioning. I’m only using ‘slideRight’ and ‘slideLeft’.

My understanding is that when transitioning away from a heavy scene, that scene gets completely wipedout just before transition starts to freeup the memory. I’m i right?

And i would also like to add that i’ve noticed this behaviour started to appear in around build 782 (not exactly sure if 782 or somewhere near 782).

Thanks!
Nick [import]uid: 77183 topic_id: 24131 reply_id: 102718[/import]

@richard9: If you’re requiring the scene only to catch the “return scene” mistake, then once the current changes are pushed into the daily builds, you won’t need to do that anymore because you’ll get a warning in the terminal to help you out if you happen to make that mistake. [import]uid: 52430 topic_id: 24131 reply_id: 102781[/import]

@jonathanbeebe It depends on what you mean by “return scene” mistake.

Anyone who uses the templates will never forget to “return scene”, as in type the command, in the lua files.

Corona itself, however, will not “return scene” no matter what you write if there is a bug existing in the scene.

ex:

[code]local scene = storyboard.newScene()
local x = – oops, forgot to fill this in!

– Corona doesn’t give an error, it just prints out that the scene either doesn’t exist or was not returned, etc[/code]
[/code]

Since Corona isn’t giving out the error line I would then require in this particular scene in order to find out. :slight_smile: [import]uid: 41884 topic_id: 24131 reply_id: 102785[/import]

Well I just had an app rejected by Apple because of a transition issue.

Here’s the screen shot:

They say it happens on a new iPad. I can’t reproduce it on my new iPad. I’ve asked for more information.

[import]uid: 19626 topic_id: 24131 reply_id: 102794[/import]

I think this issues is same as mine.?

Nick [import]uid: 77183 topic_id: 24131 reply_id: 102798[/import]

Looks like the offcenter transitioning issue jonathan and I were talking about [import]uid: 41884 topic_id: 24131 reply_id: 102806[/import]

Anyone know if transitions are fixed? It seems like with every build something else is broken while something else is added. Transitions don’t work period for me on any device using the latest build. The current scene just disappears while the next scene fades in, slides in, or whatever I choose. Also previously on iPads the current scene will change locations. I’m assuming this is because my background image is scaled up to fit larger screens and overlaps but it should still work regardless of if my images are off screen.

Thanks in advance. [import]uid: 63800 topic_id: 24131 reply_id: 102827[/import]

Quick update: All current changes and fixes have been pushed in, and should appear in the next daily build (you’ll see the Storyboard bullet in the release notes).

Thanks for all your help in identifying these issues!

EDIT: And that build has just posted, it’s 2012.790. [import]uid: 52430 topic_id: 24131 reply_id: 102957[/import]

Thank you Jonathan and team! [import]uid: 19626 topic_id: 24131 reply_id: 102992[/import]

I’ve started an app using storyboard. I want the Application to run on iPhone, iPAD2 and iPAD3 with images using the full native resolutions. I want to support all the resolutions natively and fully with 1 build.
I saw a post saying we could use @2 and @4 in the image names and the image of the right resolution would be picked.
I used the sample storyboad app and replaced the images with mine in the different resolutions named @2 and @4 and it does not work.
I called the image using the standard stroyboard syntax
function scene:createScene( event )
local screenGroup = self.view
image = display.newImage( “2ndship.png”)
screenGroup:insert( image )

Perhaps I’m doing something wrong. This is in my build.settings
orientation = {
default = “landscapeRight”,
supported =
{
“landscapeRight”
},
imageSuffix =
{
["@2x"] = 2, – for ipad 2
["@4x"] = 4, – for iPad 3
}
}
and this is in my config.lua
application = {
content = {
width = 320,
height = 480,
scale = “letterBox”,
fps = 30,

imageSuffix =
{
["@2x"] = 2, – for ipad 2
["@4x"] = 4, – for iPad 3
}

}
}
Any ideas? Many thanks
[import]uid: 100134 topic_id: 24131 reply_id: 103016[/import]

@CSG-Dev

Yes, you said you named your images for example: myImage@2.png

When you specified in your config.lua it should look for images named: myImage@2x.png

your images should end with @2x.png, @4x.png etc

Also your code snippet was not correct, you need to use newImageRect as opposed to newImage for dynamic scaling.

For instance:

function scene:createScene( event )  
local screenGroup = self.view  
image = display.newImageRect( "2ndship.png", 320, 480)  
screenGroup:insert( image )  

The syntax and more information regarding newImageRect can be found here : http://developer.anscamobile.com/content/displaynewimagerect

Last point:

Image suffix definitions should only go in your config.lua file, remove them from your build.settings file. [import]uid: 84637 topic_id: 24131 reply_id: 103036[/import]

@jonathanbeebe All clear so far; all of my iPhone transition issues have disappeared. :slight_smile: [import]uid: 41884 topic_id: 24131 reply_id: 103067[/import]

unfortunately, my issue still exists!???

@Dany, any guessings for my transition issue?

Thanks!
Nick [import]uid: 77183 topic_id: 24131 reply_id: 103069[/import]

Danny, Thanksso much, I’ve done all you have asked.
I now see ± 1/4 of my image on the left of the landscape screen in the simulator and on the phone/ipads.
I’m trying to support the iPhone regular, the iPhone 4, the iPad 2 and the iPad3 at the highest quality possible. I have
image, image@2x, image@4x and image@6x. (I tried this with image, image2x and image4x as well)
The files are 480?×?320, 960?×?640, 1024x768 and 2048?×?1536

My scene files now use the syntax
image = display.newImageRect( “2ndship.png”, 320, 480)
screenGroup:insert( image )

My config.lun is
application = {
content = {
width = 320,
height = 480,
scale = “letterBox”,
fps = 30,

imageSuffix =
{
["@2x"] = 2, – for iphone 4
["@4x"] = 4, – for ipad 2
["@6x"] = 6, – for iPad 3
}

}
}
and I took the imageSuffix out of my build settings as requested.

Any further ideas? Many thanks.
[import]uid: 100134 topic_id: 24131 reply_id: 103187[/import]