Everybody has to start somewhere and if you had to write code that was perfect none of us would be developing mobile games. Or any other kind of software, for that matter. 🙂
Fortunately, the most important thing is to WRITE SOME CODE and worry about making it perfect later. And while I won’t claim the code in this Corona SDK tutorial is perfect, it is a better way to handle displaying multiple objects (of the same type) on the screen at once.
What do I mean? Here’s an example of displaying 4 stars on the screen (not real code, of course):
Create and Display First Star
Create and Display Second Star
Create and Display Third Star
Create and Display Fourth Star
While that may get the job done, it’s a very inefficient way to handle things. And, if you want 10 stars, or 50 stars, your code is going to get very long (and you’ll be bored to death writing it).
This video tutorial will show you a great way to handle this task. And as a bonus, members of GDN will be able to see a follow-up video that takes the tutorial code to the next level. (If you’re not a GDN member, it’s free to join.)
Part 1 of 2
Part 2 of 2 (Members Only)
In this part I add to the code so it’s more useful. You can also download the project files if you like so you can try it on your own computer.
Click here to join (free!) to see the bonus video (or log in if you’re already a member). After logging in you will see the video below.
Click here to join (free!) and download the project files (or log in if you’re already a member). After logging in you will see the link below,