Jump to content
  • Advertisement
Sign in to follow this  
fir

about lines of code

This topic is 1911 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Edited by fir

Share this post


Link to post
Share on other sites
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.

 

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)

Share this post


Link to post
Share on other sites

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 

Edited by fir

Share this post


Link to post
Share on other sites
Guest Hiwas

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...

Share this post


Link to post
Share on other sites

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. Edited by Hodgman

Share this post


Link to post
Share on other sites

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]

Edited by fir

Share this post


Link to post
Share on other sites

 

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.

Share this post


Link to post
Share on other sites

[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.

Edited by weeska

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!