Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (603)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  how many lines?  (Read 4937 times)
0 Members and 1 Guest are viewing this topic.
Offline fermixx

Senior Newbie





« Posted 2009-08-12 02:20:30 »

Whats up dudes, im new here and this is my first post in this wonderful forums (i've been watching them for a while).


I was wondering, just for curiosity, how many lines your game has and what kind of game it is.


To start with this, in my case i have:


Lines: 2400+ aprox
Game: 3 ways, castle at left, enemies come from right. tower + unit defense
Status: unfinished (80% done)


guess you are more pro than i. So how about you guys?

RTS game or a big rock-paper-sissors ?
Offline SimonH
« Reply #1 - Posted 2009-08-12 04:02:08 »

2400 sounds ok - if you indent like I do then about half of them will be '{' or '}' anyway! The main thing is to keep the code readable (good structure, plenty comments).

People make games and games make people
Offline jezek2
« Reply #2 - Posted 2009-08-12 07:15:40 »

Line count is not much good factor to rate anything... clever things can be very small in line counts and bad code can be big in line count... What really matters is if the game is fun Smiley

But anyway, it's kinda interesting and I've didn't count it yet for my project, so here it is:

Lines: 43188 in 324 files
Game: online FPS
Status: heading to public alpha after 2 years of development

Additionally I've created some bigger libraries that I use in the game, like JBullet (46962 lines in 249 files) and GUI library based on heavily modified Swing library (213801 lines in 588 files, dunno how many are written by me, but nothing small either and there is some overhead for license blocks in each file).
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline kevglass

« JGO Spiffy Duke »


Medals: 212
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #3 - Posted 2009-08-12 08:03:40 »

You might be better to count NCSL (non comment source lines)

Kev

Offline markmistry

Junior Devvie





« Reply #4 - Posted 2009-08-12 08:55:43 »

dunno thousands but hey cant you stick it all on one big long line ? file size is the key im trying to make mine smaller so it downloads qicker.
Offline JuddMan

Senior Devvie


Medals: 1


Your Ad Here


« Reply #5 - Posted 2009-08-12 10:15:07 »

What really matters is if the game is fun Smiley

Quoted for truth.

JMTetris: 3596 (100%)
2D tile map editor: ~3500 (??%)

By the way jezek2, is that FPS a commercial project?
Offline jezek2
« Reply #6 - Posted 2009-08-12 10:53:23 »

By the way jezek2, is that FPS a commercial project?

Yes. I work on it as a half-time job (sponsored by other activities). I'm doing mostly everything from coding to modelling/texturing/animating. I'm not doing the project entirelly alone, but the others can't do much actual work (or not until some core things like editor are usable enough for someone else to actually use it without problems), but we're discussing every detail a lot Smiley

Here are some earlier videos: ragdoll.avi and walking.avi.
Offline fermixx

Senior Newbie





« Reply #7 - Posted 2009-08-12 17:24:05 »

i know the lines are not something to calculate anything.

i mean, lots of few lines dont mean a good or bad game, nor a well or bad coded algorithm.


its just for curiosity/fun, not to make a deep analysis about anything Smiley


Btw that online fps looks good, looking forward to see it in action (im dloading ragdoll.avi but its going to take like 25 mins to dload  Undecided)

RTS game or a big rock-paper-sissors ?
Offline princec

« JGO Spiffy Duke »


Medals: 435
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #8 - Posted 2009-08-12 18:36:16 »

Is there an Eclipse plugin wot can calculate all this stuff automatically for me?

Cas Smiley

Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #9 - Posted 2009-08-12 19:33:43 »

wc -l stopped working ? Roll Eyes

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline teletubo
« League of Dukes »

JGO Ninja


Medals: 48
Projects: 4
Exp: 8 years



« Reply #10 - Posted 2009-08-12 19:38:42 »

Is there an Eclipse plugin wot can calculate all this stuff automatically for me?

Cas Smiley

http://www.easyeclipse.org/site/plugins/stateofflow-metrics.html

I dunno if that's the same I use at home, but probably is the same thing

Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #11 - Posted 2009-08-12 20:08:04 »

Some projects I did:

Agent: 00PK (platformer):
26128 lines

Best Game Evar 2 (RPG):
10666 lines

Image Manager UI:
1460 lines

A Lasting Impression (Game for JGO Comp 2008 (84 hours)):
4832 lines

Mario clone:
4484 lines

Adaptive ballistic AI:
707 lines

Lego City Ransom (Game for Retro Remakes competition (River City Ransom clone + more)):
7616 lines

Tetris clone (bare-bones):
447 lines

Tool for flattening OBJ models into sprites:
6067 lines

Sinuosity game:
4783 lines

java.awt.Robot with a lot of UI and options:
2068 lines

Tool that splits up and creates sprite sheets:
2179 lines

Newtonian physics simulator:
1336 lines

Video capture program:
763 lines

Level editor for iPhone game:
4772 lines

Worms clone:
2185 lines

Wikipedia searcher / game:
1793 lines

:-) Most of these are not done.

See my work:
OTC Software
Offline h3ckboy

JGO Coder


Medals: 5



« Reply #12 - Posted 2009-08-12 20:11:29 »

dont you think that 26000+ lines is a bit much lol Tongue
Offline lhkbob

JGO Knight


Medals: 32



« Reply #13 - Posted 2009-08-12 20:41:31 »

dont you think that 26000+ lines is a bit much lol Tongue
47685 lines just for my graphics engine, but a lot of that is documentation

Offline h3ckboy

JGO Coder


Medals: 5



« Reply #14 - Posted 2009-08-12 20:48:05 »

47685 lines just for my graphics engine, but a lot of that is documentation

that is just insane!
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #15 - Posted 2009-08-12 20:56:47 »

dont you think that 26000+ lines is a bit much lol Tongue
Clearly not, because there was still plenty left to write.

But that game included, aside from the game engine, a few different learning algorithms for AI, physics, a level editor, texture wrappers/loaders for OpenGL from scratch, and a lot of other junk. To just make any old platformer, you can do that in much less (like my Mario clone with 4484 lines, which also included a level editor), but it was my senior capstone project for college so I had to (well... I wanted to) include a lot of other stuff. Two of the things I studied in college were AI and physics, so I wanted to make sure those sections of the game were complete and tightly done. Both the physics and the AI in the game are total overkill - it's really not very fun, because I spent so much more time on the technical aspects than the gameplay.

See my work:
OTC Software
Offline Nate

« JGO Bitwise Duke »


Medals: 158
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #16 - Posted 2009-08-13 02:15:39 »

SingSong is a competitive singing game: http://singthegame.com/
NCSL in SingSong: 16708
NCSL in Slick (only the parts SingSong uses): 16988
However, line counts from many other project aren't included: LWJGL, TWL, YamlBeans, XPP3, etc

I used this perl script to count the lines:
http://www.reasoning.com/downloads/java_line_count_estimator.html

Offline JL235

JGO Coder


Medals: 10



« Reply #17 - Posted 2009-08-14 01:36:18 »

My largest project was my programming language with interpreter, a small standard library and editor. In total 24,106 lines. I never got around to finishing the editor or the language. My main big project right now is my constantly ongoing rapid-development game framework which is 10,382 lines. The games I've made with it range from 117 lines (Pong Out) to 13,110 (called Sokoban Supreme).

I personally don't think line numbers are good or bad on their own, most of the problems people have with counting lines is about the details (like including empty lines) or about the workplace (with over-authoritarian managers). It's a statistic, nothing more, and so making predictions based on one value is kinda flawed. However typically there is some truth behind the numbers. With my numbers above, PongOut was written entirely today and features 1 continuous level, whilst Sokoban took me over 6 months (on and off) and features 250 levels.

But despite that, I also don't think it's a good thing for developers to work with their line count in mind.

Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #18 - Posted 2009-08-14 14:29:54 »

I also don't think it's a good thing for developers to work with their line count in mind.
But it can be nice to be proud of how many lines you yourself have placed down into your game, or util, or whatever. A lot of work.

See my work:
OTC Software
Offline fermixx

Senior Newbie





« Reply #19 - Posted 2009-08-14 17:48:41 »

But despite that, I also don't think it's a good thing for developers to work with their line count in mind.

Totally agree. in facts i've only counted the lines once, just to measure something.

You know humans need to measure everything to see how it's going.


Measuring time could be useful too, but some people (like me) arent working all days with the games, so maybe saying one week when i've only coded for 3 hours or so its not a good measuring system.


The original purpose was to see how was i going. i.e. if i've coded too many or too few lines

RTS game or a big rock-paper-sissors ?
Offline JL235

JGO Coder


Medals: 10



« Reply #20 - Posted 2009-08-14 19:10:41 »

The problem is that people start to see the number of lines they write as one of their priorities or tasks. They partially concentrate on ensuring they have written lots of lines each day or week, which impedes on the more important task of building games and tools.

Offline lithos

Junior Devvie


Medals: 1
Projects: 1



« Reply #21 - Posted 2009-08-15 02:56:11 »

A little under 2300 lines of code.   Granted The code is insanely "spaced" so that reading can be browsed faster(3 lines of empty space between methods is very easy to find, one line between "thoughts" is fast, having the '{' on a line is just plain easy to spot).   

This is for an unfinished platformer: physics, resource manager, simple rendering, and a few other minor things.

There are no such things as bugs...  Only happy accidents.
Offline pjt33
« Reply #22 - Posted 2009-08-15 13:53:16 »

My Java4k submission from last year is about 2750 lines.

I've worked on a project which used software rendering. The code to render a single triangle (taking into account that it supported different types of shading and flat colour vs texture) was several thousand lines of code by itself.
Offline Jackal von ÖRF

Junior Devvie





« Reply #23 - Posted 2009-08-15 16:06:50 »

My current project is an application server for online games. It's still at pre-alpha stage. When I calculated its size a couple of months ago (excluding comments and empty lines), it had 4400 SLOC production code and 7300 SLOC test code (90-95% line coverage). I'm changing its architecture to handle concurrency better (message-passing instead of shared mutable state), which means rewriting maybe one fourth or third of it before it will again begin to grow in size (I just deleted its garbage collector and next I will replace major parts of its task scheduler and database).

Lines of code is good for measuring how big an application is. It's bad for measuring how good the code is or how productive a programmer is, not to even mention how useful the application is to its users. Good code is usually much shorter than bad code. Two projects may be of equal size in lines of code, but one of them might be much easier to extend because its code is factored much better. Two projects may have as much test code and equal code coverage, but one of them might be easier to maintain because its tests are better decoupled from the implementation details, document better why some code was written, run faster, are more reproducible etc.

Offline skinny boy

Junior Devvie





« Reply #24 - Posted 2009-09-02 06:47:04 »

Yes. I work on it as a half-time job (sponsored by other activities). I'm doing mostly everything from coding to modelling/texturing/animating. I'm not doing the project entirelly alone, but the others can't do much actual work (or not until some core things like editor are usable enough for someone else to actually use it without problems), but we're discussing every detail a lot Smiley

Here are some earlier videos: ragdoll.avi and walking.avi.

2 jesek2:

the dragging of the figures looks really natural
and even though you get 13-15 frames, the animation is really smooth
i would appreciate it if you could tell me just the names of the tecchniques you use
(if they are common in game development/3d design. in case you use your own, then thank you for the inspiration)
i am new at game programming (hobbiest) , btw
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (37 views)
2014-12-15 09:26:44

Mr.CodeIt (31 views)
2014-12-14 19:50:38

BurntPizza (62 views)
2014-12-09 22:41:13

BurntPizza (99 views)
2014-12-08 04:46:31

JscottyBieshaar (60 views)
2014-12-05 12:39:02

SHC (74 views)
2014-12-03 16:27:13

CopyableCougar4 (77 views)
2014-11-29 21:32:03

toopeicgaming1999 (138 views)
2014-11-26 15:22:04

toopeicgaming1999 (127 views)
2014-11-26 15:20:36

toopeicgaming1999 (38 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!