Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

878722 Posts in 32933 Topics- by 24343 Members - Latest Member: Good Enough Games

May 22, 2013, 01:17:23 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)How many code lines in your last/current game?
Pages: [1] 2 3 ... 6
Print
Author Topic: How many code lines in your last/current game?  (Read 3160 times)
^DJ_Link^
Level 0
**



View Profile WWW Email
« on: January 06, 2012, 04:52:27 AM »

Though it would be interesting to share lines of code from our projects.

I used http://cloc.sourceforge.net/ so I know these are without blank and comments lines

Vizati (Game)(C++)(Released) -> 7702 (without engine)
Anadea (Game)(C++)(Released) -> 2719 (without engine)

(Engine) (C++) (WIP)       -> 41529

Current Game I'm working (C++) (WIP) -> 14495


Anyway share your stuff too.
« Last Edit: January 20, 2012, 03:38:45 PM by ^DJ_Link^ » Logged

PompiPompi
Level 10
*****



View Profile WWW
« Reply #1 on: January 06, 2012, 04:54:45 AM »

Over 9000!

Seriously, what is the point of this?
Logged


Kickstarter? no no no... it's Kicksucker...
Netsu
Level 10
*****



View Profile WWW
« Reply #2 on: January 06, 2012, 05:02:13 AM »

wc for line count:

Trajectory (released) -> 3542 (with an engine I wrote)
Hullfire (not finished) -> 11526 (with engine, which I also wrote)

All in C++.

PS: It's interesting to compare how much code goes into other people's games. Everyone wants to know if their virtual dick is average sized or not  Noir
Logged

Mstrp
Level 0
**


View Profile WWW
« Reply #3 on: January 06, 2012, 05:18:35 AM »

Erosion (WIP name)
Client - 5603
Server - 10142
That's 15745 lines in total.

But thats from a few weeks ago, i would guestimate it to be around 20k+ by this time. It's a bit hard to measure at the moment as the basecode for the client is beeing developed with a side project.
Logged

st33d
Guest
« Reply #4 on: January 06, 2012, 05:31:30 AM »

Red Rogue currently has 16881 lines of Actionscript according to cloc.

Also it has 3255 lines of comments.

Amusingly it reckons there's 3 lines of Javascript. Which I know is bollocks because I've got a scroll bar script, jQuery and swfobject in there.
Logged
Average Software
Level 10
*****

Fleeing all W'rkncacnter


View Profile WWW Email
« Reply #5 on: January 06, 2012, 05:41:27 AM »

Franchise currently stands at 71579.
Logged

Franchise - The restaurant wars begin!

What would John Carmack do?
Netsu
Level 10
*****



View Profile WWW
« Reply #6 on: January 06, 2012, 05:42:58 AM »

Also it has 3255 lines of comments.

Of the 11526 lines of Hullfire only 430 are comments... half of which are probably commented out lines of code.
I should comment A LOT more.
Logged

^DJ_Link^
Level 0
**



View Profile WWW Email
« Reply #7 on: January 06, 2012, 05:45:45 AM »

In case you guys are interested

Braid has 90347 lines of code

source: http://the-witness.net/news/2011/06/how-to-program-independent-games/
Logged

Average Software
Level 10
*****

Fleeing all W'rkncacnter


View Profile WWW Email
« Reply #8 on: January 06, 2012, 05:55:20 AM »

Franchise currently stands at 71579.

This was my own raw line count script.  Using your little tool, my game has 51562.  The accompanying campaign editor adds another 21547.  My script counts GLSL code, which this tool does not, so the numbers should be a touch higher.

I was interested to see that my game code has just over 12000 blank lines.  Gotta love whitespace.

Code:
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Ada                            429          10965           5476          47384
C                               16            657            381           2666
Objective C                      8            284            110           1112
C/C++ Header                    19            131            102            255
make                             3             52              0            145
-------------------------------------------------------------------------------
SUM:                           475          12089           6069          51562
-------------------------------------------------------------------------------
Logged

Franchise - The restaurant wars begin!

What would John Carmack do?
ThemsAllTook
Moderator
Level 8
******


Alex Diener


View Profile WWW
« Reply #9 on: January 06, 2012, 05:56:44 AM »

19506 lines of C in the main game, plus about half that much in supporting library code.
Logged
Netsu
Level 10
*****



View Profile WWW
« Reply #10 on: January 06, 2012, 06:04:17 AM »

Great tool you have there Smiley

Code:
http://cloc.sourceforge.net v 1.55  T=1.0 s (33.0 files/s, 11526.0 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C++                             23            997            244           9055
C/C++ Header                     9            137             59           1002
make                             1             13              0             19
-------------------------------------------------------------------------------
SUM:                            33           1147            303          10076

Using grep '//' gave me more comment lines because some lines have both code and a comment in them.
Logged

st33d
Guest
« Reply #11 on: January 06, 2012, 06:08:53 AM »

Also it has 3255 lines of comments.

Of the 11526 lines of Hullfire only 430 are comments... half of which are probably commented out lines of code.
I should comment A LOT more.

I probably comment too much. But there's lots of weird special abilities for items and races that have to be implemented in really strange places in order to work. (eg: Wizard Hats doubling their first enchantment could only fit as a hack in the enchantment code.) Not to mention all the hacks that comprise the procedurally generated stuff.

A sign of well written code is code that doesn't need comments.
Logged
Netsu
Level 10
*****



View Profile WWW
« Reply #12 on: January 06, 2012, 06:13:04 AM »

Well, I don't need them now, but understanding how the game works a few years from now would probably take me much less time if it was well commented. I try to keep everything well divided and clearly named though.

What would happen if somebody else had to decipher my mumblings is a different story.
Logged

Average Software
Level 10
*****

Fleeing all W'rkncacnter


View Profile WWW Email
« Reply #13 on: January 06, 2012, 06:19:02 AM »

A sign of well written code is code that doesn't need comments.

You have to draw a distinction though between 'why is this code doing this?' comments and 'documentation' comments.  A proliferation of 'why the hell?' comments usually seems like a sign of some bad code, while you often can't have enough documentation comments.
Logged

Franchise - The restaurant wars begin!

What would John Carmack do?
zacaj
Level 3
***


void main()


View Profile WWW Email
« Reply #14 on: January 06, 2012, 06:26:07 AM »

The beginnings of a 3D engine Im working on:
Code:
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C++                             33            524            408           4357
C/C++ Header                    38            318            632           1484
HTML                             2              0              0            100
-------------------------------------------------------------------------------
SUM:                            73            842           1040           5941
-------------------------------------------------------------------------------
Im surprised theres so many comments.  Ive been trying to comment my code more (than none), but 1000 is surprising.  Im also surprised theres only 6000 lines of 'code' my first game, a simple match 3 puzzler, had ~9000
Logged

My twitter: @zacaj_

Quote from: mcc
Well let's just take a look at this "getting started" page and see--
Quote
Download and install cmake
Noooooooo
Pages: [1] 2 3 ... 6
Print
Jump to:  

Theme orange-lt created by panic