i need help !

Keep in mind that ‘storyboard’ is the older version of Composer.  Use composer, not storyboard.  They are very similar, but composer is newer version.  Most of the tutorials you may find out on youtube or internet, will probably be storyboard.  It is okay to learn from those tutorials with storyboard (the principals are the same, just some of the code is different).  Just use composer when you code.

Search the Corona Forum Blog, (I think) there was an article a year ago or so, on how to port over storyboard code to composer code.

Check out these links :

http://docs.coronalabs.com/api/library/composer/index.html

http://docs.coronalabs.com/api/library/composer/migration.html

https://coronalabs.com/blog/2014/01/21/introducing-the-composer-api-plus-tutorial/ 

… (and above all - DON’T GIVE UP!

Hi.  We did a whole series on the composer scene manager on the ‘Corona Geek’ Show, including downloadable examples:

https://coronalabs.com/blog/coronageek/composer-library-series-hangout-highlights/

Hopefully that helps.

There is a ton of information here:     https://coronalabs.com/resources/tutorials/user-interface-scenes-and-widgets/

Rob

We just posted a tutorial with a sample complete game template.   It’s got a full composer based set of Lua files you can use to start building your game:

https://coronalabs.com/blog/2015/04/14/tutorial-the-basic-game-template/

Rob

THANK YOU VERY MUCH for your support guys :) 

so far this is what I have. 

and from that I don’t know where to go or what to put. 

should just declare (goto.scene()) or what ? 

For each .lua file it needs to be named just .lua and not .lua.txt like you have in one of the two files.

As a gentle suggestion you may be better off learning to program a small game in just the main.lua file to begin with.

All that means is that you won’t have a menu system to begin with. Corona makes creating a menu system far easier compared to other SDKs, any coding project has a steep learning curve though. Leaving out Composer for now may help leave out a layer of complexity while you learn.

Really hope that helps,

Mark

If you read the tutorial above and downloaded the sample project, you would be able to look at exactly what all is required to have a scene file.   Your example above has two lines out of about 20 or so that’s required.   If you look at the composer docs, there is a link to a “Composer Template”.  You can use that code in its entirety to build your scene files.  In either way you have to follow the composer protocol if you want to.

Also, for future reference you should learn how to copy and paste code instead of giving screenshots of code. 

Rob

ok thanks iam  kind a figuring out whats going on now. and  i need to work on how to group them but anyways is there any software that i can run on google Chromebook that i can write code with Lua ? 

While you might find a lua editor for a ChromeBook, I don’t think Corona SDK is going to run on it.

Rob

Hi all, like the op of this topic, i am looking forward to learn the composer. But i am very very confused in so many things, i hope you guys can help me. 

  1. first of all, “composer is only avaiable for mac os x” And that’s ok, i provided buying one. But now, composer is a software that allows me to create a new “composer file” for a new project. I thought it was more like an editor that spawned code. Can you tell me if composer is a library that i have to use to code, or if it’s a software that helps me in developing? 
  2. I wrote the code without scene changing. I mean i have the whole game without menu and other scenes running. So as i start the simulator i have 1 shot to play 1 time. So i should now add my restart and main menu. Reading tutorial on internet didn’t help me much, and i thought composer could accept the code i have written so far, and allow me to add the scenes. 

I know it’s a lot of stuff, but i am a newbie and i can’t figure out how to keep on developing my app.
I hope you can help me. Thank you

fry.192,

Composer is both a Visual Editor(tool-software) that helps you ‘lay-out’ a scene, and it is also a library (api) of functions that you can use when you code your app.  I have never used the ‘visual editor’ composer, so I cannot speak to that.  

Basically, the composer library, is mostly a group of functions that help you layout your game/app into scenes (screens), and it has functions that help you transition between the scenes.  The composer library, once you get a feel for it, handles a lot of the memory management and clean up for you when transitioning between scenes.    

Check out this link Rob Miracle posted above first.  Really get a good understanding of that and then check out some of the other links mentioned above and you should be able to find a good example of composer(library api)  in actual use.  

https://coronalabs.com/blog/2015/04/14/tutorial-the-basic-game-template/

good luck!

Thanks i will read it again. I found some things i didnt understand, such as some functions in the main file. By the way, my game is an endless runner that works with an infinite loop of a couple of function, do you know where do i have to put that function in the template you linked me?

Thank you very much

Very generally speaking, as your question is very general…  and the correct answer really depends on exactly what your app does, and so forth;  but, in general (for a simple app), I normally have in my ‘gameScene’, which is the scene where most all of the game play occurs, a gameLoop function. But, you can put it in any scene and name your scene anything you want.  I put it in the  ‘scene:show( event )’  function.

function scene:show( e ) if ( e.phase == "will" ) then elseif ( e.phase == "did" ) then local function gameLoop(e) -- do most of your endless runner code here, each frame end Runtime:addEventListener("enterFrame", gameLoop) end end  

That is for a simple quick way of doing it.  Often, the actual gameLoop function I will place outside of the composer functions, up near the top of my code.(it just seems cleaner to me)… but it will work either way.  Remember to remove the ‘enterFrame’ event listener when leaving the scene.

You will need to spend a fair amount of time going over some of the example composer apps that some of the other developers have on the forum… and then play around with them by changing things(experimenting) … that is the only way to really learn it and get a feel for it all. It is time consuming and takes some effort.

Again, this is very general.  Normally, I setup must the variables and such in the scene:create, and handle most of the movement, loops, flag checking, and action in the scene:show

Good luck.

If you’re going to be using the composer scene manager, think of main.lua as an initialization point.  There are things you only initialize once, like In-App Purchases, Ads, GameCenter/Google Play Game Services, system handlers, the accelerometer, the keyboard handler, etc.  These are best done in main.lua before you call composer.gotoScene() and start Composer managing things. 

Rob