Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    computer game lines of code

    Hi,

    I am working on a project that requires me understand how many source lines of code (SLOC) are in a typical computer game, written mostly in c++ I'll assume. I am having a very hard time finding estimates though. I need a range of estimates, from small to large programs (at least 10 total).

    Does anyone here know of any estimates (also specify what game and if its small, medium, or large game)?

    Some I did find rough estimates for were:

    Rainbow 6 Vegas (console version)
    1,767,000 lines of code (may use the Unreal 3 game engine)

    The Sims Online - 3 million lines of code

    Paint.NET 3.0 0.13 million sloc

    Thanks!

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,273
    Thanks
    4
    Thanked 83 Times in 82 Posts
    You can't just ask for SLOC count without knowing the basis for the metric. Are you asking for physical or logical SLOC counts?
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #3
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm sorry. I mean logical SLOC

  • #4
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,273
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Well with logical SLOC counting you will run into problems because what constitutes a line of code and what should and shouldn't be included can vary from one counting tool to the next.

    If your goal is to determine an average logical SLOC count from various games written in C++ then I don't think you will get accurate average.

    I could take 2 different SLOC tools and have one give me 500 SLOC and the other give me 700 because one counted comments and the other didn't. Or one didn't include header includes or data definitions, etc.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #5
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That makes sense. How about just physical SLOC then? That would suffice.

  • #6
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,273
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Since you are comparing only games in C++ physical SLOCs might be give a more accurate estimate. If you were comparing SLOCs of different languages it would not.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •