Tables rock and so do external modules

Hi this is a pointless post other than the fact. That I am loving and understanding tables and modules alot more. Originally My code for each level was about 4500 lines long. After learning tables and making my own modules im down to 3000 and not done yet. I hope to get each level down to about 1000 lines or less. Just from the 4500 to the 3000 lines makes me very happy. Just think if I had 20 levels thats 1500 less lines per level. Thats a drop of about 30,000 lines total. Awesome simply Awesome

Thanks Ansca and to all you guys asking those Module questions. And thanks to all you guys answering those questions. I love forums. We live in a day and age where information is free. I love it. [import]uid: 39088 topic_id: 15978 reply_id: 315978[/import]

There is a corona made game called Chocorun, if I remembered the name right. The developers were “talking” about their game and corona. They stated that Chocorun was only 4000 lines for the complete game. The game is very simple or the first version was I haven’t checked on updated version.
My game is a little more than half done and already over 5000 lines. [import]uid: 17539 topic_id: 15978 reply_id: 59227[/import]

@skalistician, hope to see your game and you signing up for the Indie or the Pro license soon.

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 15978 reply_id: 59232[/import]

Wow 4 grand for the whole game thats not bad. When you say 5000 is that per level or total? I would like to have only 5000 for my whole game but I think that would be near impossible. My game is very large. I should have started with some smaller games first. Trying to tackle this mountain of a game for the last 6 months has been challenging and Very rewarding in terms of learning. So I guess I cant complain to much. [import]uid: 39088 topic_id: 15978 reply_id: 59234[/import]

@jayant Thanks I am looking forward to it to cant wait to Publish this baby. And I will be signing up for the indie developer license come bonus time. I would love pro but no mac yet.

One of your comments I read on the forums helped me a lot with modules and it was only one sentence.

Modules are genaric.

Those three words really helped a brother out. Thanks for that. [import]uid: 39088 topic_id: 15978 reply_id: 59238[/import]

Hey thanks for that feedback, if the sentence helped you out, I should stop writing tutorials and just write sentences :wink:

I understand what you mean here, glad that it could help you out.
cheers,

?:slight_smile: [import]uid: 3826 topic_id: 15978 reply_id: 59242[/import]

I still remember when I first learned about Tables - they really are a magical part of Lua ^-^;

@kingmike40 - I’m not sure how many lines of code ChocoRun was however it wasn’t exactly “very simple”. It was short because it was well written :wink: [import]uid: 52491 topic_id: 15978 reply_id: 59275[/import]

If you watch the trailer for chocoRun here: http://www.dunkelgames.com/chocorun

I don’t think it is still only 4000 lines. [import]uid: 79135 topic_id: 15978 reply_id: 59372[/import]

Hey! ChocoRun dev here :slight_smile:

The very first version of the game was just a little over 3000 lines of code and our actual version is under 8000 lines for the game but it has almost 2000 more lines for the intro as it’s made step by step as an animation (still have to figure out if we can load animations in Corona made with any animation soft, the intro was a long try and error work, but fun after all).

The thing is there isn’t a single level coded in, what’s written are the obstacles behaviors, how we create and destroy them. We read everything from maps created in Tiled with Lime. The only thing that can increase our line count is adding more obstacles or characters but adding levels is as easy as making them as our code expects to find them so it can build the real thing.

ChocoRun first version was very simple compared to the last one but that huge line count increase we had was due to my lack of time to really think well the code and the need to have it out asap with the actual design. [import]uid: 13811 topic_id: 15978 reply_id: 59382[/import]

@Alex - Choco plushie says hi. (He’s still living on my desk.)

I will no doubt play ChocoRun a bit on the 14 hour flight coming up and die many, many times :wink: [import]uid: 52491 topic_id: 15978 reply_id: 59454[/import]

@peach Hahaha thank you for that! I’m really proud for Choco being able to stay at your desk :slight_smile:

I hope your flight goes insanely great! Bring a hair from Carlos so we can clone him hahaha. [import]uid: 13811 topic_id: 15978 reply_id: 59458[/import]

I also have my special Choco “thank you” Picture on my white board. (It is using my favorite magnet - you remember those app icon ones I posted a pic of on Twitter? He has the app store one :D)

Anywho, I lol’d - but yes, I shall attempt to pluck a hair while he is not looking.

+1 for Carlos clones! [import]uid: 52491 topic_id: 15978 reply_id: 59462[/import]