Free Lines Of Code Counter

Discussion in 'Work in Progress' started by Dragon47, Jul 27, 2016.

  1. Dragon47

    Dragon47 Member

    Joined:
    Jul 6, 2016
    Posts:
    179
    Lines of Code Counter

    This program analyzes your code and gives you numbers on how many lines and characters you have in your GM Studio project.

    When you've chosen a directory and pressed ok, you'll be presented with the information. The text is automatically copied to the clipboard.

    It would be cool if you could paste it as a reply here! If you encounter any bugs, please tell me.

    Source: http://www.mediafire...nes_of_Code.gmk
    EXE: http://www.mediafire...nes_of_Code.exe
     
    Kepons, dphsw, Gold Mammoth and 3 others like this.
  2. Fixer90

    Fixer90 Member

    Joined:
    Nov 17, 2016
    Posts:
    142
    Worked great! My game has 17,665 lines of code.
     
    Dragon47 likes this.
  3. sitebender

    sitebender Member

    Joined:
    Sep 13, 2016
    Posts:
    723
    Current project 23,000 lines.

    First project a staggering 204,000 lines I knew it would be a lot, but not that much. Funny thing is I have standardized systems and a few hundred scripts, so that helped squeeze the code down. I've even gone back and rewritten old code.

    There are other projects, but I'll spare you the details.

    Thanks for the tool.
     
    Dragon47 likes this.
  4. Sammi3

    Sammi3 Member

    Joined:
    Jun 20, 2016
    Posts:
    159
    Cool tool. My current project in early alpha currently has the following:

    Rooms:
    Lines: 0
    Empty lines: 0
    Characters: 0

    Shaders:
    Lines: 4466
    Empty lines: 806
    Characters: 190483

    Objects:
    Lines: 1515
    Empty lines: 176
    Characters: 28560

    Scripts:
    Lines: 13387
    Empty lines: 3212
    Characters: 325314

    Total:
    Lines: 19368
    Empty lines: 4194
    Lines (excluding empty lines): 15174
    Empty lines ratio (empty lines/lines): 0.22
    Characters: 544357
    Characters per line: 28.11
    Characters per line (excluding empty lines): 35.87
     
    Dragon47 likes this.
  5. elementbound

    elementbound Member

    Joined:
    Jun 30, 2016
    Posts:
    114
    Hey, just stumbled upon this topic, it's a pretty nice tool! Previously I used CLOC with a very quick definition file for GML. Not exactly sure it's working properly, hence it's showing different numbers than your tool. So far I'm trusting yours :p Here's my few-years old project, afaik the biggest I have to date:
    Rooms:
    Lines: 121
    Empty lines: 27
    Characters: 2675

    Shaders:
    Lines: 1331
    Empty lines: 246
    Characters: 36255

    Objects:
    Lines: 10313
    Empty lines: 2011
    Characters: 193409

    Scripts:
    Lines: 2838
    Empty lines: 212
    Characters: 62767

    Total:
    Lines: 14603
    Empty lines: 2496
    Lines (excluding empty lines): 12107
    Empty lines ratio (empty lines/lines): 0.17
    Characters: 295106
    Characters per line: 20.21
    Characters per line (excluding empty lines): 24.37

    Edit: One small issue is that I'm using this from my laptop and the window does not fit on the screen. A scrollbar could be nice, but since this tool is aimed at developers, I think it's easy enough to just paste it into some text editor hanging around.
     
    Dragon47 likes this.
  6. Rukiri

    Rukiri Member

    Joined:
    Sep 25, 2016
    Posts:
    134
    18,000 lines and not a single game yet... granted it's a RPG kit tho :p
    love the avatar, but never surrender!
     
    Dragon47 likes this.
  7. TheSly

    TheSly Member

    Joined:
    Jan 16, 2017
    Posts:
    852
    Any chance of modifying this to work in GMS2 ?
     
  8. Dragon47

    Dragon47 Member

    Joined:
    Jul 6, 2016
    Posts:
    179
    It might be possible, but I'm not planning on doing it atm. I have a lot of other projects going on.
     
  9. Gold Mammoth

    Gold Mammoth Member

    Joined:
    Jun 21, 2016
    Posts:
    5
    Thank you for this tool! This saves me the time of counting by hand! ;)

    My RPG project currently has the following:

    Rooms:
    Lines: 41
    Empty lines: 13
    Characters: 474

    Shaders:
    Lines: 0
    Empty lines: 0
    Characters: 0

    Objects:
    Lines: 5897
    Empty lines: 1768
    Characters: 195272

    Scripts:
    Lines: 11743
    Empty lines: 3054
    Characters: 500502

    Total:
    Lines: 17681
    Empty lines: 4835
    Lines (excluding empty lines): 12846
    Empty lines ratio (empty lines/lines): 0.27
    Characters: 696248
    Characters per line: 39.38
    Characters per line (excluding empty lines): 54.20
     
    Dragon47 likes this.
  10. Hermen

    Hermen Member

    Joined:
    Aug 5, 2016
    Posts:
    2
    Amazing tool, still works even! here's my result :p


    Rooms:
    Lines: 0
    Empty lines: 0
    Characters: 0

    Shaders:
    Lines: 41
    Empty lines: 11
    Characters: 1119

    Objects:
    Lines: 15023
    Empty lines: 3738
    Characters: 363914

    Scripts:
    Lines: 28551
    Empty lines: 3175
    Characters: 883579

    Total:
    Lines: 43615
    Empty lines: 6924
    Lines (excluding empty lines): 36691
    Empty lines ratio (empty lines/lines): 0.16
    Characters: 1248612
    Characters per line: 28.63
    Characters per line (excluding empty lines): 34.03
     
    Dragon47 likes this.
  11. Finn

    Finn Member

    Joined:
    Feb 8, 2018
    Posts:
    95
    A GMS2 version of this would be very neat.
     
  12. Seabass (The Human)

    Seabass (The Human) Member

    Joined:
    Jun 20, 2016
    Posts:
    350
    Dragon47 and Cloaked Games like this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice