Author Topic: How big is your Level class/file?  (Read 81770 times)

Kyzrati

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 508
  • Karma: +0/-0
    • View Profile
    • Grid Sage Games
    • Email
Re: How big is your Level class/file?
« Reply #45 on: November 24, 2014, 11:36:33 PM »
Krice, can you show us just a screenshot of all the Kaduria source files in their directory structure, with just file names and sizes? I'm genuinely curious as to what goes into a massive 500k loc roguelike project as big as many AAA games. I just want to see the files and how you've organized them--not source itself, mind you, just the files.

ADOM only has about 200k, by the way, so I've no doubt you've got everyone beat by a pretty wide margin.

Trystan

  • Rogueliker
  • ***
  • Posts: 164
  • Karma: +0/-0
    • View Profile
    • my blog
Re: How big is your Level class/file?
« Reply #46 on: November 25, 2014, 03:41:24 AM »
Have you looked at code for any roguelike? Or any large project? Or any good code? You can learn a lot. You may want to try it.


I did a quick and dirty line count[1] check of how much code a few of the popular classic roguelikes have.

Dungeon Crawl Stone Soup 0.15.2 has 2,021,779 lines in "source". The largest files looked like definitions for monsters etc.

The latest Angband from github has 237,698 lines in "src". The largest files were "main" files and seemed to have a lot going on.

Nethack 3.4.3 has 134,313 lines in "src".

Brogue 1.7.44 has 39,284 total lines in "PlatformCode" and "BrogueCode". Most of it was core brogue code, not platform specific.

[edit]
Slash'EM Extended has 162,333 lines in "src". I don't know of any roguelike that has as much content, as many interactions, and as much gameplay complexity as what I've read about this game. It's dungeon.c file, which I imagine is the closest to your Level file, is 1,771 total lines.

If your codebase has 3 times as much well-written code as that then you should immediately do a beta release of your game. I'm sure it will become an instant classic and make the most beloved roguelike look like a boring and simplistic game for toddlers. I'm not even being sarcastic here - I'm 100% serious. If your game is as groundbreaking and breathtaking in scope, complexity, and elegance as you claim it is then you'd be a huge jerk for not sharing it.
[/edit]



[1]
Code: [Select]
( find ./ -type f -print0 | xargs -0 cat ) | wc -l
« Last Edit: November 25, 2014, 04:46:01 AM by Trystan »

TheCreator

  • Rogueliker
  • ***
  • Posts: 370
  • Karma: +0/-0
    • View Profile
    • Fame
    • Email
Re: How big is your Level class/file?
« Reply #47 on: November 25, 2014, 08:05:51 AM »
Dungeon Crawl Stone Soup 0.15.2 has 2,021,779 lines in "source". The largest files looked like definitions for monsters etc.

Damn. That's 10 times as much as ADOM, but I'll never believe it's 10 times more complex. I'm going to analyze this more thoroughly today, these numbers truly shocked me.
Fame (Untitled) - my game. Everything is a roguelike.

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: How big is your Level class/file?
« Reply #48 on: November 25, 2014, 10:10:26 AM »
If your codebase has 3 times as much well-written code as that then you should immediately do a beta release of your game.

It's not ready yet. Line count doesn't tell everything, because how data is handled. Some games have lot of external data (Angband for example) and other include data in the source code. I like to include data in the source code, I'm not a big fan of scripting data. Almost all data is in the source code, except of course tiles and other graphics.

Another big factor is the game engine vs. "hacking" approach. With good game engine you can reduce the amount of source code to handle complex stuff. However it often means more time spent on writing the game engine. Kaduria is somewhere between full game engine and hacking.

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: How big is your Level class/file?
« Reply #49 on: November 25, 2014, 10:14:18 AM »
Krice, can you show us just a screenshot of all the Kaduria source files in their directory structure, with just file names and sizes? I'm genuinely curious as to what goes into a massive 500k loc roguelike project as big as many AAA games. I just want to see the files and how you've organized them--not source itself, mind you, just the files.

500K is not that big.
http://koti.mbnet.fi/paulkp/temp/filelist.txt

Kyzrati

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 508
  • Karma: +0/-0
    • View Profile
    • Grid Sage Games
    • Email
Re: How big is your Level class/file?
« Reply #50 on: November 25, 2014, 10:30:57 AM »
Thanks, organization looks rather typical, actually, with relatively small file sizes compared to what I thought you might be implying for the project as a whole. (For comparison, my latest project has 30 files over 30 KB, 6 over 100 KB.)

But unless I'm missing something, without the VS project-related files, the pure source on that file list is just a few megabytes, which can't possibly hold 500k loc. More like 50k. So where's the rest of the source?

reaver

  • Rogueliker
  • ***
  • Posts: 207
  • Karma: +0/-0
    • View Profile
Re: How big is your Level class/file?
« Reply #51 on: November 25, 2014, 10:42:32 AM »
Some quick stats, just for fun.

Given the file hierarchy text, I quickly ran a python script to count size of source data in bytes (http://pastebin.com/5UytpuhS)
It came up as 1072070 bytes, AKA a megabyte of pure source.
My infant roguelike project at the moment (nothing particularly big) is 867041 bytes, and 28267 lines of code.
My style is not verbose. I've seen Krice's style, it's not verbose either.

So there you go. Assuming that the hierarchy given is all there is, and a linear relationship between my proj size and Kaduria, Kaduria is at approx. 36K lines of code. Not 500K.
« Last Edit: November 25, 2014, 10:47:52 AM by reaver »

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: How big is your Level class/file?
« Reply #52 on: November 25, 2014, 11:04:16 AM »
I had a feeling that something is wrong. And it's not even 50K, it's 48K.

pat

  • Rogueliker
  • ***
  • Posts: 193
  • Karma: +0/-0
    • View Profile
Re: How big is your Level class/file?
« Reply #53 on: November 25, 2014, 12:52:47 PM »
48k lines of code isn't much to show for 20 years of continuous development, someone with an unreleased 500k line superproject should give you some tips

mushroom patch

  • Rogueliker
  • ***
  • Posts: 554
  • Karma: +0/-0
    • View Profile
Re: How big is your Level class/file?
« Reply #54 on: November 25, 2014, 02:45:49 PM »
Okay... good thread, guys. Clarifying.

Krice, I hope you've gained a useful perspective here. Your efforts, though commendable in their persistence, are actually fairly ordinary. Lots of people here have written a bunch of code without reaching what they consider a finished product or even something worth releasing. A lot of them have done so in a much more reasonable amount of time too.

You should also understand that people here are sceptical about your claims about things because your commentary often seems pretty clueless. For example, I doubt anyone else here would have such a tenuous intuitive grasp of the difference between 50k and 500k lines of code that they would make an incorrect claim like yours in public. Most people here can probably name well known open source projects with codebases of these sizes off the top of their heads and immediately get a feel for the plausibility of your claims...
« Last Edit: November 25, 2014, 04:49:34 PM by mushroom patch »

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: How big is your Level class/file?
« Reply #55 on: November 25, 2014, 05:00:58 PM »
48k lines of code isn't much to show for 20 years of continuous development

I'm not that sure. It must be more engine/data-driven than I thought. Like I said, you can't say much from the size itself, even so because Kaduria is C++ with data-driven style (less code compared to procedural style). What is interesting is how the size will grow now that I have started to "hack" content in the game.

Rickton

  • Rogueliker
  • ***
  • Posts: 215
  • Karma: +0/-0
    • View Profile
    • Weirdfellows
Re: How big is your Level class/file?
« Reply #56 on: November 25, 2014, 07:05:18 PM »
Like I said, you can't say much from the size itself, even so because Kaduria is C++ with data-driven style (less code compared to procedural style)
Now.. show me your roguelike (doesn't have to be released) that has ~500K lines of code. Then we can possibly talk more about things.
Funny how only now that it's out you don't have 500k lines, size doesn't matter.

But honestly, the fact you've been working on something for almost 20 years without a release says more about it than any amount of code ever could. You could be the greatest programmer in the world, but if you can never finish your projects it doesn't even matter.
Creator of the 7DRL Possession: Escape from the Nether Regions
And its sequel, simply titled Possession

pat

  • Rogueliker
  • ***
  • Posts: 193
  • Karma: +0/-0
    • View Profile
Re: How big is your Level class/file?
« Reply #57 on: November 25, 2014, 09:50:53 PM »
Krice is the Cleve Blakemore of roguelikes only not quite crazy enough to be interesting

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: How big is your Level class/file?
« Reply #58 on: November 26, 2014, 12:22:10 PM »
But honestly, the fact you've been working on something for almost 20 years without a release says more about it than any amount of code ever could.

It doesn't say anything about the game. Leonardo Da Vinci was a known procrastinator, he sometimes spent years in one painting, started projects he never finished etc. Yet we now think he was a genius. I know how it is, because he was not good at just one thing, but was interested about many things.

mushroom patch

  • Rogueliker
  • ***
  • Posts: 554
  • Karma: +0/-0
    • View Profile
Re: How big is your Level class/file?
« Reply #59 on: November 26, 2014, 03:31:51 PM »
How can someone make it to your advanced age and still, apparently without irony, draw such ludicrous comparisons?