I used this line counter to count the lines in some of my projects (just game code- engine code NOT included), here are the results: Cosmo Bots / Water Bugs: -------------------------------------------------------- Total number of lines: 15211 Total number of lines of code: 12393 Total number of empty lines: 2186 Total number of comment lines: 604 Total number of empty comment lines: 28 -------------------------------------------------------- Z-Ball: -------------------------------------------------------- Total number of lines: 15943 Total number of lines of code: 12828 Total number of empty lines: 1950 Total number of comment lines: 1060 Total number of empty comment lines: 105 -------------------------------------------------------- Bugatron: -------------------------------------------------------- Total number of lines: 13223 Total number of lines of code: 10943 Total number of empty lines: 1462 Total number of comment lines: 744 Total number of empty comment lines: 74 -------------------------------------------------------- Best Friends / Sponge Bob Obstacle Odyssey: -------------------------------------------------------- Lines of Code: 7615 Blank of Comment Lines: 1223 Total Lines: 8388 -------------------------------------------------------- Since Best Friends was written in Blitz3D, I used the following code to count the lines: PHP: Graphics 520,340,16,2dir.Dir=New Dirdir\loc$=CurrentDir$()Print "Counting lines..."While dir<>Nulllis=ReadDir(dir\loc$)If Not lis Then RuntimeError "Failed to read the '"+dir\loc$+"' directory"filen$=NextFile(lis)While filen$<>""If KeyHit(1) Then EndSelect FileType(dir\loc$+filen$)Case 1 If Right$(filen$,3)=".bb"Size=Size+FileSize(dir\loc$+filen$)file=ReadFile(dir\loc$+filen$)While Not Eof(file)txt$=ReadLine(file)If txt$<>"" And Left$(txt$,1)<>";" Then Lines=Lines+1 Else Blanks=Blanks+1WendCloseFile fileEndIfCase 2 If filen$<>"." And filen$<>".."ndir.Dir=New Dirndir\loc$=dir\loc$+filen$+"\"EndIfEnd Selectfilen$=NextFile(lis)WendCloseDir lisDelete dirdir.Dir=First DirWendClsLocate 0,0Print "Lines of code: "+LinesPrint "Blank or comment lines: "+BlanksPrint "---"Print "Total lines: "+(Lines+Blanks)Print:Printkb#=Float#(Size)/1024mb#=Float#(Size)/1048576Print "Total file size: "+Size+" bytes ("+Left$(kb#,Len(kb#)-4)+" kb / "+Left$(mb#,Len(mb#)-4)+" mb)"Print:PrintPrint "Press any key to close."FlushKeysWaitKeyEndType DirField loc$End Type
cool utility! Democracy: (not my gfx or utils lib, just game code) -------------------------------------------------------- Total number of lines: 34886 Total number of lines of code: 23876 Total number of empty lines: 8599 Total number of comment lines: 854 Total number of empty comment lines: 1557 -------------------------------------------------------- 321 file(s) processed.
Hey this tool is great Atomixer (main code): Code: Global Summary (315 KB, actual: 275 KB) -------------------------------------------------------- Total number of lines: 10580 Total number of lines of code: 8875 Total number of empty lines: 1222 Total number of comment lines: 477 Total number of empty comment lines: 6 -------------------------------------------------------- 70 file(s) processed. Engine Code: Code: Global Summary (341 KB, actual: 296 KB) -------------------------------------------------------- Total number of lines: 12373 Total number of lines of code: 10266 Total number of empty lines: 1636 Total number of comment lines: 466 Total number of empty comment lines: 5 -------------------------------------------------------- 107 file(s) processed. DRM System: Code: Global Summary (98.1 KB, actual: 86.4 KB) -------------------------------------------------------- Total number of lines: 3343 Total number of lines of code: 2611 Total number of empty lines: 411 Total number of comment lines: 290 Total number of empty comment lines: 31 -------------------------------------------------------- 32 file(s) processed. And this really shows that using out-of-the-box APIs and tools can really save time and effort. In my case, I could have done Atomixer in less than have the time. Trouble is, I'm never happy with ready made high-level APIs and would rather roll my own
Neat tool. Brickout: Global Summary (288 KB, actual: 201 KB) -------------------------------------------------------- Total number of lines: 10610 Total number of lines of code: 7605 Total number of empty lines: 1898 Total number of comment lines: 931 Total number of empty comment lines: 176 --------------------------------------------------------
This tool is so neat that it sends your sources over the Internet. (1st of April joke in advance.. or late, dunno)
Cool! Here's mine; just the game code, none of the numerous little editors, tools and peripheral data-generating widgets I wrote along the way:
I used cat *.cpp *.h |wc -l to count lines and cat *.cpp *.h | grep "^[ \t]*//" |sort |uniq |wc -l to count comment lines (non-repeated). My results : Game framework : 32137 total, 263 comments Betty's Beer Bar specific : 16496 total, 171 comments Wild West Wendy specific : 28497 total, 172 comments Current game : 11046 total, 95 comments This is C++ code only. It doesn't count build scripts, ad-hoc tools, and especially not animation definitions, which is practically a language (7521 lines in WWW), nor image metadata (8697 lines in WWW, not human-generated fortunately)
My current game is 31,456 so far, I'd expect that to go up a few 1000 before finished. I'm using Blitz3D so it would be a lot more if I wasn't using that
-------------------------------------------------------- Total number of lines: 27563 Total number of lines of code: 17923 Total number of empty lines: 3755 Total number of comment lines: 3536 Total number of empty comment lines: 2349 -------------------------------------------------------- I guess I tend to go a little heavy on the comments
Atlantis: Global Summary (732 KB, actual: 575 KB) -------------------------------------------------------- Total number of lines: 23078 Total number of lines of code: 14717 Total number of empty lines: 3347 Total number of comment lines: 3438 Total number of empty comment lines: 1576 -------------------------------------------------------- 52 file(s) processed. Best regards, Emmanuel
It has been awhile since I've checked (and don't have it handy on this comp) but I'm guessing I've got around 30k.
Not all.. but here are a few... Beetle Bomp -------------------------------------------------------- Total number of lines: 19259 Total number of lines of code: 15453 Total number of empty lines: 2817 Total number of comment lines: 637 Total number of empty comment lines: 352 -------------------------------------------------------- A Snake's Life -------------------------------------------------------- Total number of lines: 15414 Total number of lines of code: 11847 Total number of empty lines: 2219 Total number of comment lines: 688 Total number of empty comment lines: 660 -------------------------------------------------------- Space Taxi 2 -------------------------------------------------------- Total number of lines: 18159 Total number of lines of code: 12690 Total number of empty lines: 3769 Total number of comment lines: 544 Total number of empty comment lines: 1156 -------------------------------------------------------- Halloween Heist -------------------------------------------------------- Total number of lines: 2813 Total number of lines of code: 2350 Total number of empty lines: 346 Total number of comment lines: 70 Total number of empty comment lines: 47 --------------------------------------------------------
Riotball (Just the game specific code): Code: Global Summary (682 KB, actual: 576 KB) -------------------------------------------------------- Total number of lines: 30165 Total number of lines of code: 18553 Total number of empty lines: 6115 Total number of comment lines: 3715 Total number of empty comment lines: 1782 -------------------------------------------------------- 57 file(s) processed.
Flatspace II (so far): --------------------------------------------- Total number of lines: 52512 Total number of lines of code: 44953 Total number of empty lines: 1038 Total number of comment lines: 6356 Total number of empty comment lines: 165 --------------------------------------------- Mark
Outer-Rim Pod Digger (Engine is integrated into the game): Code: Global Summary (621 KB, actual: 492 KB) -------------------------------------------------------- Total number of lines: 18740 Total number of lines of code: 13059 Total number of empty lines: 3723 Total number of comment lines: 1884 Total number of empty comment lines: 74 -------------------------------------------------------- 115 file(s) processed. Looking at the other stats above, I'm not feeling bad about my code being so bloated anymore. Seriously though, interesting stuff.
Ultratron: Code: Global Summary (195 KB, actual: 167 KB) -------------------------------------------------------- Total number of lines: 7218 Total number of lines of code: 4020 Total number of empty lines: 871 Total number of comment lines: 1470 Total number of empty comment lines: 857 -------------------------------------------------------- 31 file(s) processed. Titan Attacks: Code: Global Summary (165 KB, actual: 143 KB) -------------------------------------------------------- Total number of lines: 6196 Total number of lines of code: 2940 Total number of empty lines: 835 Total number of comment lines: 1549 Total number of empty comment lines: 872 -------------------------------------------------------- 32 file(s) processed. Mines smaller than yours, nyah nyah etc. Oh, and here's the library code (hiscores, UI, sprite engine, game init, etc.) Code: Global Summary (1.03 MB, actual: 919 KB) -------------------------------------------------------- Total number of lines: 36674 Total number of lines of code: 17699 Total number of empty lines: 4369 Total number of comment lines: 9644 Total number of empty comment lines: 4962 -------------------------------------------------------- 195 file(s) processed. Cas
Current project (not finished / optimized yet), just gamecode: -------------------------------------------------------- Total number of lines: 23610 Total number of lines of code: 15896 Total number of empty lines: 2575 Total number of comment lines: 3421 Total number of empty comment lines: 1718 -------------------------------------------------------- 57 file(s) processed.
Turbo Sliders takes the lead . It has been a hobby project for me for a long time and the game is already much bigger than it looks. Code is written in C, using SDL, no fancy high-level engines or libraries in use. Network support also adds lots of code (maybe roughly 30 % of the code is more or less network game related). Total number of lines: ~90k Total number of lines of code: ~70k
Here are the C4 Engine stats as of October 23, 2005: Global Summary (4.8 MB, actual: 4.11 MB) -------------------------------------------------------- Total number of lines: 181308 Total number of lines of code: 127650 Total number of empty lines: 37847 Total number of comment lines: 11418 Total number of empty comment lines: 4393 -------------------------------------------------------- 289 file(s) processed. Engine code makes up about 78% of the total -- game code and tool plugins make up the rest.