Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / just curious, how long is your code??

Author
Message
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 19th Jun 2007 05:04
?? how many lines of code do u have in your game??
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 19th Jun 2007 05:24
Pirates of Port Royale's Engine just surpassed 6000 lines, plus another 4500 for the World Editor.


Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 19th Jun 2007 05:29 Edited at: 19th Jun 2007 05:31
Geisha House is a bit more than 20,000 lines. All of the scripts are around another 5000 lines.


Come see the WIP!
Manic
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Completely off my face...
Posted: 19th Jun 2007 11:18
my code is 8 inches long

I don't have a sig, live with it.
Roxas
19
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 19th Jun 2007 14:08
My rpg project is currently : 4 773 lines long!


[B] - LINKIN PARK - [/B]
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 19th Jun 2007 14:12
My code is about 30k lines. So far it's just ASCII patterns.

Quote: "my code is 8 inches long "

I believe you spelt 'nose' wrong.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
tha_rami
18
Years of Service
User Offline
Joined: 25th Mar 2006
Location: Netherlands
Posted: 19th Jun 2007 14:23
My code for Awakening was about 4000 lines when I dropped it in favor of Seadome.

Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 19th Jun 2007 14:32
I think Claymore Island was about 16000, and ODF was about 12000. Hoverracing is about 500 at the moment.


Dazzag
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Cyprus
Posted: 19th Jun 2007 14:36
Hehehe. Like the sig Fallout. Sums things up pretty much for the majority of us But it's the trying that counts eh? I actually mean that, I'm not being sarcy. Dunno what the hell is going on in the background of your sig though...

Oh, and think my biggest DB project was about 20k lines of code, not that I can find it anymore. Although the system we use at work has 6000+ programs, which I've personally created or modified probably at least 50% over the last decade or so.

Cheers

I am 99% probably lying in bed right now... so don't blame me for crappy typing
Current fave quote : "She was like a candle in the wind.... unreliable...."
Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 19th Jun 2007 14:39
haah. Cheers mate. Yeah, it's just fun at the end of the day. Most of us get over our delusions of grandeur and keep it as a hobby.

The background was once clear, but I butchered it with too much text. From left to right we have a chopper blowing up in ODF over a desert landscape, then we have the monastry church from Claymore Island, then a tunnel from CI, and then Drake in a forklift truck, a woman with an AK47 an the monastry entrance. A nice mish mash of random screenshots.


Dazzag
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Cyprus
Posted: 19th Jun 2007 14:50
Ok. Replace it will a piccy of your car and get rid of the wheels (Scouser stype) and replace with jets. Ta da - Hover racing.

Completely unfinished. Funny. Although I do get normally really quite close. Shame about one completely not working in XP and another completely not working after a DBC upgrade years ago (and I can't find the code). Sigh.

Cheers

I am 99% probably lying in bed right now... so don't blame me for crappy typing
Current fave quote : "She was like a candle in the wind.... unreliable...."
Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 19th Jun 2007 14:53
I've never seen any of your games mate. Screenshots!


Dazzag
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Cyprus
Posted: 19th Jun 2007 14:57
Thats what the Web link is for (projects). God Fallout you are such a n00b!

And I wouldn't worry about it, they are covered in dust now.

Cheers

I am 99% probably lying in bed right now... so don't blame me for crappy typing
Current fave quote : "She was like a candle in the wind.... unreliable...."
Pricey
21
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 19th Jun 2007 16:30 Edited at: 19th Jun 2007 16:31
i have no idea how your code gets so long
over the past few years i've been constantly re-writing and re-fining the original quest engine, to try and improve my coding skills and make the best RPG engine i can

currently, my main source file is 1553 lines
my editor is 412 lines
and my core functions, which are in a separate file come to 486 lines

my main source is totally split into functions and subroutines with my main loop looking like this



the engine is very adapatable and easy to program / script
it isn't the most beautiful thing in the world, but it has a consistant graphical style and runs VERY fast

screenshot enclosed

also, the only plugin I have used is Goga's free plugin to make file management in the editor much easier, i programmed all the lighting, AI and collision myself

Attachments

Login to view attachments
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 19th Jun 2007 16:42
Quote: "1553"

Damn. My variable declarations are longer than that.

Quote: "i have no idea how your code gets so long"

Because I code and code and code and code, constantly adding more and more to my game.

I didn't even think to mention that in addition to my 20,044 lines of code + 5k lines of scripts, I have another 3k of lines of code that went into the plugin that I made for the game, and that will soon get a 2k line increase. I also use tons of plugins, which substantially increases the amount of code associated with the game.

Quote: "also, the only plugin I have used is Goga's free plugin to make file management in the editor much easier, i programmed all the lighting, AI and collision myself"

Before you should 'not understand' what everyone else is doing, you should understand what you are doing. I played your game. It was an interesting puzzle adventure game. It was not a complex game. Thus, I understand why the source code is so compact.

I truly believe that not using Sparky's collision DLL is silly. It's way faster than ANYTHING else, extremely powerful, easy to use, and free. I also think that plugins are DBP's greatest strength.


Come see the WIP!
GatorHex
19
Years of Service
User Offline
Joined: 5th Apr 2005
Location: Gunchester, UK
Posted: 19th Jun 2007 16:49 Edited at: 19th Jun 2007 16:49
Dino Hunter 1676 all in one file.

War MMOG 1123 and growing but split over 3 files this time.

Learned a lesson there

Dazzag
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Cyprus
Posted: 19th Jun 2007 16:55
Yeah, my MUD for the adventure game competition (if I have time to finish it) is only at about 1100 lines (3 dba files) and I can't see it going above about 3k. Hell, half of that is an animated plasma cloud that I thought would look cute in the background.

Cheers

I am 99% probably lying in bed right now... so don't blame me for crappy typing
Current fave quote : "She was like a candle in the wind.... unreliable...."
Grandma
18
Years of Service
User Offline
Joined: 26th Dec 2005
Location: Norway, Guiding the New World Order
Posted: 19th Jun 2007 16:56
Mine weights at about 13.000 lines and the editor at 6.500, nicely half the size.

Operation Mockingbird
Pricey
21
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 19th Jun 2007 16:59 Edited at: 19th Jun 2007 17:00
i appreciate, that at the moment my game is a lot simpler than yours, but due to the way it is coded, it has a lot of scope for expansion, and i should add is not complete, there is still much to add.

i don't use Sparky's collision DLL, because long before i discovered it, i coded my own library of fast and accurate maths collision commands, which i can adapt to my needs very easily, i don't use any other plugins simply because i have no need for them, or i can't afford them, i find it much more rewarding to code something yourself, and try to optimise it down to as few lines as possible, rather than to use code that someone else has made, though i appreciate that it is always useful to learn from other people's code.

by the way, i think Geisha house looks fantastic, and can't wait for it to be completed

GatorHex
19
Years of Service
User Offline
Joined: 5th Apr 2005
Location: Gunchester, UK
Posted: 19th Jun 2007 17:11
Making everything into re-useable functions helps to keep your coding down. The first thing a newbie coder does when they want to re-use something is copy and paste it! I know it's true i was there once!

Dazzag
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Cyprus
Posted: 19th Jun 2007 17:32
Quote: "Making everything into re-useable functions helps to keep your coding down"
Yep, generic and modular is the way. Saying that though, it is not so easy in practise, regardless of how much experience you have. Sometimes you just cannot be bothered and bung it in some new code anyway. Where I work if the almost what you want existing routine is well complicated and written by someone else who left the company in 1991 then you sometimes just reinvent the wheel because you know what you are doing. Not right, and not the most efficient (especially when you come to make a mod in the future and it turns out you have to now change both routines - make that 20 routines and you are well annoyed), but sometimes the easiest way when you are annoyed and just want to go to the pub

Cheers

I am 99% probably lying in bed right now... so don't blame me for crappy typing
Current fave quote : "She was like a candle in the wind.... unreliable...."
Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 19th Jun 2007 17:46
Don't forget though, numbers will vary wildly depending on your coding style. Some people use colons and put multiple commands on one line *shudders in fear*. Other people use loads of comments and lots of spaces between lines, turning 10 lines of code into 30. So really, lines of code probably isn't the actual number of commands for most people.

I know for a fact Cash separates all his function definitions with an ASCII drawing of a different farm yard animal every time, and they're very very detailed.


Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 19th Jun 2007 18:03
Nanoid is 7646 lines (embedded editor)
OIE is 5367 lines (+2482 for editor)
Typing Pool is 2477 (no editor)
Ghoulhunters is 6011 (embedded editor)
Illogic is 4058 (embedded editor)

It's probably more than it sounds because I tend not to use comments and fancy stuff like that, plus I'm what you might call a minimalist coder.


Good guy, Good guy, Wan...
Nack
21
Years of Service
User Offline
Joined: 29th Jul 2003
Location:
Posted: 19th Jun 2007 18:57
My current project have around 38000 - 40000 lines of code, maybe more if i count the scripts.


Beta Level out! Check it out. =]
http://s7.invisionfree.com/NacksBunkie/
NeX the Fairly Fast Ferret
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 19th Jun 2007 19:02
The biggest I have ever managed was 3874. It was a fully working Super Smash Bros clone which I am considering continuing.


Since the other one was scaring you guys so much...
Data
19
Years of Service
User Offline
Joined: 26th Nov 2004
Location: Winnipeg,Canada
Posted: 19th Jun 2007 19:10
@NeX the Fairly Fast Ferret

You made a Smash Bros Clone? Perhaps you could help us out here: http://forum.thegamecreators.com/?m=forum_view&b=19&t=91842&p=0
We got a lot of world and character modelers and a few programmers to, please check it out.
Agent Dink
20
Years of Service
User Offline
Joined: 30th Mar 2004
Location:
Posted: 19th Jun 2007 19:11
My biggest is like 6000+ lines of code. Not too big really.

Free music, textures, models, and tutorials.
Silver Dawn
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 19th Jun 2007 19:41
My scripting language is only around 3300 lines

Tom J
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: Essex, England
Posted: 19th Jun 2007 19:47 Edited at: 19th Jun 2007 19:48
My game is 1300 lines at the moment, but most of that is simply the levels (I'm using the data command to make them). But that number will be growing quickly

Text adventure competition 2007 - Click here to find out more
NeX the Fairly Fast Ferret
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 19th Jun 2007 20:15
The code uses rotated 2D plains at the moment, which come together to make an easily animated 2D sprite. Like this.


Since the other one was scaring you guys so much...

Attachments

Login to view attachments
Pricey
21
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 19th Jun 2007 20:17
yeah, i separate chunks of code with spaces
but comments are not for me
and colons are great for keeping related commands together
for example, it makes sense to create a box, texture, rotate and position it all on the same line, rather than to do it all on separate lines

Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 19th Jun 2007 20:42 Edited at: 19th Jun 2007 20:42
my last project was *goes and checks* 7336 lines...

it was great when it was 7331 lines... because it was 1337 backwards... which makes me backwards-1337... or maybe un-1337

One man, one lawnmower, plenty of angry groundhogs.
Josh
21
Years of Service
User Offline
Joined: 7th Dec 2002
Location: Pompey, Great Britain =D
Posted: 19th Jun 2007 20:44
My biggest was around 40,000 for a Project Management System. Which I've now scrapped because I've learnt how to actually write compact and efficient code!

But we might think a few thousand is a lot, Windows Vista has over 50 Million lines of code.

Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 19th Jun 2007 20:51
Quote: "yeah, i separate chunks of code with spaces
but comments are not for me
and colons are great for keeping related commands together
for example, it makes sense to create a box, texture, rotate and position it all on the same line, rather than to do it all on separate lines"


I space between the beginning of subroutines and the ends, like this:


and larger if...endif statements (more than about 30 lines). I never comment my code (bad habit, I know), but since I'm the only one that sees it, it doesn't really matter. I use variables named after what they do, as well as subroutines to divide everything up, so it's fairly easy to manage. I never use colons, it annoys me to have more than one command per line .


Hobgoblin Lord
19
Years of Service
User Offline
Joined: 29th Oct 2005
Location: Fall River, MA USA
Posted: 19th Jun 2007 22:42
Unleashed is around 3200 lines long, the text files all my scripts are in on the other hand.

PAGAN_old
18
Years of Service
User Offline
Joined: 28th Jan 2006
Location: Capital of the Evil Empire
Posted: 20th Jun 2007 02:34
Quote: "my main source is totally split into functions and subroutines with my main loop looking like this
"


I use that method also. Its more organized.

my code, including all the functions is, don't laugh!





450 lines!





ok its more like 375 lines because of all the comments, commented out code and empty spaces

dont hate people who rip you off,cheat and get away with it, learn from them
Kevin Picone
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 20th Jun 2007 02:52
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 20th Jun 2007 03:59
Quote: "Conservatively about 200K lines.."

For what game ? Either you have a massive game going or all of it's data is read from data statements.


TKF15H
21
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 20th Jun 2007 04:04
I can't remember how many lines of code my Dreamcast emulator had, but it was around 15mb of pure C code for the processor core.
My portable DBP compiler was much smaller, probably around 4k lines.

Grandma
18
Years of Service
User Offline
Joined: 26th Dec 2005
Location: Norway, Guiding the New World Order
Posted: 20th Jun 2007 14:02
Quote: "For what game ?"


A rather long text adventure probably.

Operation Mockingbird
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 20th Jun 2007 14:04
earth to people, come in people! housten!

kevin from what i understand, is the creator of playbasic.
http://playbasic.thegamecreators.com/

Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 20th Jun 2007 14:11
I'm guessing the 200k lines Kevin is dealing with is for PlayBasic. I don't think I've coded 200k lines in all my codings put together!


Good guy, Good guy, Wan...
Dazzag
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Cyprus
Posted: 20th Jun 2007 14:37
Quote: "A rather long text adventure probably"
Heh, yeah, of novel proportions. Plus all done not using text files or databases but rather DATA statements, or dread I say it, IF and TEXT statements with a new subroutine for every single location (with long and short descriptions of each room). Nice

Cheers

I am 99% probably lying in bed right now... so don't blame me for crappy typing
Current fave quote : "She was like a candle in the wind.... unreliable...."
MikeB
17
Years of Service
User Offline
Joined: 5th Apr 2007
Location: My Computer, Shropshire, England
Posted: 20th Jun 2007 14:39
Quote: "Quote: "For what game ?"

A rather long text adventure probably. "


Playbasic??

He is the person who wrote it.

E.D.


Shame I can't change my name
Dazzag
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Cyprus
Posted: 20th Jun 2007 14:47
Yeah, we know. It was kinda a joke.

Cheers

I am 99% probably lying in bed right now... so don't blame me for crappy typing
Current fave quote : "She was like a candle in the wind.... unreliable...."
Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 20th Jun 2007 14:56
I could've made playbasic in 12 lines of code. End of. Respect.


Dazzag
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Cyprus
Posted: 20th Jun 2007 15:07
Heh, that would be VeryBasic TM. Fits in the code snippet forum though. The 2 commands it would handle (TEXT and END) would be perfection in syntax, but it wouldn't do anything else...

Cheers

I am 99% probably lying in bed right now... so don't blame me for crappy typing
Current fave quote : "She was like a candle in the wind.... unreliable...."
Mike Inel
21
Years of Service
User Offline
Joined: 14th Feb 2003
Location: Sa upuan ko po...
Posted: 20th Jun 2007 15:48
My longest was approx 16000... (Illusion of the Tower)

hexGEAR
22
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Naytonia
Posted: 20th Jun 2007 17:52 Edited at: 20th Jun 2007 17:56
Call of the Dragon was about 25,000 lines of code, if you include the editor then that's about 30,000 lines of code. The game takes just over 2 minutes to compile!

debugging = not fun!

NeX the Fairly Fast Ferret
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 20th Jun 2007 18:25
You guys obviously don't code too efficiently. 25000 lines of code? How did you amass that much? Was everything hardcoded? Lots of empty space? Too many comments?


Since the other one was scaring you guys so much...

Login to post a reply

Server time is: 2024-11-18 21:46:02
Your offset time is: 2024-11-18 21:46:02