about lines of code

Started by
37 comments, last by Satharis 10 years, 7 months ago

How many lines of code you had written in you life till now?

How many lines of code project you are working on now or was working in the past?

How many lines of code have good well known games ?

How many lines of code have todays big titles?

How many lines of code is a big project game, how many is medium project?

I hope this post is apropriate, It would be interesting to me to know.

As to myself I wrote till today about 100-150k lines of c (2-3MB of source) (its quite precise) I consider 100k as a medium size project, think that big project probably is 1M-lines (20MB) or more - but I am not sure, never worked on big 3d game. I would like to know what do other think about this and If can give some values related to their experience. Thanx for answers.

Advertisement

While I figure it is an appropriate post, it is unfortunately a completely invalid measurement. Lines of code measurement is a stupid and obnoxious way to measure productivity. I've had days where my only line of code was changing a 0 to a 1 and EVERYONE was insanely happy because I fixed a nasty ass and hard to track bug with that modified line. Does that count as a line of code? I've had other days where I remove nearly 1k lines of code by encapsulating a copy/paste viral pattern saved everyone major amounts of hassles in the future. Does removing large swatches of stupid code and replacing it with a cleaned up API (or by adding a 10 line helper function) count?

Lines of code is a silly measurement. I've worked on 3 million line codebases and all I can say is that they should have been at least 1/3rd of that had the people involved stopped reinventing wheels and simply talked to folks to find out what already existed.

So, overall, a really horrible way to measure things IMO.

l)How many lines of code you had written in you life till now?
2)How many lines of code project you are working on now or was working in the past?
3)How many lines of code have good well known games ?
4)How many lines of code have todays big titles?
5)How many lines of code is a big project game, how many is medium project?

...[insert generic rant about how LOC is an absolutely useless and meaningless metric]...
...Some of the most important changes that I've comitted to a project have decreased the total LOC counter (e.g. replacing 100 lines of buggy code with 50 lines of working code)...
...Some of the longest and most important tasks don't produce very many lines of code (e.g. there was a critical bug stopping the game from being shipped, which took me two months to find/fix, and fix resulted in one line of code being modified)...

1) No way to know.
2) I'm writing a game engine at the moment, which has 38366 LOC (374791 if you include third party libraries).
3/4/5) The big games I've worked on have often had 1-3 million LOC by the end (including engine). There's no strong link between the size of a project and the LOC count though. You could have a large game with only 10k LOC...

While I figure it is an appropriate post, it is unfortunately a completely invalid measurement. Lines of code measurement is a stupid and obnoxious way to measure productivity. I've had days where my only line of code was changing a 0 to a 1 and EVERYONE was insanely happy because I fixed a nasty ass and hard to track bug with that modified line. Does that count as a line of code? I've had other days where I remove nearly 1k lines of code by encapsulating a copy/paste viral pattern saved everyone major amounts of hassles in the future. Does removing large swatches of stupid code and replacing it with a cleaned up API (or by adding a 10 line helper function) count?

Lines of code is a silly measurement. I've worked on 3 million line codebases and all I can say is that they should have been at least 1/3rd of that had the people involved stopped reinventing wheels and simply talked to folks to find out what already existed.

So, overall, a really horrible way to measure things IMO.

Ok, but personally I was not talking about measuring productivity- (or less more creativity) its quite different topic : programming is very abstract domain some like writing novels. I am not saying also that bigger is better.

But quite not related to that it is interesting how big projects are, how much lines somebody had written etc - Its quite interesting, though I agree most of the work in programming is abstract and is learning and its behind the lines (the lines written is 10% of it all)

You could have a large game with only 10k LOC...

Nay, I wouldnt belive that - 10k lines is say 10 medium sized files, a couple of procedures each - its quite a small game like extended tetris or something not a big or even medium one.

Im sorry that I do not know how big in loc are the famous games.

Vaguelly remember that Quake 2 (not so much good game, depressing, though quite solid and I played it) had about 100-150k-lines,

Famous rogualike ADOM (terribly good game at least for me in v15 I was playing a lot) I vaguelly remember was also about 100k lines

Do not know how big in loc are other games, (say Gothic-like games or so, I do not know many modern games ) older classics and more modern AAA-killers, if somebody do know, thanks for posting info about it

fir, you should give up. You are talking to two moderators who have been making games for a while. Not sure about Hodge but I've been at it for a bit over 20 years now. I'm not going to start posting a list of my games and LOC's and I suspect Hodge is of the same opinion. LOC has no bearing on reality unless you then include team size, measure it over years of development, average salaries etc. You'd be better off asking EA for such stats because they track it all, of course they make a lot of shitty games, go figure...

Nay, I wouldnt belive that - 10k lines is say 10 medium sized files, a couple of procedures each - its quite a small game like extended tetris or something not a big or even medium one.

You could write the graphics and audio subsystems, and a VM/interpreter for a visual/node-based scripting language wink.png
How do you count LOC for non-line-based programming systems?

But yes, if I were quoting numbers for "big" projects, I'd go with a million.

fir, you should give up. You are talking to two moderators who have been making games for a while. Not sure about Hodge but I've been at it for a bit over 20 years now. I'm not going to start posting a list of my games and LOC's and I suspect Hodge is of the same opinion. LOC has no bearing on reality unless you then include team size, measure it over years of development, average salaries etc. You'd be better off asking EA for such stats because they track it all, of course they make a lot of shitty games, go figure...

I see no reason to give up the question. If youre 20 years in gamedev it does not mean that people have differen approaches to that than yours and their approaches are bad. I like line counting and searching for answers from people interested in that too, some knowledge related to that, just like i was asking about.

As to 'go figure' I do not know how to find that, many project sizes are probably avaliable in google - could somebody help with finding that?, I would appreciate

[PS.Im asking a big amount of question I know, Its becouse I am new in world wide community and got a couple of question on my mind - then it will become gradually lower i think, but now still have a couple of them, regardz]

You could have a large game with only 10k LOC...

Nay, I wouldnt belive that - 10k lines is say 10 medium sized files, a couple of procedures each - its quite a small game like extended tetris or something not a big or even medium one.

Im sorry that I do not know how big in loc are the famous games.

Vaguelly remember that Quake 2 (not so much good game, depressing, though quite solid and I played it) had about 100-150k-lines,

Famous rogualike ADOM (terribly good game at least for me in v15 I was playing a lot) I vaguelly remember was also about 100k lines

Do not know how big in loc are other games, (say Gothic-like games or so, I do not know many modern games ) older classics and more modern AAA-killers, if somebody do know, thanks for posting info about it

Code adds or controls functionality though, not content(Allthough some games make heavy use of scripted content which does require a bit of code for new content as well), so a game like Quake2 would require pretty much the same amount of code even if it was just a single short level (and thus a very small game).

10k LOC is enough to make a huge game but its not enough to implement all the functionality you'd expect to find in a modern game, most of the code written for todays AAA games have nothing to do with the size of those games but rather with the functionality the games have.

[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

[PS.Im asking a big amount of question I know, Its becouse I am new in world wide community and got a couple of question on my mind - then it will become gradually lower i think, but now still have a couple of them, regardz]

You're just wasting time by asking those questions. If you wan't to make games, they're totally irrelevant. They just stop you from doing something.

Also, it seems like you have a fixed mindset of the answers to every question you ask, so there's no point in answering your question, either.

You'd be better off appreciating the detailed answers like those from Hodgman and AllEightUp, because they seem to know what they're talking about.

Try to make games or program what you want to, and if you get *really* stuck, ask for help, there are some great devs around here.

This topic is closed to new replies.

Advertisement