How do people learn corona so fast??

I’ve been using corona for almost an year now so I don’t think this is the right place for this. Anyways,

I (and the newspaper) discovered Corona a long time ago (because of bubble ball). Always had the wish of creating an app. I went to the anscamobile site and saw the words “Code Less. Play More.” on the homepage. I clicked on the “examples” page. What I saw amazed me. A line of code can display an image!

I immediately signed up for corona free trial. After that I looked online for some tutorials of corona. The first thing I found was a series of youtube videos made by cheetomoskeeto, and those are great! The Corona community forums are also a good place to kill time, also learned some stuff in there. But despite the good resources out there I still only know the basics of Corona. I found out that whenever I want to learn more, the new types of codes usually push me back.

Next, after 11 months of using corona, I finally published my first app! It’s in the showcase: http://developer.anscamobile.com/showcase/geomaze Like I said before the game wasn’t so good because whenever I want to expand it (for example, adding zooming and panning without showing the edges) I am restricted to the types of code I only know.

About 2 weeks later I found Jonathan and Biffy Beebe’s Tilt monster sample code in the long-lost Downloads folder on my dad’s mac. I opened the “maingame.lua” and I was even more shocked than what I saw in the Ansca home page. The code was more than 5000 lines long- with no bugs! I went through the code and mostly I don’t have an idea about what he is talking about. Except for the physics engine, Images, Audio, collision function, and Director Class.

The main thing is, most of the people on this page: http://www.anscamobile.com/corona/switch/
says that corona is quick and easy to learn. But I’ve been using it for a year now and I STILL had a hard time learning new stuff about corona. So is there a good way of learning corona?

Any help will be appreciated! [import]uid: 44110 topic_id: 23631 reply_id: 323631[/import]

I am not a professional programmer, however I did take as much programming in school as I could. If you learn the basic concepts of programming you will find other languages much easier to learn. I suspect many people have some programming background even if it was some classes in high school.

Anyways just keep at it. Every day you’re learning. Keep trying new things and getting more experience. [import]uid: 31262 topic_id: 23631 reply_id: 94840[/import]

Even though Corona/Lua is definitely a lot simpler than Objective-C, that doesn’t necessarily mean it’s easier. To make a decent game with Corona you’re still going to have to have a good sense for general logic and design.

I’d suggest looking for more general programming education resources. Introductions to variables, functions, control structure, data structures et c. You’ve probably learned a lot of this just from reading code and creating geomaze, so when you force yourself to start from the beginning things will ‘click’ better. The stronger foundation you have, the easier things like zooming and panning will be to understand.

Before you start programming a game, figure out exactly what it is you want to do. Create a flow chart of what has to happen in the game, then write a needs assessment to figure out what functions and features of Corona you will need to understand. Make sure you understand how to tackle each of those needs; if you don’t, create a small exercise that focuses only on that part of the code.

Write your own sample code that demonstrates all of the gestures and actions that you will need.

Try creating your own versions of games, starting simple and getting more complex: Tic-Tac-Toe, Simon Says, Memory Match, Pacman.

Try to tackle only one or two more programming challenges with each exercise/demo/game you make.

Don’t think of the code you know as a restriction, think of it as a constraint to your design. Constraints exist to boost creativity. [import]uid: 120 topic_id: 23631 reply_id: 94873[/import]

i would second aaron, i think background in other programming languages means a lot when switching to Lua which is much >>MUCH<< more forgiving then lower-level languages like C++.
more importantly, some good practices will be inherited from previous coding experience.

i am not sure how would I approach Lua if I had to start to learn it from scratch as a first time programming language. however, i might note that some of the Corona examples, like ghost and monsters or even tilt monsters source code are not the best learning material, particularly because some of the practices (like hard-coding levels in ghost/monsters or putting all code in one lua file in tilt monsters) may be misleading and lead to dead ends; and most programmers would agree it would be the best NOT to do it that way.

when learning Lua, i think there is a great advantage for people who at least vaguely understand concepts of Object Oriented Programming -OOP- ( such as Flash/Actionscript or C++ ) although Lua in itself is not an OOP type of language. the advantage I see in good practices of splitting the code into modules and pseudo-classes and working with smaller files where each .lua file is responsable for particular object in the game (ie. player object, enemies, or game logic), which keeps code easier to understand, maintain, update and debug.

having said all that, I again agree with aaron that all of us keep learning new stuff every day. although I never studied programming, I have been working with a wide range of programming languages from machine language for Z80 and 68000 in 80ies to various type of C all sorts of scripting languages.
however, i still learn things every day, and very often the hard way.

what always helps me is to start with a big sheet of paper, at least A3, or larger format, where I sketch by hand the “skeleton” of my application. I try to think in advance all the things I want to have in the game, what the elements of the game will be ( ie. scrolling background, player ship moving left-right, and various types of enemies). Then I try to sketch down all sort of interactions between the elements, and then dive into more detail and see how can I split all this functionality into separate modules/classes/lua files, and try even to write down public and private variables and functions.
i sketch a lot, literary connecting the dots on paper, trying to understand REALLY well in great detail what I try to accomplish.
only when I have things pretty clear would I start to code.

the above “paper” approach I regularly use when I have to sit down and start writing a “final” version of the game.
however, very often i will do very quick and dirty prototypes to make sure that the game will actually be fun. normally nothing of the prototype code will make it until the end of the project, and usually the final product will be result of a good analysis of all elements of the application on paper.

not sure if i helped, but this is what i found helpful for me.

[import]uid: 80100 topic_id: 23631 reply_id: 94874[/import]

I think it depends on your learning style as much as anything.

I was lucky and able to learn Corona and make my first game, which was fairly simple, in 3 weeks without any prior experience whatsoever. (I could use like bold html tags and that was it, haha.)

What helped me was dissecting sample code and implementing bits of it in my own project, I learned it that way and it just stuck.

If you are more visual then doing videos may help more.

One thing to remember is to always write out code, don’t copy and paste it even if it is perfect - this way you commit it to memory by repetition.

Peach :slight_smile: [import]uid: 52491 topic_id: 23631 reply_id: 95074[/import]

Peach is right. The main problem students or people trying to learn languages is exactly that… Dont copy paste the code just because its the same step, try writing it again and again, never use copy paste.

-Practice makes perfection- [import]uid: 123133 topic_id: 23631 reply_id: 95137[/import]

I agree that making a few simple things like pacman, a calculator etc really helps you grasp some stuff [import]uid: 84637 topic_id: 23631 reply_id: 95264[/import]

Break down each part of your game into smaller chunks and concentrate on getting each bit working at a time.
Don’t look at the whole thing and think “OMG! This is impossible!!!”.
Practice doing smaller things like a simple game. Get objects moving around based on whichever controls you like. Add sounds. Add collisions. Add music. Add scores.
Don’t approach it as one big project, but lots of smaller ones you bolt together. [import]uid: 10389 topic_id: 23631 reply_id: 95311[/import]

Thanks for all the replies! Now I am forcing myself to rewrite the code of my game; that really works if I want to know how the codes work, but not how the codes seem to work!

For the paper-planning and the flow chart, I am still working on it.

Also I watched the videos on YouTube again.

I never knew how live the forum is! Thanks again! [import]uid: 44110 topic_id: 23631 reply_id: 95354[/import]

I’m not a programmer either. I stumbled onto your post; because, after a year, I’m _still_ trying to find a better way to ignore touch on transparent areas of objects that very tightly overlap. I have apps in the store; I’m just still trying to tweak code. It’s a process :slight_smile:

brian.vaccaro’s comment re: more formal understanding made me think of an iTunes University course that was extremely helpful for me:

From Stanford University’s School of Engineering, it’s Mehran Sahami’s Introduction to Computer Science - Programming Methodology. The course is free. Lecture video is on iTunes U (and other places). All course materials are available on the course website. You can find a pdf of the text on line, but I’d buy that if you can.

He uses Java; but, as people have said here, once you have the basics, it’s relatively easy to move to Lua. I was already familiar with some of the content, but having a more well-rounded understanding of methodology was extremely helpful. If you’re interested in checking it out, here’s the course link:

http://see.stanford.edu/see/courseinfo.aspx?coll=824a47e1-135f-4508-a5aa-866adcae1111

There are other versions/instructors, but this guy works _really_ hard to entertain the class … (he could be played by a young Eugene Levy in the movie :slight_smile: Of course, this is just one example, but it may spark an idea about what would be best for you.

Good luck! [import]uid: 11631 topic_id: 23631 reply_id: 101982[/import]

This is great stuff. I am just starting out and find everything a bit overwhelming, especially since I don’t know other languages like most others seem to. Some guidelines on how to progress seem like they will help a ton. [import]uid: 139423 topic_id: 23631 reply_id: 102500[/import]

@Cdk10 - Honestly my best advice would be for you start out your Corona`s Journey following the amazing newbies tutorials made by Peach Pellen on her blog at: http://www.techority.com

PS: Sure all stuff about Corona out there (web) are nice but Mrs. Peach is special on caring about the Corona newbies IMHO. :slight_smile:
Just my thoughts.

Cheers,
Rodrigo. [import]uid: 89165 topic_id: 23631 reply_id: 102501[/import]

Thanks Rodrigo, lovely words :slight_smile:

@cdk10 - Corona For Newbies Part 1 - Part 4 are on Techority (linked to by Rodrigo). I wrote those and tried to aim them at people who had NEVER coded before.

When I started out I knew no other languages, none at all - trust me, it can be done :slight_smile: [import]uid: 52491 topic_id: 23631 reply_id: 102507[/import]

Lua actually seems easier then Java if you ask me. I love C++ personally. Whenever I built programs I would use seperate files for functions I would use alot such as dice rolling just so I could use em in seperate programs. OOP!!! Yay. You can do that with Lua too… hmz. Still learning it but seems pretty simple. Once you grasp one langauge you can usually pick up more. I wonder if there a visual style programming language for Android yet. For you guys who know VB it would be pretty slick for app creation.

Oh the main reason I wanted to post was to ask if Emerson was still around? And since his app has 13 Canadian cities before US cities, I am wondering if he is a Canadian? I am! I am from northern Ontario.

Ty

Ps. Peach. do you eat veggiemite? Did I spell it right? [import]uid: 143556 topic_id: 23631 reply_id: 102520[/import]

Lua is beautiful and very easy to pickup compared to other languages from what I know. I’ve looked at C++ a little and hope to learn more in the future, it actually seems easier after learning Lua :slight_smile:

As to Vegemite, I eat it on occasion. A lot of people think it’s disgusting but that is normally the result of using WAY too much. A small amount with margarine is actually very pleasant, (it also goes well with cheese,) plus it’s very healthy.

Just so you don’t start stereotyping me I’m not actually a typical Australian, I’m half English, I don’t have a pet kangaroo and my “accent” is often commented on by other Australians.

… Oh, and I have never (and will never) drink Fosters. [import]uid: 52491 topic_id: 23631 reply_id: 102545[/import]

@Rodrigo and Pellen, yeah I came across those at one point but didn’t think I could access them without tweeting for them or however you do it :confused: [import]uid: 139423 topic_id: 23631 reply_id: 102551[/import]

This is a really good thread.

Historically speaking you either “get” programming or you don’t. There isn’t much in between. You’re brain has to be able to wrap around weird synatx. You have to think abstractly. Much like an artist starts with a blank canvas, they imagine what the the final product will be. Many people can’t do this. Then with programming, not only do you have to think like an artist, but it’s doubly abstracted in that you have to imagine code to imagine your result. This reduces the pool of people who can do this even further.

Some things are programmer-like, such as building web pages using HTML and CSS which can help ones mind wrap around this double abstracted.

Corona uses Lua, which is one of the simpler languages to learn because it doesn’t beat you over the head with syntax like C based languages do. This make the barrier to entry for Lua easier and reduces the “having to wrap your brain around syntax” barrier to entry.

Relative to Objective C, Lua is a piece of cake for various reasons mentioned above.

I’ve been working with Corona for over a year, and while I can crank out apps pretty quickly now, there is still a lot about the language I don’t know and places where I program myself into a box. Before C I learned new languages in days. My brain is wired for programming. C, because its so complex took me well over a year for me to think in “C”. Afterwords I found learning other languages hard.

Different people learn differently. Different people can pick it up faster than others. So don’t measure yourself with others.

Now as far as Lua being easier to learn because it’s not as tightly typed as C, C++ or Objective C. For beginners, by not using a strictly typed, you can create hard to find and diagnose bugs. Its easy to have a mispelled variable (even for an experienced programmer). Consider this code:

local missles = 10  
  
function fireMissile()  
 missiles = missiles - 1   
end  
  

or

  
local missiles = 10  
...  
missiles = display.newText("Missiles", 0, 0, "Helvetica", 20)  
...  
missiles = missiles - 1  

Lua will be very happy to execute this code and run without any indication there is a problem. (actually that will error since missiles is nil, but if properly spelled missiles gets initialized somewhere…) In C or other typed languages it would error at compile time and these mistakes can be avoided.

The second example would also get caught by a compiler too. Not only will this not give you any errors, it will also leak memory. And in a long program, this type of mistake is very possible.

So while typed languages are more coding, they do reduce errors, which can benefit a new programmer.

But back to Objective C… Not only do you have to learn a syntax hungry language like C you have to learn a 2nd language, SmallTalk on top of the matter with a completely Anti-C syntax. Add to that Apple’s insanely large and complex SDK on top of it, Objective C is a miserable experience for everyone! [import]uid: 19626 topic_id: 23631 reply_id: 102556[/import]

Thanks for everyone who replied!

Well, I actually tried Objective-C and Java while I was choosing the best mobile programming SDK(iOS and Android SDK). Since I first tried Corona last year Lua became my favorite language !
(Yes, learning Obj-C really is a miserable experience to me.)

And Techority helped me a lot when I saw it last month. Thanks Peach!

PS I am a Canadian Immigrant! [import]uid: 44110 topic_id: 23631 reply_id: 102562[/import]

Hey there,

I’ve had corona (still on trial) for about 115 days now and i didn’t even look at it for the first 30 days. I quickly fell in love with the programming and lua language and am about to release my first 2 apps after i get a mac to build and test the apps. I’ve always loved animation/programming and have been wanting to make an app. After spending months finding programs searching for a drag-and-drop app making program and tried my very best to ignore the app making programs that included programming. Pretty soon after trying some programs i found corona and decided it was time to learn a computer language. I fell in love with corona and the ease it was in making apps. I guess it was just my personality and thinking process that made it so easy to learn the language. I started with something really simple and planned out the entire app making sure i knew what it would take and what everything looked like. I slowly made a menu screen and found director to help with the changing scenes. Pretty soon i made a couple levels and wanted to learn how to save a score. Ice was my solution. After a couple weeks i had 100 levels to my game, an unlocking sequence to the levels and i accumulated over 100 thousand lines of code :slight_smile: I still look back at how funny it was how much i hated programming before corona and the change in heart after corona.
My advice:
make sure you know what you want to accomplish, what it will take and learn one thing at a time. Also, the forums will help a bunch and the niceness and speed in which people reply is stunning!
Keep programming,
Boxie [import]uid: 113909 topic_id: 23631 reply_id: 102570[/import]

Almost 2 years into Corona, I have to agree with several points made in this thread (and add a few of my own points).

  1. While Lua is “easier” in some ways compared to Obj.C or C++, it’s not necessarily simple to learn. For me, Lua/Corona somehow just clicked, and after a few initial hurdles I was able to understand it much better than previous languages I’ve attempted.

  2. If you have always struggled with programming in general, you’ll probably struggle with Lua/Corona too. It’s a hard pill to swallow for those who want to produce games/apps and imagined Corona to be an easy, pain-free path to do so. Corona makes alot of things much easier, but app development is never simple, and making your dream game requires alot of work, patience, persistence, and practice. As trite of a statement as that might be, it’s true and I think all of the seasoned developers here would agree.

  3. Feel free to COPY code from the CodeShare or the forums, but then try to understand WHY it’s coded that way. I think this is the biggest stumbling block that new Corona developers face: they copy 10 functions or huge chunks of code from the Corona-provided examples or elsewhere, then paste them into their own app and imagine that it’ll just work. At that point, they have 500 lines of code with numerous errors, and debugging becomes 10x more difficult. Debugging can be a nightmare even for veteran programmers… it can be insurmountable to newbies. :slight_smile:

  4. Take a “crash course” on Lua! Start with the tired but classic “Hello World!” example. Try some if-then logic. Write some basic functions. Print everything to your console so you can see what’s going on, and when. If you don’t understand the most basic elements of Lua, it will be a towering hill to climb if you copy/paste functions from existing examples and try to debug them.

Brent Sorrentino
Ignis Design
[import]uid: 9747 topic_id: 23631 reply_id: 102573[/import]