How Big Is Your Current Project?
Miscellaneous Forums/General Discussion/How Big Is Your Current Project?
i mean, the code... how many lines of code have you written so far (including comments is accpetable) to get your latest work up and running... and how many do you expect to have written before it is completed?
does anyone keep track of stuff like this... and if so, what tool do you use to do it?
--Mike
Well the Delphi code I'm working on is 320,000 lines, mostly written by me. (the compiler tells me when it builds)
Easter Bonus is a 251k file and is 8600 excluding library files (also by me) which add up to a few more thousand maybe 4000-5000. Just as a comparison, Xmas Bonus, my first game is 6750 lines.
My game framework is 6000 lines ... so far.
Read the Blitz line count from the IDE.
currently 3290 lines
proly over 8000 lines if you include examples etc, when its done.
Read the Blitz line count from the IDE.
same here.
My current game (Viking invasion of Britain/Ireland/France) is 1,545 lines spread across seven files. It'll probably end up with about 2,500 when done. As for tool used to count lines, I just looked at the bottom-right of the Max IDE after doing a Ctrl+End. :) EDIT: like everyone else, apparently... :)
wow... some of those projects are pretty big...
i just did a line count of my sub sim, and it's just at around 2600 lines of code, spread across 7 files...
and, this includes the components of my OOP engine...
somehow i thought it would be a lot more :0)
--Mike
I just counted up igLoader, I'm always working on that (yes session timeout coming soon), it's current sitting at 4K lines without headers. 2K of those are the XML reader!!!!
No idea what my other projects are.
I have about 60-80 lines of code so far. Its getting there and things are starting to shape up. Hopefully it'll be the next HL2 or something...
Big!
about 80 source files with an average of around 250 lines each, Not including scripts.
about half done.
Edit: counted wrong the first time.
Juicy Fonts is ~10,000 lines.
Current project is 0 lines coz I don't have one. Gone off programming.
mine is huge now, got a ton of includes, and am not even near close to finishing, and i can't even be arsed to find how many lines their is.
But it all still works right :)
Always working on several projects.
I like to precalculate stuff I store
in binary-files so the total amount
of lines are always more than the
sourcefiles alone. But 4-5000 lines
of code is about average I guess.
My current Bmax game is just over 16000 loc.
My current project source is about 368 KB (not including libraries - with libraries it's about 590 KB), although there's still alot more to do.
Red: I guess you should ask how long stuff has taken to put the figures in context. My framework time is logged at 150 hours. But only 50% of that is code, the rest is research, testing, related forum posts, marketing etc. Easter Bonus was 175 hours to add on 2000ish lines to Xmas Bonus, but most of that time was integrating the new graphics properly.
that's a good point GA... everyone who has posted might go back and insert a timeframe for their work as well, to give a more complete picture...
if many are like me, it is a lot easier to get a line count than a time count for their work, but an approximate should do... i'll look back and do that now for my stuff, but that's gonna be hard though... i don't keep track of coding time vs modelling, texturing, and other ancillary jobs involved... a rough guesstimate is all i'll be able to come up with...
--Mike
Well the Delphi code I'm working on is 320,000 lines, mostly written by me. (the compiler tells me when it builds)
I wouldn't trust that compiler dialog, as it represents library code as well. For example, this is what happens if I compile a totally blank windows project in Borland C++ Builder (I think C++ Builder 6 is exactly the same as Delphi, except it uses C++ instead of Pascal):
John J. well maybe it will put things in perspective if I say that this is the 10th year of the project and there are 258 source code files (excluding forms and resources) with a total size of 8Mb. I guess that's an average of 25 chars per line...I still only use Delphi3 and it's pretty reliable in that line count, an empty application compiles with 40 lines (and that's the form and the dpr file)
Oh, ok :). I didn't say your project was small - I just said that I didn't trust C++ Builder 6's line counter, and I thought Delphi might be similar (which is obviously not the case).
that's fine, no worries dude. It's been a long haul.
My PHP RPG www.lostpast.com, counting the site, is about +3000 lines. Not counting the site, maybe 2500, but that is a flat out guess. There are about 40 files, and I don't feel like counting again.
qoob is about 35,000 ish at the moment
keepeeuppy is about 2000
Is there an easy way to count?
Dividing my biggest file by the number of lines I get 58 lines per K. Which gives me approx 60,000 lines for Naked War.
Is there an easy way to count?
Look what I found lurking on my HD...
dropped$ = Lower$(Replace$(CommandLine$(), Chr$(34), ""))
If FileType(dropped$) <> 2 Then RuntimeError "'" + dropped$ + "' is Not a directory"
dir = ReadDir(dropped$)
total_c = 0
total_b = 0
total_r = 0
bb_file = 0
file$ = NextFile$(dir)
While file$ <> ""
code = 0
blank = 0
comments = 0
If Lower$(Right$(file$, 3)) = ".bb"
bb_file = bb_file + 1
in = OpenFile(dropped$ + "" + file$)
If (Not in) Then RuntimeError "Couldn't open '" + file$ + "'"
While (Not Eof(in))
l$ = Left$(Trim$(ReadLine$(in)), 1)
Select l$
Case ""
blank = blank + 1
Case ";"
comments = comments + 1
Default
code = code + 1
End Select
Wend
CloseFile in
total_c = total_c + code
total_b = total_b + blank
total_r = total_r + comments
Print file$ + " = " + code + " Lines : " + blank + " Blank : " + comments + " Comments"
EndIf
file$ = NextFile$(dir)
Wend
Print
Print "Total Files : " + bb_file
Print "Total Lines : " + (total_c + total_b + total_r)
Print "Total Code : " + total_c
WaitKey()
End
Ah, with that I get
Total Files : 61
Total Lines : 52811
Total Code : 24566
Nano is around 30,000 lines of code currently and I'll bet it will be lots more when finished (whenever that might be ;)...
Excluding the Spritecandy lib it's about 27000 lines and set to grow alot bigger! There's lots of comments and such in it so you can take away a couple of thousand from the actual code I guess.
ahem. (a Sibly moment)
Everyone should use Yans code to count.
It's easy when you use one BIG file to count number of lines :)
I don't know exactly but I'd hazard a guess my shootemup game is probably about 1000 lines or so at the moment. That's maybe a few months of work, but I've been doing lots of other stuff in that time and mostly those lines are the end result of various experiments and research. Largest thing I ever made was about 24,000 lines of assembler code, source file was 880k.
3D World Studio is about 1.76 mb of source. My engine in BlitzMax is only 330 kb. I have no idea about line counts, because there are hundreds of includes.
Did indiepath post something rude about his big "project" cos he's drunk? damn missed it, he's edited it...
Wrote a script to check.
24,373 lines thus far.
my current project in blitmax, which I am busy prototyping, is 1910 lines, I expect it to be much larger than that spanning over multiple files quite soon :)
Current project in blitzplus (isometric run'n'gun shooter - based loosely off an old game called Snipes) is around 3000 lines of code and is fairly complete (spread over 5/6 files). The data files it uses are quite long though compared to the code itself, particularly the sprite files.
Using Yan's code - I get
7 files with 2226 lines of code (about 3000 including blank lines)
My verlet vehicle physics engine is a mere 2500 lines of code so far ....
csp engine currently has 8580 lines of code, includes not counted, tho they are pretty small, maybe 1000 lines total.
Heres a blitzmax version of yans code, that now handles sub folders :)
Strict
Local dropped$ = Lower$(RequestDir("Choose a directory...","c:/program files/blitzmax"))
If FileType(dropped$) <> 2 Then RuntimeError "'" + dropped$ + "' is Not a directory"
Global total_c = 0
Global total_b = 0
Global total_r = 0
Global bb_file = 0
Type TFolder
Global List:TList = CreateList()
Field Link:TLink = ListAddLast(List,Self)
Field Path$
EndType
Local Folder:TFolder = New TFolder
Folder.Path$ = dropped$
Repeat
Folder = TFolder(TFolder.List.First())
ScanDir(Folder.Path)
RemoveLink(Folder.Link)
Until TFolder.List.Count()=0
Function ScanDir(dropped$)
Local dir = ReadDir(dropped$)
Local file$ = NextFile$(dir)
Local code = 0
Local blank = 0
Local comments = 0
Local in:TStream
Local l$
While file$ <> ""
code = 0
blank = 0
comments = 0
If Lower$(Right$(file$, 3)) = ".bb" And FileType(dropped$ + "" + file$)=1
bb_file = bb_file + 1
in = OpenFile(dropped$ + "" + file$)
If (Not in) Then RuntimeError "Couldn't open '" + file$ + "'"
While (Not Eof(in))
l$ = Left$(Trim$(ReadLine$(in)), 1)
Select l$
Case "" ; blank = blank + 1
Case ";" ; comments = comments + 1
Default ; code = code + 1
End Select
Wend
CloseFile in
Print file$ + " = " + code + " Lines : " + blank + " Blank : " + comments + " Comments"
ElseIf Lower$(Right$(file$, 4)) = ".bmx" And FileType(dropped$ + "" + file$)=1
bb_file = bb_file + 1
in = OpenFile(dropped$ + "" + file$)
If (Not in) Then RuntimeError "Couldn't open '" + file$ + "'"
While (Not Eof(in))
l$ = Left$(Trim$(ReadLine$(in)), 1)
Select l$
Case "" ; blank = blank + 1
Case "'" ; comments = comments + 1
Default ; code = code + 1
End Select
Wend
CloseFile in
Print file$ + " = " + code + " Lines : " + blank + " Blank : " + comments + " Comments"
ElseIf FileType(dropped$ + "" + file$)=2 And file<>"." And file<>".."
Local NewFolder:TFolder = New TFolder
NewFolder.Path$ = dropped$ + "" + file$
EndIf
total_c = total_c + code
total_b = total_b + blank
total_r = total_r + comments
file$ = NextFile$(dir)
Wend
EndFunction
Print
Print "Total Files : " + bb_file
Print "Total Lines : " + (total_c + total_b + total_r)
Print "Total Code : " + total_c
WaitKey()
Only 1052 lines of actual code so far, plus 241 lines of comments.
1300 lines or so, but I only started it a couple of weeks ago.
Gfk, as someone with a proven track record and several commercial titles produced, how are you finding BlitzMax? Are you using Grey's Framework?
I'm finding it pretty easy to use, especially now I'm getting used to the OO stuff. The number of serious bugs especially pertaining to GL drivers is quite alarming, though. There are two issues in particular that, until they're fixed, I won't feel confident enough to release my game. One is GL specific, the other is not.
No I'm not using Grey Alien's framework. Much rather figure stuff out for myself. :)
shame on you ;-) of course I understand.
There are two issues in particular that, until they're fixed, I won't feel confident enough to release my game
I haven't used Max for sometime because of things like that. To work hard on a commercial project and not be confident that it'll run ok on all systems when released is a big problem. Have you emailed BRL about those problems?
I'm looking at BlitzMax once again and some problems do seem to have been resolved. So I'll start to get my head around OOP again and start programming in the next few weeks. I probably WILL use Grey's Framework because I want the number of bugs/workarounds required minimised.
I'm posting stuff on the bug reports forum but they aren't really massive problems until the time comes that I want to release something. I guess that gives them a couple of months at least. :)
that's what I thought after posting bugs ... a couple of months ago... ;-) well I do have one more month-ish to finish the game so we'll see.
.
my current project is a 5480+ line php based
CMS.
my current bmax project is a few thousands lines so far but I except to exceed that by ALOT when its complete. My last project was in blitzplus. I never got an accurate line count but the source code files totalled 1.2MB.
Sail Away is a paltry 4,673 lines in the main file, without much in the way of comments (dont tell me I need them as I just picked the project up after nearly a year!). There are numerous includes, but none are particularly big.
about 20,000 including game source, editors, and includes as well as 2 third party libraries. If you want to count decls
config files and level files then about double that.
My current BlitzMax project is 9 files, 972 lines, 736 code. Started that yesterday.
My current C++ project is 1246 files, 736030 lines, 636461 code, but that doesn't count because its the HL2 SP SDK ;)
(I wrote about 500-1000 lines)