SFML community forums

General => General discussions => Topic started by: cpolymeris on July 15, 2013, 09:35:26 am

Title: Ever wondered how many lines of code you have to write for a "succesful" game?
Post by: cpolymeris on July 15, 2013, 09:35:26 am
Well, statistically speaking...
(https://docs.google.com/spreadsheet/oimg?key=0AltDNAydfoc5dDRJd3FvYnYtaGh0RWp6Qjd3RU52S2c&oid=1&zx=quofpj2riepm)

Around 100-300K should do ;)

The data (https://docs.google.com/spreadsheet/ccc?key=0AltDNAydfoc5dDRJd3FvYnYtaGh0RWp6Qjd3RU52S2c&usp=sharing), programmatically fetched from Ohloh.
Title: AW: Ever wondered how many lines of code you have to write for a "succesful" game?
Post by: eXpl0it3r on July 15, 2013, 09:40:49 am
I've only heard of about 2 on that list. Maybe you'd also need a line vs popularity statistics to see how many lines are need to make a popular game. :P

Besides that lines of code is rather bad way to messure anything. ;)
Title: Re: AW: Ever wondered how many lines of code you have to write for a "succesful" game?
Post by: cpolymeris on July 15, 2013, 09:51:56 am
I've only heard of about 2 on that list. Maybe you'd also need a line vs popularity statistics to see how many lines are need to make a popular game. :P
Yeah, the list is about 60 games, though (the most "I use this" voted on Ohloh), not only those labeled in the abscissa, including e.g. FreeOrion, Wesnoth, OpenTTD, Warzone 2100, Freeciv, and other open-source "classics". They just didn't all fit.

Quote
Besides that lines of code is rather bad way to messure anything. ;)
I agree. This was just for fun. I find it interesting that after 400K lines or so, codebases seem to explode.

EDIT: Nethack is "only" 200K lines, that's amazing. Meanwhile, Worldforge, forever vaporware is 1.6M o.O
Title: Re: AW: Ever wondered how many lines of code you have to write for a "succesful" game?
Post by: cpolymeris on July 15, 2013, 10:18:30 am
Maybe you'd also need a line vs popularity statistics to see how many lines are need to make a popular game. :P

Not very conclusive:
(https://docs.google.com/spreadsheet/oimg?key=0AltDNAydfoc5dFJVUlY3ano2Wjd6SElyQS13M2lIMlE&oid=1&zx=rtw0hkfx25w8)

Ohloh user count seems to not be a good indicator of popularity, since most users don't use that site. In fact, only the 30 projects I used for this graph register more than 20 users.
Title: Re: AW: Ever wondered how many lines of code you have to write for a "succesful" game?
Post by: eXpl0it3r on July 15, 2013, 10:38:17 am
Yeah, the list is about 60 games, though (the most "I use this" voted on Ohloh), not only those labeled in the abscissa, including e.g. FreeOrion, Wesnoth, OpenTTD, Warzone 2100, Freeciv, and other open-source "classics". They just didn't all fit.
Hmmm I guess, I'm just not so much into Open Source games... ;)

I find it interesting that after 400K lines or so, codebases seem to explode.
Well you have to take into account that the bigger code bases are mostly MMOs or 3D games and there it's relatively easy to get too much code quickly. What I wonder though, is how a Super Mario clone needs 700k. They've either implemented a lot of boilerplate or idk. Maybe I should take a look at that... ;)

EDIT: Nethack is "only" 200K lines, that's amazing. Meanwhile, Worldforge, forever vaporware is 1.6M o.O
Well Nethack is also a rather simple system in regards to a full blown 3D MMO like Worldforge.

Not very conclusive:
(https://docs.google.com/spreadsheet/oimg?key=0AltDNAydfoc5dFJVUlY3ano2Wjd6SElyQS13M2lIMlE&oid=1&zx=rtw0hkfx25w8)

Ohloh user count seems to not be a good indicator of popularity, since most users don't use that site. In fact, only the 30 projects I used for this graph register more than 20 users.
Well I've never heard of Ohloh and I've never seen a link or anything to it on many different IRC channels and forums, so yeah I guess not many know/use it. :D
Title: Re: Ever wondered how many lines of code you have to write for a "succesful" game?
Post by: Nexus on July 15, 2013, 10:57:29 am
There are some things one should not forget:
Title: Re: Ever wondered how many lines of code you have to write for a "succesful" game?
Post by: FRex on July 15, 2013, 08:12:31 pm
I wonder what libraries do last 3 games use because they have more lines than doom does, which is crazy :o considering Doom 3 is a game and an entire id tech 4 engine that includes libcurl, own stl, lexer, parser, two scripting languages, gui surfaces, opengl multithreaded renderer and a ton of features, still pretty good for use (Brink from 2011 is latest commercial triple A, also I know one indie game and one very good mod that is now going standalone that use it too) is staying around 600k of code and 150k of blank and comments each.
Title: Re: Ever wondered how many lines of code you have to write for a "succesful" game?
Post by: cpolymeris on July 16, 2013, 12:44:22 am
I wonder what libraries do last 3 games use because they have more lines than doom does...

In the case of WorldForge, I think it's because it's a 15-year-old vaporware "game" that was rewritten numerous times and offers several clients (2D, 3D, this or that toolkit) for the same game. In the case of PlaneShift, I think it's because over half of the lines are XML. If you count only C++, the LoC count is closer to 500k.

Then there is Warzone 2100, originally a commercial game, with no less than 799,999 lines of code (https://www.ohloh.net/p/warzone2100/analyses/latest/languages_summary) (was that on purpose?), not counting comments and blanks!

The most interesting cases for me are those of well-establlished, and enjoyable games like OpenTTD, Battle for Wesnoth, naev and Freeciv. Most of those seem to hover around a relatively sane 200 to 300K lines.
Title: Re: Ever wondered how many lines of code you have to write for a "succesful" game?
Post by: FRex on July 16, 2013, 01:11:43 am
Quote
over half of the lines are XML
Wow.. just wow. :o
Quote
well-establlished, and enjoyable games like OpenTTD, Battle for Wesnoth, naev and Freeciv. Most of those seem to hover around a relatively sane 200 to 300K lines.
Nethack too(200k you said). Nethack in terminal is best. ;D
Title: Re: Ever wondered how many lines of code you have to write for a "succesful" game?
Post by: Lethn on July 24, 2013, 10:46:33 am
Define 'successful' do you mean sales figures or do you mean whether people are actually playing still? I've seen games like CoD or Halo get millions but they become ghost towns after awhile because they don't attempt anything new after awhile so in response they churn out dozens of sequels that are all the same in the hopes they'll get lucky.

Meanwhile games like Minecraft come out and completely embarrass them because it's just a block being deleted after several mouse clicks ( Yes I know there's more going in the background but you get the idea ) and then there's the simple puzzle games like Bejewelled or on the app end of the market angry birds.
Title: Re: Ever wondered how many lines of code you have to write for a "succesful" game?
Post by: The Terminator on July 24, 2013, 05:54:28 pm
I remember reading somewhere that skyrim has around 57 million lines including the engine. That's slightly less than windows 7, which hovers around 70 million.