[quote]That would make for a fun java game jam/contest. Instead of “under 4k”, “in 48 hours”, etc, we could have a “best game with less than 500 lines of code” contest.
[…]
Could be a fun idea down the road.
[/quote]
A more interesting approach would be to only measure the opcode count: this way it wouldn’t encourage excessively obfuscated code or discourage meaningful naming conventions.
$ cloc .
217 text files.
183 unique files.
1750 files ignored.
http://cloc.sourceforge.net v 1.60 T=2.57 s (51.0 files/s, 6284.8 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Java 111 1917 2809 9108
XML 19 18 0 1980
Ant 1 47 14 240
-------------------------------------------------------------------------------
SUM: 131 1982 2823 11328
-------------------------------------------------------------------------------
My haskell programs tend to be much smaller, though. But I cannot compare so easily, because the kind of code I write in haskell is different from the code I write in java (mostly not about games).
How about simply a character limit like, idk, 100000 characters and then make all the coders review the coding style / beautifulness of the code and the game that has the nicest code wins? maybe?
Naku The Cat has about 3k lines. Though during the last weeks before release my code started to get very messy. I guess I could shave line count a lot if I ever happen to bother.
Once upon a time on my Vic-20 (with 16K RAM expansion) I wrote a program that took 19 seconds to list. It was a Logo interpreter (with a smattering of machine code to draw hires lines, which I cribbed from a book). And who said Commodore BASIC was rubbish 8)
The longest code I wrote was in my old job, while porting a very old ERP to something “more visual”. Around 200K lines or so, with the worst and more obfuscated language that exists in the universe :cranky:
And as the longest personal work, there where 2 and I’m not sure which where longer (around 20K lines). One was something like a Windows OS I wrote more than 20 years back in C, and the other a shooter for the Nintendo GameBoy Color.