fermixx
Senior Newbie 
|
 |
«
Posted
2009-08-12 04: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 ?
|
|
|
SimonH
|
 |
«
Reply #1 - Posted
2009-08-12 06: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).
|
|
|
|
jezek2
|
 |
«
Reply #2 - Posted
2009-08-12 09: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  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!
|
|
kevglass
|
 |
«
Reply #3 - Posted
2009-08-12 10:03:40 » |
|
You might be better to count NCSL (non comment source lines)
Kev
|
|
|
|
markmistry
|
 |
«
Reply #4 - Posted
2009-08-12 10: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.
|
|
|
|
|
JuddMan
|
 |
«
Reply #5 - Posted
2009-08-12 12:15:07 » |
|
What really matters is if the game is fun  Quoted for truth. JMTetris: 3596 (100%) 2D tile map editor: ~3500 (??%) By the way jezek2, is that FPS a commercial project?
|
|
|
|
|
jezek2
|
 |
«
Reply #6 - Posted
2009-08-12 12: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  Here are some earlier videos: ragdoll.avi and walking.avi.
|
|
|
|
|
fermixx
Senior Newbie 
|
 |
«
Reply #7 - Posted
2009-08-12 19: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  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  )
|
RTS game or a big rock-paper-sissors ?
|
|
|
princec
|
 |
«
Reply #8 - Posted
2009-08-12 20:36:16 » |
|
Is there an Eclipse plugin wot can calculate all this stuff automatically for me? Cas 
|
|
|
|
Matzon
|
 |
«
Reply #9 - Posted
2009-08-12 21:33:43 » |
|
wc -l stopped working ? 
|
|
|
|
Games published by our own members! Check 'em out!
|
|
|
|
Eli Delventhal
|
 |
«
Reply #11 - Posted
2009-08-12 22: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.
|
|
|
|
h3ckboy
|
 |
«
Reply #12 - Posted
2009-08-12 22:11:29 » |
|
dont you think that 26000+ lines is a bit much lol 
|
|
|
|
|
lhkbob
|
 |
«
Reply #13 - Posted
2009-08-12 22:41:31 » |
|
dont you think that 26000+ lines is a bit much lol  47685 lines just for my graphics engine, but a lot of that is documentation
|
|
|
|
h3ckboy
|
 |
«
Reply #14 - Posted
2009-08-12 22:48:05 » |
|
47685 lines just for my graphics engine, but a lot of that is documentation
that is just insane!
|
|
|
|
|
Eli Delventhal
|
 |
«
Reply #15 - Posted
2009-08-12 22:56:47 » |
|
dont you think that 26000+ lines is a bit much lol  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.
|
|
|
|
|
|
JL235
|
 |
«
Reply #17 - Posted
2009-08-14 03: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.
|
|
|
|
Eli Delventhal
|
 |
«
Reply #18 - Posted
2009-08-14 16: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.
|
|
|
|
fermixx
Senior Newbie 
|
 |
«
Reply #19 - Posted
2009-08-14 19: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 ?
|
|
|
JL235
|
 |
«
Reply #20 - Posted
2009-08-14 21: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.
|
|
|
|
lithos
|
 |
«
Reply #21 - Posted
2009-08-15 04: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.
|
|
|
|
|
pjt33
|
 |
«
Reply #22 - Posted
2009-08-15 15: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.
|
|
|
|
|
Jackal von ÖRF
|
 |
«
Reply #23 - Posted
2009-08-15 18: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.
|
|
|
|
skinny boy
|
 |
«
Reply #24 - Posted
2009-09-02 08: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  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
|
|
|
|
|
|