Lines of code

Disclaimer : I am an experienced programmer and unix administrator, but I am a total newbie in game programming, I just tested a few things with Cocos 2D, then found Corona SDK, and I like what I see, a lot, and just bouncing balls and adding soundtrack and so forth. This is so unlike any type of programing I have ever done in the past.

Regarding the question, I will be the first in line protesting that lines of code have anything to do with anything, but a difference between a 2.000 line code and 20.000 lines of code do speak some about the size of project, undertaking, design and man hours.

Any way.

I was looking over Ghosts vs Zombies, and I was quite surprised by one thing above everything else. The game was approx 5.000 lines of code and that pretty much means, the author wrote ca 140 lines of code every hour making it, ca 2 lines per second, which is extremely impressive.

But 5.000 lines of code is a lot of code any way you look at this, and this game looks pretty simple, only 2 levels, just the 2 levels are close to 4.000 lines.

Is this normal ? How many lines of code is a normal shipping game made with Corona SDK ?

Also, one other thing, if you shoot the ghost with serious amount of force, he passes through the stones, is that a bug the simulator or ?

The game is quite impressive and on its own worthy of being in App Store, if only it had more levels and the stones and beams would actually break and go away would be even more fun. [import]uid: 61610 topic_id: 10196 reply_id: 310196[/import]

I meant to say 2 lines per minute, urgh [import]uid: 61610 topic_id: 10196 reply_id: 37217[/import]

Also, one other thing, if you shoot the ghost with serious amount of force, he passes through the stones, is that a bug the simulator or ?

bug

The game is quite impressive and on its own worthy of being in App Store, if only it had more levels and the stones and beams would actually break and go away would be even more fun.

some of our users have taken the code and written their games based on it as the source code is MIT licensed. They just changed assets and added new levels.

As for 5k of code, depends on the game. But one thing, Jon re-used a lot of code, and the director, and other lua files he used already existed. the director class is also open source.

c. [import]uid: 24 topic_id: 10196 reply_id: 37220[/import]

My game Match Game Magic (in the App Store now) has about 2,200 lines of *my* code, plus Director, CrawlspaceLib, Particle Candy, etc.

My upcoming iPad game, Roly-Polies HD, has about 3,400 lines of my code (plus those handy libraries mentioned above) and it’s not done yet. It will probably come in at around 4K lines. But that includes database routines for SQLite and other things that bump up the count – things that are not actual gameplay.

Match Game Magic is a memory game, Roly-Polies is a physics-based puzzle game.

And honestly, I know I could chop at least 10% - 20% of the code out of there if I went back and optimized things, but that’s not as much fun as making a game, so… :slight_smile:

Jay

PS - Maybe someone (GameDevNation? Techority?) should have a contest to see who can write the coolest game in X lines. Hmmm… :slight_smile: [import]uid: 9440 topic_id: 10196 reply_id: 37227[/import]

Hey traustitj :slight_smile:

I can tell you that Pixel slice has around 4000 lines of code, however Timed mode is largely copy and pasted from Arcade with a few adjustments.

All up I probably wrote 3000 lines, including comments - it’s not a little amount but when you consider a skipped line, an “end”, etc. are all counted as lines it isn’t hard to imagine.

J.A., certainly something to consider :stuck_out_tongue: [import]uid: 52491 topic_id: 10196 reply_id: 37268[/import]

My game Dragging Physics has over 20,000 line of codes with over 50 levels
to play but it was my 1st app and was a project I was working while learning
to program and Corona SDK so basically instead of maybe doing a .lua that
will have all the functions ect and then using “require” I basically did all the
coding per level.lua I wrote every function ect in each level.lua I know for sure
A LOT of the code could been cut off and reducing maybe 60% or more of the
codes I wrote using tables and setting certain .lua and require when needed.
But i was a new programmer and I found it the way I did it organized and
easier, but one thing is for sure comparing corona sdk coding requirement
to other such as the original IOS SDK with objective-c we code A LOT less :slight_smile: [import]uid: 30314 topic_id: 10196 reply_id: 37475[/import]