New to Corona and a Few Questions

Hello,
I have been checking out Corona and WOW it just looks great, a bit of a learning curve but nothing that can’t be learned. I came over and checked Corona out after a friend of mine told me about you guys. I have been using an engine named LiveCode which is like HyperCard only newer. It’s a great engine and they’re trying hard to make it better but it isn’t very powerful, it’s more for simple games and not physics, and it doesn’t have many new iOS features at all.
Now you know a little bit about me and next I’d like to tell you what my game is all about with out giving away to many secrets…
The gist of the game is there are apples on a tree and they fall down and you have to catch them. It has 25 levels, each with increasing difficulty, and you receive golden apples when you catch a certain amount of apples.

I have been looking around the resources and there has been a lot of helpful stuff but I have a few questions and if you can answer any of them it will be helpful.

  1. Is there a easy way to spawn a certain amount of apple objects on the screen so you don’t have to code each and every one?

  2. How do the timers work? I have a timer that runs for X amount of time and then a box different controls (like next level, menu and retry buttons). Maybe there is a better way to make this happen?

  3. How do different screens work? In my game I had a button that says “Start” and then it would take you to a selection of different levels to choose from and then to the level that you chose. What kind of code do I use to make a button show a different screen? I also might be looking at this in completely the wrong way…

  4. How do you save the user’s current progress? All I want is for the app to save how many Golden Apples they have. Is there a clear and concise way to do that.
    I hope that this post isn’t to much. It’s just that I want to get up to speed on how to make my game in Corona. I want to switch ASAP because I know that my app will run smoother and there will be more opportunity to expand the functionality of it with Corona.

Any answers are helpful.

Thanks,
Danny [import]uid: 59140 topic_id: 9929 reply_id: 309929[/import]

1. Is there a easy way to spawn a certain amount of apple objects on the screen so you don’t have to code each and every one?

Yes, you use “for…next” loop for that

2. How do the timers work? I have a timer that runs for X amount of time and then a box different controls (like next level, menu and retry buttons). Maybe there is a better way to make this happen?
This question is not clear

3. How do different screens work? In my game I had a button that says “Start” and then it would take you to a selection of different levels to choose from and then to the level that you chose. What kind of code do I use to make a button show a different screen? I also might be looking at this in completely the wrong way…
Look for Ricardo’s Director Class or Rakoonic’s Scenes Class for this

4. How do you save the user’s current progress? All I want is for the app to save how many Golden Apples they have. Is there a clear and concise way to do that.
You can save details in local file.
Drop by at IRC chat if you need some live help from people around here :slight_smile: [import]uid: 48521 topic_id: 9929 reply_id: 36206[/import]

welcome Dannylego… I’m sure you will have a lot of fun with corona.
I will try my best to answer your questions.

  1. You can use timer.performWithDelay to spawn objects

  2. I recommend you check out the beebe class library.
    This can be found under code Exchange.
    By timer, you mean a timer that counts up? If so, it should be very easy to implement.

  3. You can use Director Class to change from scene to scene.

  4. There should be a lot of information out there on how to save/load. You’ll have to search in the forum, but I recommend you check out Peach Pellen’s tutorials.
    http://techority.com/category/tutorials/
    O… under code Exchange, there should be lots of great demos for you to play around with. I think that will be the best place to start.

good luck and have fun. [import]uid: 12455 topic_id: 9929 reply_id: 36208[/import]

Welcome to Corona :smiley:

It seems you have received thoughtful and thorough answers - thanks teex84 for the recommendation :slight_smile:

I just wanted to add a direct link to my save/load tutorial as it saves some digging :wink:
http://techority.com/2011/04/02/how-to-save-and-load-data-in-your-app/

I hope we’ll be seeing more of you around!

Peach [import]uid: 52491 topic_id: 9929 reply_id: 36216[/import]

Thanks for the answers. I will definitely be making the switch to Corona after I submit my other app to the App Store. I will look into all the links and answers.
Peach, the tutorials look great I think that they will be incredibly helpful!
I’m greatful to see all this technical support. Between the Chat feature, forms, sample code I think it will be relatively easy to get used to LUA language.

I’ll be back soon,

Danny [import]uid: 59140 topic_id: 9929 reply_id: 36546[/import]

No worries Danny; I’m sure you’ll enjoy it here - Corona rocks and so does our community :smiley:

Consider liking Techority on Facebook - I’ve got a poll up now where people can request new tutorials, so if there’s something you’d be interested in you can easily add it there.

Peach :slight_smile: [import]uid: 52491 topic_id: 9929 reply_id: 36565[/import]