View Full Version : computer game lines of code

03-13-2009, 09:34 PM

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


03-13-2009, 11:38 PM
You can't just ask for SLOC count without knowing the basis for the metric. Are you asking for physical or logical SLOC counts?

03-14-2009, 01:22 AM
I'm sorry. I mean logical SLOC :)

03-14-2009, 02:38 AM
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.

03-14-2009, 02:50 AM
That makes sense. How about just physical SLOC then? That would suffice.

03-14-2009, 03:39 AM
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.