New Corona Quick Start Guide

Corona users come in many types: some have been with us from the beginning, and have watched the product evolve; others have recently migrated from other platforms; and for some, Corona is their first programming environment.

By popular request from many new users, we have just posted an absolute beginner’s guide to Corona: the Corona Quick Start Guide.

This guide covers everything from installation, to writing your very first programs, to exploring the Corona Simulator itself, including how to test the same code for iPhone, iPad and Android.

We will continue to post tutorials and lessons for users of all levels, but if you’re new to Corona, give the Quick Start Guide a read and let us know what you think!

Bramsays:

I have a 10 scene, several hundred frame “application” that I made with flash, that I would like to make work on an ipad. So, I started learning objective C which I think, after being unable to get past the hello world first step, might take more than the rest of my life to learn.

Then I came across Corona Lua and was able to easily get through the three hello world’s and even change the background and change the button into two sounding piano keys. With the names of the keys instead of hello world. Wow, and then I wanted to add a new frame or scene and have been looking and googling for weeks for some hint on how to do it, with no luck. My trial will end in a week, after which I will purchase Corona if I have succeeded. My only experience with programming is Hypercard (which I was very good at) and Flash.

Can anyone tell me how to add a new page/frame/scene/whatever??? I think that should be really simple, but there must be some gap in my brain. It would be nice if things, such as the “new” Quick Start Guide were dated so one could tell if they’d all ready been there several times.

Great! Even I learned something from that, I haven’t started Corona yet or even looked at existing projects, so I was wondering what the basic workflow actually is. Now I know. I’m astonished that it’s a simple folder + lua files + resources. Smooth!

I hope you can also use subfolders to keep things a little bit more organized.

One way to deal with multiple screens or “scenes” is to break up your code into multiple files. Then use require("myFileX") to pull in methods and properties needed for that scene, where the file containing your methods and properties is named myFileX.lua. This is an object oriented approach. Each time you pull in a new class file, take what’s currently on the screen, save your states, and clear it out of memory with a cleanUp() function.

We have a tab bar example on our site that does this. There’s a function called loadScreen() in the main.lua file that handles the screen switching (be sure to take a look at the source by following the bitbucket.org link):

Justinsays:

Would you use the method that Gilbert has described if you would want to switch between (Visual Basic calls them “forms”) or would some other method be used? The reason I ask this is because I have a Start Menu, and the Start Menu’s Start Button would take you to the Level Select Screen. I figured the easiest way to do that would be have the coding in the button, in Main.lua (start screen) switch over to another file called levels.lua (if it has to be called another name then that’s fine.) the two different files in the build folder would be what visual basic calls “forms”

Moon Meekosays:

Hi Kage,
I’m also a zero experience MAC person. I’m busting my ballz off trying to learn lua and have found notepad ++ to be a pretty good text editor to use. I’m sure there are better ones out there that have functions such as auto complete but for now this is the one I’m using!

Thanks for that tip. ( notepad++) I will try that. Um, did u see in any blogs on tutorials for windows? Again, seems like they are all for Mac users. I want to get a mac but no funds yet, so I will just use what i got. I easily get lost in the loop, I was surprised I saw your reply and I didnt even remember how I got here nor remembered I posted something here, LOL!

thanks again for your help, I will try to get back here if I find it. LOL!