Which is easier to work with,directer class, or storyboard? With like using buttons to go to a new screen cause i cant seem to figure either out except for the director. [import]uid: 69054 topic_id: 18850 reply_id: 318850[/import]
For me Director is easier – simply because that’s what I’ve been using for a year. But with my next project I’m switching to Storyboard for the simple fact that it’s the “official” scene manager and will be around and updated as long as Corona SDK is around (probably).
Nothing against Director at *all* but if you’re just starting from scratch I’d say go with Storyboard. At some point in your “game dev career” you might have need for Director and you can jump on it then, but in general, using the official solution is often the best way to go.
Jay [import]uid: 9440 topic_id: 18850 reply_id: 72575[/import]
Oh, as far as which is easier (since that was the question), I think that’s Director. But the extra bit you need to know for Storyboard isn’t that bad and you only have to learn it once. 
Jay [import]uid: 9440 topic_id: 18850 reply_id: 72576[/import]
OK thank you but for the project im working on now, im using director and i cant seem to make a button thats an image, upon tapped switches to the next scene. The scene you will see below is scene1 and when i try to make it go to scene2 it says:"Director Error: Failed to execute new ( PARAMS ) function on scene1. Im also kind of new. Here is the code i have right now
module(..., package.seeall)
function new()
local localGroup = display.newGroup();
----images/text
local bg = display.newImage("background2.png", 0, 0);
local title = display.newText("Funny Jokes", 100, 50, "Times New Roman",40);
local btn1 = display.newImage("funny.jpg", 100, 200)
local btn1 = function ( event )
if event.phase == "release" then
director:changeScene( "screen2", "moveFromLeft" )
end
end
localGroup:insert(bg);
localGroup:insert(title);
localGroup:insert(btn1);
return localGroup
end
It is very small i know, but i plan on adding more once i learn how to make the button switch to another scene.
Thanks
[import]uid: 69054 topic_id: 18850 reply_id: 72585[/import]
Director does a lot for you to make things easy. They give you a good core template to work from. Just make sure it returns a display group and you done. Calling the different scenes is like one line of code inside your event handler for your button.
Storyboard uses many of the same principles. There is pretty much one line to load a scene and you get a nice template.
Where Storyboard becomes different is that its event driven. There are four event phases you have available to you: Create, Enter, Exit and Destroy.
Its really not that different. With Director, you provide a new() function that handles the creation of the scene and the entering of the scene. Then you provide a CleanUp function for when you leave and exit the scene.
Storyboard caches your scenes so you can go back to them where you left them. Say you want a “Help” button, you can with Storyboard, exit the scene, show your help page and return back to the previous scene right where you left it.
Right now I’m struggling a bit with Storyboard on the app I’m currently working on. Its a seasonal game and I’m worried I won’t be able to ship it in time. I’m having problems I guess getting the right things in create and the right things in the enter event handler because I can’t seem to reload the scene, and I’m even making sure to destroy it so that it creates it a-new.
The weird thing is that if the player dies on the level, it restarts the level correctly after going to an interstitial “You failed” screen. But when the player completes the level and it goes to the “Level Complete, now load the next level” it does all kinds of crazy stuff.
I would say because of my current experience, Director is easier because I know it already and there are things I have to learn about Storyboard [import]uid: 19626 topic_id: 18850 reply_id: 72587[/import]
OK thank you. But does anyone know what to do in my current situation above?
[import]uid: 69054 topic_id: 18850 reply_id: 72590[/import]
Should be something like this
[lua]module(…, package.seeall)
function new()
local localGroup = display.newGroup();
----images/text
local bg = display.newImage(“background2.png”, 0, 0);
local title = display.newText(“Funny Jokes”, 100, 50, “Times New Roman”,40);
local btn1 = display.newImage(“funny.jpg”, 100, 200)
local nextScene = function ( event )
if event.phase == “ended” then
director:changeScene( “screen2”, “moveFromLeft” )
end
end
btn1:addEventListener( “touch”, nextScene )
localGroup:insert(bg);
localGroup:insert(title);
localGroup:insert(btn1);
return localGroup
end[/lua]
I changed the event phase to “ended” and put in a line to assign the listener to btn1. Also changed the name of the function since it was the same as the button. Not sure if you can do that. Untested code, see if that works. [import]uid: 31262 topic_id: 18850 reply_id: 72594[/import]
Thank you so much aaaron! It worked and i am now on my way, thanks. [import]uid: 69054 topic_id: 18850 reply_id: 72596[/import]
I started learning director about 3 or 4 weeks ago. I then started with Storyboard and I just didn’t catch on as quick as I did with director. Also, there are SO MANY people who use director, that you can find answers quickly to anything you want to know. I’m sure in time Storyboard will be the same, but I really enjoy all the fancy stuff you can do in director.
Everything I need to do I can do in director, and I’ve written my template so it’s heavily commented so I can just pop things in and prototype FAST a game idea.
It’s all preference I guess 
ng [import]uid: 61600 topic_id: 18850 reply_id: 72634[/import]
I’m also a big fan of Director, and don’t plan to change.
Director is on version 1.4 with plans already for 1.5. Storyboard is new, so I don’t have any reason to assume it will be more stable than Director.
Director is open source. Many eyes have looked at the code and provided input which the creator incorporated. Storyboard is closed source, so if there is a problem, only Ansca staff can look at it and provide a fix.
[import]uid: 67839 topic_id: 18850 reply_id: 72648[/import]
Yep I’m sticking with Director too. I know it well and Ricardo is such a helpful guy. If you need help with it there is a sub forum for director. I took a quick look at storyboard and it seems more complicated.
Also if you guys want a 3rd option there is also “scene manager” which one of the mods here Danny created.
http://developer.anscamobile.com/forum/2011/11/09/scene-manager-v13-now-handles-all-timers-and-transitions [import]uid: 31262 topic_id: 18850 reply_id: 72708[/import]