Game structure question

Hi folks,

I just purchased my Coron subscription and I was wondering if I plan to build a physics game similar to Angry Birds, it will have 20+ levels, which is the best way to structure the game?

I mean I have the main.lua file where I will build the game, should I create for each level a lua file like leve01.lua, level02.lua?

Also how is Corona working, how is it loading all the lua files? If I have 20 lua files for the levels, is Corona loading every file when the app is launching?

Is there an option to chose when and which lua file durring the game?

Sorry for the noob questions :slight_smile:

Thank you! [import]uid: 89239 topic_id: 16218 reply_id: 316218[/import]

I think you need to get premium account and then you can test you game live.
I think its kind of a Mobile Application Development, With the access of premium account you can test all you file live and see the results
[import]uid: 96899 topic_id: 16218 reply_id: 60380[/import]

??? @vincentr607 ??

@office83,
Have a look at Ghosts vs Zombies sample which is closest to Angry Birds in play and you can see how Jon has separated the levels.

Lua does not load all the files, it loads the files that you ask it to load. Which can be all the files, but not automatically.

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 16218 reply_id: 60389[/import]

Don’t mind vincentr607, he is spamming the forum :slight_smile:

@JayantV I was asking this because I have alot of obejct in every level that it will use physics. I plan to use Physicseditor.de in order to convert the shapes. but I was affraid that this will add too many lines to the code and it will slow down the game if Corona is loading all the lua files when the app is launched.

Thank you for your answer! [import]uid: 89239 topic_id: 16218 reply_id: 60397[/import]

I feel compelled to mention that more code doesn’t necessarily mean slower performance. [import]uid: 49447 topic_id: 16218 reply_id: 60410[/import]

@Vincentr607,
WHAT???

@office83,

You could also look at level helper as well. It will make laying out your levels so much easier.

Willy J.
[import]uid: 66859 topic_id: 16218 reply_id: 60424[/import]

@ MeApps Level Helper? Can you post a link please? [import]uid: 89239 topic_id: 16218 reply_id: 60427[/import]

Sure here you go:

www.levelhelper.org

You can also used sprite helper (www.spritehelper.org) for your tracing your physics shapes.

BTW:
Both of these tools are recommended tools on the Corona site of third party tools.

Also, here is our latest game that used level helper. There is a lite version.
http://www.levelhelper.org/?portfolio=nestme

[import]uid: 66859 topic_id: 16218 reply_id: 60431[/import]

@.Vincentr607 - what you just said makes NO sense at all. Are you from outerspace? :slight_smile:
@office83 Welcome!

I too have these questions, I started back in June 2011 (never coded before of any kind) so what you are asking is new to me as well.

However, I can share my observations.

It would seem that people (a lot of them) are using Director 1.4 by Ricardo Rauber (I think that’s how you spell it, sorry if it isnt :slight_smile: ) I started using director, and well I’m having issues so I ditched it.

A list of tools I am using (btw, are you on a MAC or PC?)
Corona SDK tools:

CPM (corona Project manager $75, I think 20% sale going on though) - this thing ROCKS MY FACE. Keeps sanity, it’s awesome!

PhysicsEd (free up to 10 objects, or go pro) automagically traces physics objects and spits out lua code for you…yea EPIC.

LIME (about 25 bucks I think?)

SVG Level builder ($50)

**sprite tools** (There are many, I am not using them yet, but things like spriteloq, spritehelper (I think thats what its called) etc etc are useful for saving time.

Level helper (MAC only, was pretty cheap, I think 20 bucks)
I will mention level helper does something PRETTY DAMN COOL. YOu can set up pre set paths for monsters and things like that without coding much at all! I like this feature, I think it’s pretty neato.
Free imaging tools:

GIMP
SVG Inkscape (I use this with SVG Level builder)
----=====

People talk about “modular” coding vs “oop” (object oriented programming) etc. I don’t know what to make of it all, you know because I am new and all. I seem to think “modular” seems easier to understand while “oop” seems to be a crazy moshpit of complexity (even though it’s supposed to make things easier).
Ok - so what I did and I don’t say you do it or not is I got everything worked out on the whiteboard, and started coding everything I ever wanted into a “master level” and once I get that (still working on a couple of small issues) I will “modularize it” so that ALL the game “logic” will be in a logic.lua file and everything else will “call” it. I want to keep everything central so all I have to deal with is level design and as you say “level01.lua”, “level02.lua” etc - which all these will “talk” to the logic.lua and all these things will be declared in the main.lua…or something :slight_smile:

  • Ok that’s my spill on it. Fire away!

ng
PS

@ MeApps Cool game “Nest Me” the line code you are using is cool, I like the logic. :slight_smile: [import]uid: 61600 topic_id: 16218 reply_id: 60483[/import]

Ok. As you sort out all your small issues and the application runs perfectly fine. Will check out. [import]uid: 96899 topic_id: 16218 reply_id: 60552[/import]

@Vincentr607

I think you are on a different planet discussing alien speak. Probably a spam bot or something.

Edit** He’s making random posts about nothing, then linking to his site for app building.

Twitter handle is this:
@PLAVEB

FAIL. [import]uid: 61600 topic_id: 16218 reply_id: 60846[/import]

@ nicholasclayg thank you very much for your reply. I’m on a Mac and I will take a look at all the software you posted above, especially the SVG Level builder which seems amazing :slight_smile:
[import]uid: 89239 topic_id: 16218 reply_id: 60911[/import]

SVG level builder is really cool. It’s a work in progress, but you can do crazy things like complex bezier curves, and even free hand line drawing.

The documentation is OK, it’s a bit confusing but once you go through the walkthrough documentation (less than 20 pages, I think it’s closer to 15) it’s not too hard. You have to pay CLOSE attention when you are in svg inkscape (which is free) to ensure you have things checked off, and all of that stuff.

I think it took me about 30 minutes to get the hang of it, and I can see the potential of it. It’s different. Don’t forget about LIME, it’s also a really good tool.
PhysicsED is a freaking gift from the tech gods, that tool alone saves me HOURS of trying to map out bit masks and physics bodies and does it in seconds! This tool, above all others is really saving me time. The best part is you can play with it for free, but if you want to sell a game using it then you need to buy it, it’s pretty cheap ( I think 25$ ish or so). I’m going to purchase is pretty soon, as the free version only allows 10 shapes, which is plenty for now but I’m already zooming past that.

Let me know if you want to know more, I’m pretty handy with SVG level editor and physics editor, and lime…and well most of the tools I mentioned as are others.
ng [import]uid: 61600 topic_id: 16218 reply_id: 61031[/import]