Game project template

It would be nice if somebody share with this community a simple but working game project template with:

Splash
Main-menu scene -> Options, Tutorial/Help, Credit, Play --> go to level select
Level Select scene
In game scene -> In game menu

And between each scene should have a cool loading screen with a image background and a blinked “LOADING…” text [import]uid: 9190 topic_id: 2097 reply_id: 302097[/import]

That’s a good idea! [import]uid: 3007 topic_id: 2097 reply_id: 6402[/import]

I second that! I am understanding all the concepts I need to build a great game, but I can’t wrap my head around building different “screens” like this. I love Ansca’s Example projects, but none of them include something like this. With all due respect, I’m not talking bad about Ansca, it’s simply my brain and abilities to learn. Would love to see a project flow like this! Thanks! [import]uid: 8621 topic_id: 2097 reply_id: 6479[/import]

+1
Scene management is also where I am stuck. A template / tutorial with a scenes loading + unloading mechanism would be of great help! [import]uid: 7356 topic_id: 2097 reply_id: 6481[/import]

Checking out Gilbert’s Tab Bar example might be a good starting point. The concept is similar. [import]uid: 3953 topic_id: 2097 reply_id: 6498[/import]

Hi there,
Thank you, Mark. [import]uid: 9190 topic_id: 2097 reply_id: 6505[/import]

Your right @MarkHenryC, that is a good starting point… I still really hope someone puts out a more graphical game like flow to really grasp it.
I hope you don’t think it’s strictly out of laziness.

Appears to be something important with using :

module(..., package.seeall)  

Hopefully this post will help people like me too:
http://developer.anscamobile.com/forum/2010/08/09/code-flow-multiple-stages

Derek [import]uid: 8621 topic_id: 2097 reply_id: 6508[/import]

Nothing wrong with laziness. It can lead to great innovations :wink:

But I agree that scenes are not such an obvious thing as they are with Cocos2D or Unity. But I think the amazing flexibility of Lua, which I’m still learning, should make this easy to implement.

It’s worth remembering that when you require a module, if all the functionality is within a create() function, nothing gets run until you explicitly call it. So you can require whatever you like but stuff won’t be created until you make the call.

Maybe I’ll try do a simple demo. Could learn something myself. [import]uid: 3953 topic_id: 2097 reply_id: 6510[/import]

@MarkHenryC … Thanks for the advice on the “call” … makes sense as I try to piece module flow together!
Also, If you ever have the time, I would love to see you produce something! wow, thanks!
Derek [import]uid: 8621 topic_id: 2097 reply_id: 6541[/import]

Okay Everyone. regarding a Corona Game Templete, I believe I have found one.
CAN YOU PROS TAKE A LOOK AT IT AND SEE IF IT’S CONSTRUCTED PROPERLY?

http://www.mikeziray.com/2010/06/27/corona-game-template-in-lua/

It’s from June of this year, so I’m worried some parts may not be right anymore… ?

Thanks
Hope this helps people!

Derek [import]uid: 8621 topic_id: 2097 reply_id: 6543[/import]

A good template would save some work. I have had to create something but it’s not generic and frankly I am still quite perplexed about some of it. [import]uid: 8192 topic_id: 2097 reply_id: 6633[/import]

Thanks Derek,

Glad you were able to find the template. It hasn’t been updated in a few months, but it’s the basis of the game I’ve been working on since then and it’s been fine throughout the betas. What prompted me to release this code was this post on the forums:

http://developer.anscamobile.com/forum/2010/06/21/example-code-stages

I was trying to explain how to use display groups to turn screens off and on, but that’s nearly impossible without showing code, so I ripped out the custom code for the game and just gave you all the shell. Since then, I’ve refactored some of the code, so I’ll release a new version as soon as I get a chance to illustrate some of the additional things I’ve learned since.

This will be our first Corona game (and definitely not our last since we’ve had a great time with this one), but you can check out our other stuff at http://www.ltzllc.com/products/ Hopefully we’ll be looking for some freelance Corona devs soon!
-Mike Ziray
[import]uid: 7144 topic_id: 2097 reply_id: 6645[/import]

Very nice apps MK [import]uid: 8192 topic_id: 2097 reply_id: 6646[/import]

@MK,

Mike, Thanks so much for sharing your template with us!
I hope the next version of it gets included in the Ansca Project Samples!!!

So excited to see your game come out, and again thank you.

Derek [import]uid: 8621 topic_id: 2097 reply_id: 6647[/import]

@Mike, thanks for sharing your framework - it’s really helped me to understand how to pull all of this stuff together into a “real” project. I like the way you’ve encapsulated the key areas of responsibility - nice work!

For other people interested in applying some OO design principles, I found this helpful:

http://www.erix.it/progutil/gpeddler2/help/oo.html
[import]uid: 8353 topic_id: 2097 reply_id: 6657[/import]

This is what I use in all of our games, hope it helps some people! (includes .lua templates)

–> http://ideveloper.kodingen.com/2010/easy-screen-management-in-corona/ [import]uid: 7849 topic_id: 2097 reply_id: 7241[/import]

@jonbeebe

Wow… Again, thanks for everything you do for the Corona user base!!!
Scene Management is definitely something everyone is having a hard time mastering just right. Thank you!

Derek [import]uid: 8621 topic_id: 2097 reply_id: 7249[/import]

@jonbeebe
Nice template, thanks for sharing!
Here is some feedback:

I would consider removing the (gameListener) enterframe handler you use. It consumes unneeded cpu cycles that can be saved with calling a similar function on demand from inside the modules, with two arguments for the name of the current and the next screen (so, you also eliminate the need for extending the listener for new screens).

Imagine your fourth game with Corona having 100 levels. A Corona made Angry Birds :slight_smile:
It would not be feasible to ask their 100*2 global vars 60 times per second whether they have been changed or not.
Regards [import]uid: 7356 topic_id: 2097 reply_id: 7250[/import]

@jonbeebe Thanks so much. Very useful as usual. [import]uid: 8192 topic_id: 2097 reply_id: 7251[/import]

No problem! I’m glad I could be of help.

@Magenda: great feedback, I’d be very interested in seeing your “mod” applied to the template, you make some very good points. [import]uid: 7849 topic_id: 2097 reply_id: 7262[/import]