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

Login with username, password and session length

 
Advanced search

879005 Posts in 32952 Topics- by 24353 Members - Latest Member: kanki

May 23, 2013, 04:23:23 AM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)How many code lines in your last/current game?
Pages: 1 [2] 3 4 ... 6
Print
Author Topic: How many code lines in your last/current game?  (Read 3163 times)
rivon
Level 10
*****



View Profile
« Reply #15 on: January 06, 2012, 06:43:05 AM »

3984 lines of my code (C++ and XML) + 7750 lines of pugixml :D in Sharkaiger...

Edit: by the way, it's not completed. I'm really at the beginning. I will have to hardcode the behaviour for many different types of characters and do some other things like scenes and stuff.
« Last Edit: January 06, 2012, 02:28:58 PM by rivon » Logged
Nix
Level 10
*****



View Profile
« Reply #16 on: January 06, 2012, 07:18:58 AM »

Im surprised theres so many comments.  Ive been trying to comment my code more (than none), but 1000 is surprising.

Well, it's only one comment for every five lines or so. I sometimes get into the habit of commenting almost every line explaining what it does when using some APIs because it saves the hassle of needing to go back and check documentation on those functions.

Edit: I guess I should be fair and post mine... This is for Solar Reboot (googleable)

Code:
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C++                             44           1378            447           5489
C/C++ Header                    40            350            111           1309
make                             2            181            116            502
Lua                             10            107             26            492
Bourne Shell                    10             57            155            254
C                                1             59             30            131
XML                              1              3              0             74
-------------------------------------------------------------------------------
SUM:                           108           2135            885           8251
-------------------------------------------------------------------------------

@zacaj I guess I have an even lower comment-code ratio than you!  Shrug
« Last Edit: January 06, 2012, 07:28:37 AM by Nix » Logged
flavio
Level 4
****



View Profile WWW
« Reply #17 on: January 06, 2012, 07:40:06 AM »

2897 lines of Python code.
Logged

-
Serapth
Level 2
**


View Profile
« Reply #18 on: January 06, 2012, 12:49:31 PM »

My most recent game project was a tutorial, and it currently clocks in at:

Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C/C++ Header                    80           1371           6131           2509
C++                             14            208             48            788
-------------------------------------------------------------------------------
SUM:                            94           1579           6179           3297
-------------------------------------------------------------------------------


Header files are obviously skewing out those numbers, as I have SFML embedded within the project ( for easier distribution reasons ).


The last two years of my life, while not a game project, are much higher, in the 100K lines realm.  Had I known that, two years ago at the cottage when I wrote the first dozen or so lines of code, I would have never ever started! Smiley

Logged
iffi
Guest
« Reply #19 on: January 06, 2012, 06:41:34 PM »

Quote from: Bill Gates
Measuring programming progress by lines of code is like measuring aircraft building progress by weight.

With that said, the first and only game I've created (a Snake clone) was 860 lines total, about 350 of which was for creating the menus. I've since been too lazy to finish (or get started) on anything larger.
Logged
Triplefox
Level 9
****



View Profile WWW Email
« Reply #20 on: January 06, 2012, 07:38:17 PM »

Deep Sea Descent(~2 years ago)
Code:
C:\Users\James\Downloads>cloc-1.55.exe --read-lang-def=clocdef2.def /Users/Jame
/hydro/Hydro/src --no3
     282 text files.
     276 unique files.
     110 files ignored.

http://cloc.sourceforge.net v 1.55  T=2.0 s (86.0 files/s, 17745.0 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
haXe                           120           3653           3343          24041
Python                          12            435            230           3078
HTML                            13             20             69            467
DOS Batch                       15              3              0             70
Bourne Shell                     8              2              0             37
XML                              3              4              5             21
make                             1              4              0              8
-------------------------------------------------------------------------------
SUM:                           172           4121           3647          27722
-------------------------------------------------------------------------------

Magnate(~1 year ago)
Code:
C:\Users\James\Downloads>cloc-1.55.exe --read-lang-def=clocdef2.def /magnate/sr
 --no3
      80 text files.
      79 unique files.
     221 files ignored.

http://cloc.sourceforge.net v 1.55  T=3.0 s (23.0 files/s, 3552.7 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
haXe                            62           1658            600           8116
Python                           2             35             35            117
XML                              3              5              5             83
DOS Batch                        2              0              0              4
-------------------------------------------------------------------------------
SUM:                            69           1698            640           8320
-------------------------------------------------------------------------------

Moto(a few months ago)
Code:
C:\Users\James\Downloads>cloc-1.55.exe --read-lang-def=clocdef2.def /Dropbox/jok
er --no3
     146 text files.
     141 unique files.
      26 files ignored.

http://cloc.sourceforge.net v 1.55  T=7.0 s (16.4 files/s, 2348.9 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
haXe                            76           2103            732          11894
C#                               2             65             33            364
HTML                             4             18              8            270
MSBuild scripts                  4              0             28            248
XML                              5              5              5            186
Python                           2             34             31            121
ActionScript                    19              4            172            109
DOS Batch                        2              0              0              8
Javascript                       1              0              3              1
-------------------------------------------------------------------------------
SUM:                           115           2229           1012          13201
-------------------------------------------------------------------------------

Longcat(current)
Code:
C:\Users\James\Downloads>cloc-1.55.exe --read-lang-def=clocdef2.def /Dropbox/lon
glong2 --no3
      70 text files.
      70 unique files.
      15 files ignored.

http://cloc.sourceforge.net v 1.55  T=0.5 s (110.0 files/s, 13026.0 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
haXe                            44           1026            267           4865
Python                           2             34             31            121
HTML                             1              6              4             76
XML                              5              5              5             63
DOS Batch                        2              0              0              6
Javascript                       1              0              3              1
-------------------------------------------------------------------------------
SUM:                            55           1071            310           5132
-------------------------------------------------------------------------------

Courage Quest(last Ludum Dare)
Code:
C:\Users\James\Downloads>cloc-1.55.exe --read-lang-def=clocdef2.def /Dropbox/ld2
2 --no3
      69 text files.
      69 unique files.
      13 files ignored.

http://cloc.sourceforge.net v 1.55  T=3.0 s (18.7 files/s, 2575.3 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
haXe                            52           1352            136           6129
HTML                             1              5              4             76
XML                              2              0              0             20
Javascript                       1              0              3              1
-------------------------------------------------------------------------------
SUM:                            56           1357            143           6226
-------------------------------------------------------------------------------

I think I can get my current sizes down quite a bit farther with another round of improvements(and moving some shared code into a library, which is becoming increasingly necessary for my own sanity).

The size reduction after that will probably take a major breakthrough, though.
Logged

davidp
Level 6
*



View Profile WWW
« Reply #21 on: January 07, 2012, 04:42:41 AM »

leveleditorcursor.as - 20
preloader.as - 105
player.as - 126
mjobjects.as - 281
mainmenubuttons.as - 85
main.as - 396
leveleditor.as - 294
level.as - 76420
effects.as - 170
editortiles.as - 134
continuemenu.as - 32
collisionblock.as - 76
cinematics.as - 83
background.as - 21
-------
total - 2587
Logged

Mstrp
Level 0
**


View Profile WWW
« Reply #22 on: January 07, 2012, 05:17:02 AM »

leveleditorcursor.as - 20
preloader.as - 105
player.as - 126
mjobjects.as - 281
mainmenubuttons.as - 85
main.as - 396
leveleditor.as - 294
level.as - 76420
effects.as - 170
editortiles.as - 134
continuemenu.as - 32
collisionblock.as - 76
cinematics.as - 83
background.as - 21
-------
total - 2587

Now hold your horses DavidP, 76420 is definitely larger than 2587. Unless you have negative lines of code somewhere else, i think you are trying to pull one over on us!
Logged

_Tommo_
Level 7
**


frn frn frn


View Profile WWW
« Reply #23 on: January 07, 2012, 05:37:51 AM »

My own framework:
Code:
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C/C++ Header                    56           1934            787           5683
C++                             34           1346            296           3922
Java                             3            110             40            268
Bourne Shell                     2              8              1             16
make                             1              4              0              9
-------------------------------------------------------------------------------
SUM:                            96           3402           1124           9898

Ninja Training (~1 year ago, definitely too many LOCs for the game, as it uses the over9000 of dojo)
Code:
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C/C++ Header                    31            882            342           2343
C++                             21            427            125           1107
-------------------------------------------------------------------------------
SUM:                            52           1309            467           3450

an attempt to do an AI:
Code:
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C/C++ Header                    25            558            159           1510
C++                             18            364            124           1053
-------------------------------------------------------------------------------
SUM:                            43            922            283           2563

My last commission (also using dojo):
Code:
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C/C++ Header                    40           1449            513           4171
C++                             14            493            121           1467
-------------------------------------------------------------------------------
SUM:                            54           1942            634           5638

I just use too many LOCs Tired
Logged

Darren_D_Daley
Level 1
*



View Profile WWW Email
« Reply #24 on: January 07, 2012, 07:05:11 AM »

My game so far
Code:
http://cloc.sourceforge.net v 1.55  T=5.0 s (27.0 files/s, 4013.2 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C#                             119           2763           2396          11017
XML                              7              0              0           2395
MSBuild scripts                  8              0             60           1432
ASP.Net                          1              0              0              3
-------------------------------------------------------------------------------
SUM:                           135           2763           2456          14847
-------------------------------------------------------------------------------
Logged

Life sucks and then you die.
davidp
Level 6
*



View Profile WWW
« Reply #25 on: January 07, 2012, 10:37:10 AM »

Now hold your horses DavidP, 76420 is definitely larger than 2587. Unless you have negative lines of code somewhere else, i think you are trying to pull one over on us!

should be 764 :D:D
Logged

Sakar
Level 9
****


Je suis le chat


View Profile WWW Email
« Reply #26 on: January 07, 2012, 12:42:43 PM »

My little framework

Code:
http://cloc.sourceforge.net v 1.55  T=0.5 s (78.0 files/s, 13180.0 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C                                1            523            649           3501
C++                             17            190             11           1053
C/C++ Header                    21            111             13            539
-------------------------------------------------------------------------------
SUM:                            39            824            673           5093
-------------------------------------------------------------------------------
Logged

Site | Twitter
Netsu
Level 10
*****



View Profile WWW
« Reply #27 on: January 07, 2012, 05:08:06 PM »

This topic motivated me to get rid of repeating and unnecessary code, I'm down by 200 lines Smiley
Also, just noticed this about the cloc tool, the summary above the table (the one with version number and the link) has double the correct number of files and lines.
Logged

Nix
Level 10
*****



View Profile
« Reply #28 on: January 07, 2012, 05:29:53 PM »

it's files and lines per second. The fact that they were both double is just a coincidence
Logged
Netsu
Level 10
*****



View Profile WWW
« Reply #29 on: January 07, 2012, 05:38:03 PM »

Oh, you're right, it got me confused.
Logged

Pages: 1 [2] 3 4 ... 6
Print
Jump to:  

Theme orange-lt created by panic