Text RPG Size

Started by
11 comments, last by gamechampionx 21 years, 6 months ago
I''m just wondering, how many lines of code are in a standard simple text RPG (not Rogue-style)? Mine seems to be so long, and I''ve hardly got anything done. It has like 600 lines of actual code, commenting..., and only the opening menu (pure text) is usable. I have made character setup, and started on items, though. The source is viewable at www.angelfire.com/wizard/qotf How long should I expect the code to be, including spaces and comments??
Check out Drunken Brawl at http://www.angelfire.com/games6/drunken_brawl!
Advertisement
Keep counting buddy. If you intend to hard-code the whole thing, and include a decent sized story, I suspect it will be much longer.

This is more of an implementation thing, but you may want to hard-code only the engine, which then reads from separate data files written in plain text combined with simple scripting tags. That way, you can write scenarios, locations etc. separate from the game code itself and have more flexibility in writing them. Having to recompile every time you find a spelling mistake can get to be tiresome. Or are you already doing this?

At any rate, 600 lines of code isn''t much as programs go. Even relatively simple text games can require some pretty fancy coding, and depending on the complexity of the game''s options, it may get up there in length. Keep pluggin'', though... it''s probably going to be hard, but it looks like you''ve chosen a doable project. I mean, not to name names or anything, but nobody is going to create a full 3D MMORPG by himself.

---------------------------------------------------
-SpittingTrashcan

You can''t have "civilization" without "civil".
----------------------------------------------------SpittingTrashcanYou can't have "civilization" without "civil".
If you''re interested in a simple scripted Text RPG, I''d like to suggest going over to rpgplanet.com and looking under articles. Glen Martin did a 7 part series on a simple Text RPG and in the last 2 or 3 he worked with a simple scripts for it. Actually he had it so you hard coded the game then converted it over to scripted. Nice primer in my opinion for more advanced scripting.
Thanks for the help + support.

Anyway, right now, the structure is coming together, so there isn''t much output, but once that''s done, things will come quickly.

Check back some time!
Check out Drunken Brawl at http://www.angelfire.com/games6/drunken_brawl!
Yea man. I started one but didn't finish (although I should have) and I barely got any of the story done, but I had shops, fighting, cities, and even a innovative little "world map" so you could go back to places you've already been, but that was very simple and I could think of a few things right now to fix it, and all that was over 1300 lines of badly written code (it was my first attempt at a game, waddaya expect?) I actually just found it, and I just might start back on it again, it's better than I remember.

Hibiki
Wheres the any key?





find your element
at mutedfaith.com.
<º>


[edited by - Hibiki_Konzaki on October 1, 2002 11:00:30 PM]
HibikiWheres the any key?www.geocities.com/dragongames123/home.html
find your elementat mutedfaith.com.<º>
Cool! If you don''t mind, could I maybe take a look at your code for some guidance?
Check out Drunken Brawl at http://www.angelfire.com/games6/drunken_brawl!
You get to a point with coding Text Based RPGs where your ability to think is more useful than your knowledge in C++.
-----------------------------Language: C++API: Win32, DirectXCompiler: VC++ 2003
There is plenty of public domain source code available for MUDs (text RPGs) out there. It took me a minute with Google to find the source code for ROM (a popular codebase for developing MUDs):
http://www.rom.org/download/

Try searching for keywords like:
"MUD", "MUSH", "Merc", "Diku", "Smaug", "ROM", and "source code".

Also try here in the resources section:
http://www.mudconnect.com/

Depending how complex, I''d say you can expect about 5000 to 15000 lines on a first attempt. More realistic MUDs, as you can see from looking at the source code for a bare bones ROM version are about 30000 lines. Of course, thats not counting data files.

Good luck, and happy MUDing
The problem is, most MUDs - and almost all of the downloadable ones - have little to no actual ''gameplay'' other than killing opponents, collecting better equipment, and gaining levels.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files | My stuff ]
quote:The problem is, most MUDs - and almost all of the downloadable ones - have little to no actual ''gameplay'' other than killing opponents, collecting better equipment, and gaining levels.


This sort of stereotype (not that I don''t agree with it!) is the whole reason that I''m shooting for 2D in my first full RPG. Hard as it may be to find an artist (I can''t draw worth crap), a 2D game will actually stand a chance among non-roleplayers once I finish it. I hate to say it, but I''m pretty sure that only programmers and wierd Pen & Paper gamers like me play MUDs.

Addressing the subject of text-based RPG gameplay, I think that a small custom skill system would add much gameplay value to a text-based game, as well as several hundred or thousand lines of code.

And these things are LONG. All I have written for my game is the standard classes for character stats, and I''ve used about 12 pages just defining all of the attributes characters have. Now that I''m in the middle of redesigning my system, I''ve vowed not to touch the code again until I''m completely finished with my re-designing, because it just takes way too long to rewrite portions of RPG code to account for new "systems" that you''ve introduced into the game.

This topic is closed to new replies.

Advertisement