Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  Lines of code that fit into 4k?  (Read 2178 times)
0 Members and 2 Guests are viewing this topic.
Offline noblemaster

JGO Ninja
***

Posts: 730
Medals: 6


Age of Conquest makes your day!


« on: 2006-10-09 14:49:40 »

Can anybody tell me how many lines of code fit into 4k? I got an idea, but I am sort of afraid it won't fit?

Offline woogley

JGO Neuromancer
****

Posts: 1098
Medals: 5



« Reply #1 on: 2006-10-09 15:04:22 »

that highly depends on the game, your coding style, and the amount of graphics you use. with comments excluded, the code for Goomba4K is about 275 lines long, though it is a pretty small game to begin with (most of the space taken up by graphics)

Offline moogie

JGO Strike Force
***

Posts: 775
Medals: 5


Java games rock!


« Reply #2 on: 2006-10-09 20:06:04 »

As with what Woogley said, it depends on how you go about designing your game.

For my previous entry Java Rally Racer 4k ( http://unlimited.woogley.net/hosted/moogie/source.html ) i fit 1293 lins of code including comments into 4k. My game did not use external graphics but generated the graphics at run time.
Games published by our own members! Go get 'em!
Offline noblemaster

JGO Ninja
***

Posts: 730
Medals: 6


Age of Conquest makes your day!


« Reply #3 on: 2006-10-09 21:06:38 »

thanks for the answer guys! so 1293 including comments is not too shabby! I am planning to generate the graphics on the fly ...

Offline CaptainJester

JGO Neuromancer
****

Posts: 1138
Medals: 8


Make it work; make it better.


« Reply #4 on: 2006-10-09 21:09:44 »

My Asteroids clone was 567 lines.  Source was 24KB large.

Offline Markus_Persson

JGO Kernel
*****

Posts: 2092
Medals: 10


Mojang Specifications


« Reply #5 on: 2006-10-10 05:06:58 »

Miners is 743 lines of code (including comments), and uses no external resources. 35.8 kb.

Play Minecraft!
Offline nullterm

JGO n00b
*

Posts: 26



« Reply #6 on: 2007-01-08 17:20:10 »

Sub4K is 674 lines.

Metro4K is 688 lines.

Both including comments.
Offline appel

JGO Wizard
****

Posts: 1477
Medals: 23


I always win!


« Reply #7 on: 2007-01-09 08:32:53 »

Lines of code is not a good a indicator. I could have hundreds of identical lines of code, and it would get compressed very well zipped.

For some of my games, I notice a .java file of maybe 20-30 KB, .class file of 9-10 KB, a optimized/obfuscated .class file around 6-7 KB, and the final zip/jar file being around 4 KB.

Check out the 4K competition @ www.java4k.com
Check out GAMADU (my own site) @ http://gamadu.com/
Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.08 seconds with 21 queries.