Projects => Discussion => Topic started by: Aero88 on March 18, 2017, 03:56:18 pm
So I have been working on my game Tank Tactics for a long time. Out of curiosity I downloaded a
"Line of Code" calculator: https://forum.yoyogames.com/index.php?threads/lines-of-code-counter.3307/ (https://forum.yoyogames.com/index.php?threads/lines-of-code-counter.3307/)
Here are my results
Empty lines: 2491
Empty lines: 15
Empty lines: 4802
Empty lines: 703
Empty lines: 8011
Lines (excluding empty lines): 86423
Empty lines ratio (empty lines/lines): 0.08
Characters per line: 25.11
Characters per line (excluding empty lines): 27.44
I found this to be quite high. Some of those lines are comments I believe... At least I'm not sure if the calculator takes them out or not. But I have apparently made a game with more characters than many novels. Keeping in mind this project has spanned about 4-5 years of development.
I was curious how many lines of code you guys typically have in your projects?
Then again these are company projects so I feel it's a lot more work for a single individual to get 15k lines like you did. So bravo!
Edit: Just realized I was reading the numbers wrong, that 15k was just for rooms alone! 95k total for an individual project is insanely awesome! Bravo
These are my results for Echoes of Aurelia/Zelda Online engine. (I imported it from GM8 to Game Maker Studio, so I got a lot of errors, but I think that doesn't matter for the count).
The engine has a lot of scripts, so I got almost 3 times more code in there than your project. Instead, the code written on objects is 5 times less.
Empty lines: 252
Empty lines: 0
Empty lines: 1336
Empty lines: 1747
Empty lines: 3335
Lines (excluding empty lines): 34318
Empty lines ratio (empty lines/lines): 0.09
Characters per line: 21.08
Characters per line (excluding empty lines): 23.13
Interesting download. Thanks!
Here are the stats for Horn of Balance (8+ years).
To be fair: I use A LOT of comments for in engine descriptions. Also, I spend way too much time going over old code and simplifying it.
Empty lines: 1878
Empty lines: 15
Empty lines: 12
Empty lines: 10111
Empty lines: 12016
Lines (excluding empty lines): 86524
Empty lines ratio (empty lines/lines): 0.12
Characters per line: 28.61
Characters per line (excluding empty lines): 32.58
Ah these results are rather interesting!
@ Martin dh:
Ah. It is cool to see how programming habits differ. The overall scale of our projects seem to be similar. However the majority of my coding by far is in the objects whereas the majority of your code is script driven.
I also have a great deal of comments as I find it to be invaluable when tracking down my thoughts later on. I also am not entirely sure where the lines of coding from the shaders category are coming from as I do not specifically recall using shaders, but I do have some graphical effects that might be related to the shaders.
You also seem to have on average more characters per line of code. Which makes since because our lines (excluding empty lines) is almost identical. Very interesting!
Yeah shouldn't be any different just from an import. Seems we share rather similar characteristics when it comes to white space usage. .08 to .09
I have had a tendency to shy away from script usage because I had read at one point that they ran a little slower than code embedded in objects. That was a long time ago though and may not be the case at all especially with Studio.
Thanks! It has been lot of work, but a lot of fun too. I have learned a ton during the process! A lot of the room code is somewhat repetitive though as it is basically setting up specific object entity settings and room specific benchmarks for achieving gold, silver or bronze medals when playing.
edit: It would be interesting if it also produced a count for the resources. I know I have a lot of sprites and sound files as well.
You can honestly expect there to be a high number of lines of code, especially for a game. Remember less code doesn't necessarily mean better code ;)
Remember less code doesn't necessarily mean better code ;)
Ah. I hope that is not how I came across. I was certainly not trying to compare quality of code. Just a difference in style. Looking at the numbers alone doesn't say anything of ones abilities. I have a great deal of respect for the effort that goes into the projects here.