lukasz1985 wrote:OpenTTD is 300k LOC but most of this code is implementing low level functionality, like blitters, sound and music drivers. I guess that effectively there is maybe 50k LOC that are used for the real game-logic.
Please point me to the 250K lines of driver stuff.
The 300K lines is all in trunk/src, I didn't count SDL, and other libraries that we use.
lukasz1985 wrote:I've also found that OTTD code is not the best quality and could be optimized away, cutting another 10k of LOC.
Like you always write top-most quality in a language at all times. You will mess up in a program of this scale, and get less than optimal quality. It's not a problem, but claiming you will not at that complexity seems very unlikely to me.
lukasz1985 wrote:Another thing is that 20k LOC/year is 50 lines a day. That's pretty low. When I was actively programming, sometimes I've got from 200-300 LOC a day.
It's quite realistic, perhaps even optimistic, depending on how you are counting. In the about 4 years I am writing FreeRCT, I managed to produce around 80K lines, and deleted 30K lines again (this also includes changes in the lines, so not everything is deleting). So I have about 50K lines as a result after 4 years.
When you typing away, sure it's easy to produce a 1000 lines a day. But you cannot type 24/7. There is this thing called Real Life (work/study/parents/etc) so your time is the weekend alone mostly, also you need time to think about what to do next, debug your code, and take the occasional day off from it all.
lukasz1985 wrote:So your calculations are pretty bad and inaccurate.
Not so sure about that, but feel free to ignore my calculations, and
proof prove me wrong. I'd be happy for you.
In general though, people grossly underestimate the amount of effort and dedication that it takes to pull it off. FreeRCT isn't close to being playable after 4 years.
Edit: As another reference (thanks planetmaker):
https://www.openhub.net/p/openttd claims even less lines / year than both you and me (241K reall code lines with 63 year of work according to the COCOMO model). My 300K lines is really everything, they probably skip comments and blank lines.
Being a retired OpenTTD developer does not mean I know what I am doing.