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.

Newcomers DBPro Corner / 700 lines of code later..

Author
Message
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 20th Mar 2008 15:52
700 Lines later and i still dont have a game?
I have some functions, some procedures and so on, but nothing to play as such. Everything works lovely but no game!

Is this normal for an RPG / MORPG to have this many lines of code but still not very playable?

I'm just wondering what a general amount of lines would be for a MMORPG - has anyone exceeded 2000 lines and so on?

Does it -really- matter?

ta

Paul
ChrisS
21
Years of Service
User Offline
Joined: 24th Apr 2003
Location:
Posted: 20th Mar 2008 15:59
Hello Paul

Its a bit like asking how long a bit of string is.

It really depends on what you are trying to acheive, you could write a RPG in 700 or 70000 lines of code.

How ambitious are you being, could you give us a background of what you are aiming for? Is it 2d, 3d, text based.

how about posting some code? I would like to see what you have.
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 20th Mar 2008 16:10
Well I haven't posted in the wips forum yet as its not playable enough for feedback, but im quite pleased with my progress so far,

it will be an adventure style RPG with quests and stuff, with online interaction with other characters - various ideas im playing with at the min..

I was just trying to gauge if the amount of lines in a program effected the speed it runs at etc..

yes i guess my question is a bit useless but im on a rest day today and have nothing better to do :/

Paul
ChrisS
21
Years of Service
User Offline
Joined: 24th Apr 2003
Location:
Posted: 20th Mar 2008 16:13
Paul

Well all the best with the game. 700 lines of code isnt that big, just keep going and Im sure you will have something up and running shortly.

Look forward to seeing it in WIP sometime.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 20th Mar 2008 18:05
700 lines is a very small amount of code. I would expect to write much more than that just to create the supporting functions, before I even start the main game section.

FPSC is around 30,000 lines, if I remember correctly. FPSC X10 is > 40,000 lines.
Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 20th Mar 2008 18:27 Edited at: 20th Mar 2008 18:28
An mmorpg? I presume your C++ server is going to be wayyy over 700 lines, and your client side dbpro code to be at least 10,000 lines.

Just saying, an mmorpg is going to be tons of lines.

You can't see results right away. You have to work for what you want to see in your games


Sig by BiggAdd.
Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 20th Mar 2008 20:06
Really 7000 for a 2d shoot em up?! crikey i'd love to see what you've achieved! must be epic!

Yeah maybe i've done things arse about face? i've started with functions to support the main game first - at the minute im sort of aimlessly creating little subroutines and features but with no real direction or planning - i mean i can jump, and walk, and everything else is inventory and stuff, so i suppose i should really draw some plans up!

I've got some server side stuff running in c++ at the moment but i'll be honest i do struggle with it so i might have to pull something out of the bag on that one,

cheers for your enthusiasm/comments anyway keeps me inspired!

Paul
Kevin Picone
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 20th Mar 2008 20:11 Edited at: 20th Mar 2008 20:11
This thread might give you an idea of how long others people programs are.

Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 20th Mar 2008 23:27
oh wow, cheers for that, some mammoth projects on there i see!

will get to a decent stage and post in the wips section
(the missus is quite arty and should be giving me a decent name and stuff as im useless with creativity!)

i've also decided to start some form of todo list / work log so i know where ive come from and where the hell im going! (and maybe this will be posted with my wip thread when i get a bit further down the line)

Paul
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 22nd Mar 2008 07:26
Yeah 700 is only the start of an RPG, and more so an MMORPG . The PoPR Engine isn't finished and it has 10482 lines, and that doesn't include the world editor for it which is another 8038 lines .


Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 22nd Mar 2008 17:22
`line 1
`line 2
...
`line 800
...
`line 10481
print "this is a big game!"

heh

Paul
TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 23rd Mar 2008 07:23 Edited at: 23rd Mar 2008 07:26
Quote: "i've also decided to start some form of todo list / work log so i know where ive come from and where the hell im going!"
A Design Document is a Good Idea. IMHO, the number of lines of code isn't the best gauge of success.

Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 23rd Mar 2008 11:27
well i think i may have a 'good' RPG by the time i get to 3000 if im honest.. i suppose its just all the "little" details and features that make a game great! (and take so long to make)

Paul
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 24th Mar 2008 00:57
Don't worry about line #'s, just program what needs to be programmed and when it's done it's done .


StevetS
20
Years of Service
User Offline
Joined: 19th May 2004
Location:
Posted: 28th Mar 2008 15:46 Edited at: 4th Apr 2008 14:42
Quote: "i've also decided to start some form of todo list / work log so i know where ive come from and where the hell im going!"


Good idea! 700 lines is easily manageable but the more you add in the harder its going to be to keep track of - you want to start thinking about change control now before stuff gets out of hand and you find yourself using variables like 'fred' and 'dave' (which you'll mean to change later but never get round to)

Another tip - break your functions up and work on them outside your main code, make sure they do what they should before you add them in then test them before you go onto the next one.

Showing stuff on screen is easy with relatively little code (thats the beauty of DB and DBP - does the hard shiny graphicky stuff for us!) It's good and proper that you have more going behind the scenes (in my opinion) and I'll sleep more soundly knowing it.

Mind there's some awesome games in the *20* line code challenge!

da power pwnerer
18
Years of Service
User Offline
Joined: 28th Jul 2006
Location: Pittsburgh, PA
Posted: 29th Mar 2008 18:03
It's the 20 line code challenge...



-Dan


http://Freewebs.com/noobisoft
Come to Noobisoft's website today!
jasonhtml
20
Years of Service
User Offline
Joined: 20th Mar 2004
Location: OC, California, USA
Posted: 29th Mar 2008 19:10
number of lines really don't mean all that much. everyone thinks that way when they first start programming though. for example, all of my friends were awed at the fact that i was writing 2000+ lines of code for last semester's final project, and they had about 500. i just laughed and told them it was no big deal. they still don't really understand...

also, once you get better at programming, what used to be that monstrous 5000+ line game could really be made into 1000 lines using new, more efficient techniques.

but, i would still stick to what most people have already said: 700 isn't that much at all. a lot of people can write that much of lines of code 10 fold in a day. what really matters is that content. and once a game is done, it can be anywhere from 5000 to 200,000 lines.

Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 29th Mar 2008 19:47
not being offensive or anything but not all of us can sit here all day everyday to write just the 700 odd lines of code took me around a week as i get about 3 hours a week but hey ho..

anyway this is an ageing thread kind of thought it died then it bumped back up again etc

Paul
jasonhtml
20
Years of Service
User Offline
Joined: 20th Mar 2004
Location: OC, California, USA
Posted: 29th Mar 2008 22:54
well, i wasn't trying to be offensive. and it doesn't really matter how long it takes to make a certain amount of code as long as it works. someone could write 1000 lines in a few hours, but how many bugs does it have? or they could take their time and write 100 and have it run first try. that's all i was trying to say really...

Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 30th Mar 2008 16:52
Quote: "Good idea! 700 lines is easily manageable but the more you add in the harder its going to be to keep track of - you want to start thinking about change control now before stuff gets out of hand and you find yourself using variables like 'fred' and 'dave' (which you'll mean to change later but never get round to)
"


another great point - its an easy trap to fall into, in my opinion!
i've re-written quite a bit using a sort of method for naming things now so where:
player position - was: playerposx#
player position - now: PlayerPositionX#

player money - was: money
player money - now: vMoney

I use a v before the name if its an integer variable and it also helps me to distinguish between types (i mean to say between strings and integers) as i find it odd coming from a sort of php perspective with: $variablename, going to: variablename$ - just things im getting used to.

additionally i've gone back over everything already and renamed objects, pictures and so on into a more logical path, so where:
was: Playercharacter.dbo
now: \characters\MainPlayer.dbo

and when referring to objects in my code i have started to name them rather than use numbers the whole time - i've realised already i've got to a point where i'm having to assign a group of objects id's in the hundreds just to make sure i haven't already used that object number.

I think im going to write some code to:
Check if object id is available/free.
If so save the objects name into an array along with its respective object "id/number" then when im loading an object i can just select the objects id from searching for the name in my array..
sounds like a plan at the moment anyway - or i might just do this statically a list of objects and their id's at the start of the program. not sure yet.

\\goes back to design document rather than posting on here

Paul

Login to post a reply

Server time is: 2024-09-27 12:15:57
Your offset time is: 2024-09-27 12:15:57