Top Mud Sites Forum Return to TopMudSites.com
Go Back   Top Mud Sites Forum > Mud Development and Administration > MUD Coding
Click here to Register

Reply
 
Thread Tools
Old 08-08-2012, 11:14 PM   #21
Ide
Senior Member
 
Join Date: Feb 2006
Location: Seattle
Posts: 361
Ide will become famous soon enoughIde will become famous soon enough
Re: MUD Creation/Coding Help

These two statements are not compatible. Choose one.
Ide is offline   Reply With Quote
Old 08-08-2012, 11:17 PM   #22
Lorei
New Member
 
Join Date: Aug 2012
Posts: 14
Lorei is on a distinguished road
Re: MUD Creation/Coding Help

They are too. I want to create my own codebase, then be able to log in and edit my MUD.
Lorei is offline   Reply With Quote
Old 08-09-2012, 11:09 AM   #23
KaVir
Legend
 
KaVir's Avatar
 
Join Date: Apr 2002
Name: Richard
Home MUD: God Wars II
Posts: 2,052
KaVir will become famous soon enoughKaVir will become famous soon enough
Re: MUD Creation/Coding Help

The latter will depend on the former. It's a bit like asking "I'd like to design and build my own house from scratch. What would I have to do to be able to get through the front door and start decorating the walls?". Obviously the answer will depend on how you designed and built the entrance, what sort of materials you used for the walls, etc.
KaVir is offline   Reply With Quote
Old 08-09-2012, 12:10 PM   #24
Lorei
New Member
 
Join Date: Aug 2012
Posts: 14
Lorei is on a distinguished road
Re: MUD Creation/Coding Help

Well, maybe I should have rephrased my question xD
How would I create my own codebase? What do I need for it? I can't find any help anywhere.
Lorei is offline   Reply With Quote
Old 08-09-2012, 12:39 PM   #25
camlorn
Member
 
Join Date: Aug 2011
Posts: 144
camlorn is on a distinguished road
Re: MUD Creation/Coding Help

This may or may not be a double post; my internet browser is being flaky:

It sounds like, to me, that you've only got experience with html--this is fine, if you're willing to accept the vague answers, but not if you want specific ones. You're getting vague answers because you're asking vague questions.

I know coding, not well, but I do know it. Lost souls is an example of impressive coding, by which I mean highly, highly complicated. If you don't know coding at all, you're nowhere near being able to even build an area on lost souls--what the player sees and how lost souls internally represents areas are really quite different (this is because of the lot of things you can do there you can't do elsewhere--walk through walls, for example). Lost souls showed me how much I don't know about coding; when someone tells me I'm wrong, I remind myself of my week or so as a Lost Souls dev and how that went because I thought I could code (and I could, just not well enough for that--now I know that there's better coders and I'm better for it etc, etc, end lecture). You can probably get the rooms set up through mimicry, but that's probably as far as you'll get before you start getting lost.

If you're having trouble connecting to your own locally hosted mud, i.e. not knowing that you connect to your mud with your mud client, you're not ready. You need to pick a programming language, any programming language at all, and go learn that from tutorials--start small, maybe some guess the number games or tic tac toe using the console (this is how I started). Then come back and ask the question again.

Building on anything that ultimately derives from diku (godwars, circle mud, the list is too long to list here, really) does not require coding knowledge. Building on anything lpmud, save dead souls, does. Dead souls is the exception here, as until you want special functionality, you can use the quick creation stuff, which lets you set almost everything. You can't create full-fledged quests with interactive mobs or anything without coding (this holds true for diku derivatives too).

If you want to be the head admin, the person who runs and administrates everything and can say "close the mud now", you need to learn linux probably. There's not much of a way around this, unless you have the know-how to set up port forwarding and a home pc for hosting; not particularly hard, but a bit overwhelming if you don't know how to change settings on your home router, and especially difficult if you don't know why you need port forwarding in the first place, the difference between dynamic and static ip addresses, and why you may or may not need a dynamic dns.

If you want to actually be successful, you need to get a coder or code yourself--most coders won't come on board until there's players because you get most coders from your players, but you might get lucky if you ask here or on tmc. Most people won't come on at the beginning, period, because you might get bored and stop any day. You won't get players, you really won't, unless you have something to offer besides areas: this generally means new classes or spells/skills, or entirely unique combat, or something that none of us have seen before because it doesn't exist yet, but all of this requires coding.

You do know that areas can be removed as well as added? You can get rid of the default dead souls areas, if you want, and build your own. You need to build your own first, you just leave the dead souls one inaccessible (it contains a lot of the admin tools cleverly disguised as rooms--my particular favorite was the network snooping thing, because that's how I finally managed to begin to understand the i3 spec). Your immortals will need to be able to get into those areas, since they're also the examples of how to do things, but if you're really dead set on removing them, you can probably do so--expect much heartache. The players won't know the difference between exists and can't be reached and nonexistent, and you'll really need them.

In diku and derivatives, you can get rid of everything, including the home city (usually midgaard). But you have to reassign the recall room and a few others.

Judging by your first post, you don't have the language. The problem here is that you're trying to talk about things you don't know yet, and thus you don't even have the vocabulary to ask the question. There's people like KaVir who know this stuff; I'm somewhere between them and you (unfortunately, probably closer to you), but you can't get good answers until you know how to ask a good question--How do I start a mud is vague, and thus the vagueness of the answers.

Get a position somewhere and build for a while. Muds can be a path to learning to code, but you have to understand muds well first. I recommend learning to code first, and then learning to code muds. Alternatively, become an immortal somewhere and learn muds well, and then learn to code.

If c/c++ scares you away, there's a lot of the interactive fiction stuff. I'm just throwing this out there as it gives you a starting point--it can't be used to make muds, but it can teach you about room-based puzzles and such, and you'll learn to code in the process. Avoid inform 7--it's the easiest, but the knowledge doesn't transfer to anything else: it's highly specific model teaches inform 7, not coding in general--but learning inform 6 or tads will teach you what programming is, as compared to html stuff, and you'll get games in the process. Maybe not muds, but everyone starts somewhere, and this is, perhaps, the closest thing to mud programming you can do when learning to program. Tads is the closest to actual programming, so perhaps use that, and follow the books on the tads site that teach non-coders how to use it.

note aimed mostly at programmers: inform 7 and inform 6 are wildly different--to those programmers on this thread, inform 7 compiles to inform 6. It, because it knows that you're working in a specific set of constraints--everything is in something else, the largest unit of movement is the room, we pause everything and wait on a command every turn...--allows you to write things like this:

The kitchen is a room. "You are in the kitchen, with all sorts of fire hazards. There's the sparking oven, and for some reason the dishwasher too, and you can't forget the sharp knives." The kitchen is south of the living room.

Every turn when the player is in the kitchen:
Say "You flinch as the stove continues to smoke, perhaps you should head for water?".

And you get a whole bunch of machinery for free--get, drop, get, examine, movement, a rather huge list.

It's really quite impressive, imho, but it won't teach coding, as it teaches the user to specificize, for lack of a better word, rather than generalize--you're not learning what a program is, but what English inform 7 can understand to describe your game, and what english it can't. It ties you to itself, and makes moving away harder than it otherwise would be--java will still look impossible. If you already know programming, go for it though, as it really is neet.

Inform 6 and tads both highly resemble c/c++/java/fill-in-the-object-oriented-language, with features to make writing this type of game possible--there's nothing stopping you from writing a fancy calculator, for example, save that it runs in an interactive fiction interpreter.

Note to OP: try looking up: telnet, compiler, lpc, sockets, c++ tutorial, java tutorial, etc...and maybe something will click. You can learn lpc from an lpc tutorial, but I figure you can figure that out; I'd recommend learning a programming language that's not specifically for muds so you can see what is being done for you and understand the scope of what you want to do. Starting with one of the basic variants (freebasic is still actively developed, and there's a lot of really good documentation floating around under the guise of qbasic and quickbasic tutorials) is also a good choice; the knowledge of the design patterns will stay with you. A good programmer can learn new languages in an afternoon; once you've learned one, the concepts generally transfer to the next.

Okay, I'm done with this giant post.
camlorn is offline   Reply With Quote
Old 08-09-2012, 12:51 PM   #26
Lorei
New Member
 
Join Date: Aug 2012
Posts: 14
Lorei is on a distinguished road
Re: MUD Creation/Coding Help

I am asking a specific question, though. What do I need in order to create a codebase? Do I need a specific program, or specific tools?

I don't understand how that isn't specific.
Lorei is offline   Reply With Quote
Old 08-09-2012, 02:14 PM   #27
dentin
Member
 
Join Date: Apr 2008
Home MUD: Alter Aeon
Posts: 245
dentin is on a distinguished road
Re: MUD Creation/Coding Help

Lorei:

1) Download or get/install ubuntu linux on one of your machines. A VM would be fine.

2) Open up an editor window into a .c code file. Any editor will do.

3) Write C code for your server. You can do this however you'd like, as long as it works.

4) Compile it using the 'gcc' command from the command line.

5) Run the executable.

6) Connect and log into the server from another terminal.

This is the 'simple answer' to your 'simple question'. That's all there is to it, and actually, the above is exactly how I started Alter Aeon. Watch out for step 3 though, it's a doozy - I was a pretty well trained programmer even back then and it took me a year to have something stable.

-dentin

Alter Aeon MUD
dentin is offline   Reply With Quote
Old 08-09-2012, 02:18 PM   #28
plamzi
Senior Member
 
Join Date: Nov 2009
Home MUD: bedlam.mudportal.com:9000
Home MUD: www.mudportal.com
Posts: 292
plamzi is on a distinguished road
Re: MUD Creation/Coding Help

The reason you think your questions are specific is because, no offense, you don't know enough yet to even ask the right questions. For instance, the right question about your Dead Souls issue is "how do I compile it on such and such OS". And the answer is certainly out there, if it isn't in the readme that came with the code. But to know the question requires that you know half the answer--what compilable code is, what tools one typically needs to compile from source, how to run the resulting executable and where to look for logs of any errors, how to connect to a locally-run server, etc.

A codebase is just a MUD server released to the public for modification. They vary greatly in terms of languages and frameworks used, OOB features and content, etc. If you have no coding background, why not start with something that comes with features and content -- you will learn much from those, even if you're just trying to strip them.

And definitely don't start writing a server from scratch by way of learning a programming language. Start with tutorials or books, then try to modify some existing code.

Small steps, and no-one else can walk them for you.
plamzi is offline   Reply With Quote
Old 08-09-2012, 02:42 PM   #29
dentin
Member
 
Join Date: Apr 2008
Home MUD: Alter Aeon
Posts: 245
dentin is on a distinguished road
Re: MUD Creation/Coding Help

Lorei,

The fundamental problem here is that you don't appear to know, what you don't know. I suspect you're trying to extend your writing experience into the software field. This will not work; the fields are not sufficiently related.

In the writing world, things are pretty straight forward - you have your favorite word processor and you can slam something together quickly and easily. You must be asking, "Why can't I just do the same thing with an RPI? What is wrong with these people?"

The simple answer is that word processors do not work when building RPIs, because RPIs are not word documents. They are software packages, running custom programming languages, in a programming environment. You cannot simply construct one the way you would a novel.

The basic pieces needed for a functioning RPI are:

1) Host machine. This is the server box where you'll run your code. For now, I'd recommend you install linux on one of the machines in your house and use that as your host. Think of this as the "web server" where you will eventually "publish" your RPI.

2) MUD/RPI server. This is the foundation upon which you build everything else. The server defines how people connect, and it may limit or restrict your ability to do certain things. There are many, many types of these. There is no particular one that is best. You can choose one that you think does what you want, or you can write your own. Be aware that writing your own will take literally years.

3) Your fantasy world built on top of the MUD/RPI server, probably using a custom RPI programming language. This is where most of the creativity will come in.

Think of this process as similar to posting an article on a Wordpress or Blogspot blogging side: just as you write articles to post into Wordpress which will then be published to the external world by the web server, you write a fantasy world into the RPI server which will be published to the world by the host machine.

The reason you're having trouble is that you want to jump immediately to step 3, because step 3 is where the creativity comes in. But without step 1 and 2, it's like trying to write a novel with charcoal briquettes and stone slabs. You simply lack the tools.

Quite frankly, you're just going to have to buckle down and get those two steps out of the way first in order to make progress. If you can't do that, you may as well just join an existing RPI server and contribute there.

-dentin

Alter Aeon MUD
dentin is offline   Reply With Quote
Old 08-09-2012, 03:06 PM   #30
Ide
Senior Member
 
Join Date: Feb 2006
Location: Seattle
Posts: 361
Ide will become famous soon enoughIde will become famous soon enough
Re: MUD Creation/Coding Help

I want a +1 thing for dentin's post.
Ide is offline   Reply With Quote
Old 08-09-2012, 04:03 PM   #31
Lorei
New Member
 
Join Date: Aug 2012
Posts: 14
Lorei is on a distinguished road
Re: MUD Creation/Coding Help

Okay, so I'm already on step 3, just testing some code out. I downloaded Notepad++ and I am writing my code in C++. Can I compile it right in notepad++?
Lorei is offline   Reply With Quote
Old 08-09-2012, 04:16 PM   #32
camlorn
Member
 
Join Date: Aug 2011
Posts: 144
camlorn is on a distinguished road
Re: MUD Creation/Coding Help

Agreed, +1 to dentin. He said what I was trying to say way more concisely than I said it.

For what it's worth, I was in the same place once--I wasn't coming from writing, but I believed I could throw a mud together in a week with little knowledge; I even announced it, because I honestly thought I could have one open by "tomorrow". I look back on that fondly--I cancelled it a week later, because it's not just running the server, and you can't just use someone else's and have anything worth playing; since then, I've learned that I'll probably never start a mud, because it takes years of work (in most cases--there are exceptions, but you're not going to get it to under 6 months, and even then, your game is going to be lackluster).

Anyone can write an article; a good one takes talent. The thing is, though, software is more like a list of instructions: I can say "start the mud server", but it's more like "start the mud server (see section 1.1)" and then I have to go write a bunch of directions that define in excruciating detail what exactly a mud server does when it starts. I don't mean things like "load the areas", but like:

1. Open areas.lst:
2. For each line in areas.lst:
2.1. Open file listed in the current line of areas.lst:
2.2 Go to the area loader bit which won't fit in a single post on this forum, and which I'm omitting for brevity.
2.3. If anything bad happened (another herculian task, depending on how the previous bit works to determine this), stop.
3. Return to whatever called me.

Each of those subdivides a lot more; I could sit here all day and produce a list like that, and it'd be so big as to be unbelieveable to a non-programmer; a computer is like that, and you don't know how to write that list yet. And all it'd do is load the areas and stop, nothing else--you wouldn't be able to walk around, you wouldn't have combat, you wouldn't even have players. If we call each direction a line (I know it's not, but as an analogy), it comes out to at least 1000 lines to load areas, assuming no scripting functionality or anything--in practice, it's much, much more--when I say 1000 lines, I'm talking about the size of the actual file containing those directions, if that gives you some idea.

Programming is like a cake recipe, wherein you aren't told that it's a cake. It could be a car or any number of other things, and you, the computer, only follow the directions. If it says to take the entire bowl of cake batter and pour it over your head, you'll do that, simply because it says to, and for all you know, this is some form of nontraditional art. So you, the programmer, have to be able to tell it what exactly to do, but you can't tell it what the final result is--if your directions work, you get what you want, if they don't you get nothing or something unexpected (we call this a bug). The computer can't figure out that this is a mud as opposed to a word processor or a music editing software. Perhaps it's some sort of melange of all three. A computer doesn't even know what a mud is.

That's really the best explanation of what you don't know, short of going and learning it, that I can come up with; maybe someone can do better, as it's admittedly poor.
camlorn is offline   Reply With Quote
Old 08-09-2012, 04:29 PM   #33
Ide
Senior Member
 
Join Date: Feb 2006
Location: Seattle
Posts: 361
Ide will become famous soon enoughIde will become famous soon enough
Re: MUD Creation/Coding Help

Short answer is yes. But a few questions, what OS are you using, what kind of RAM and processor does your computer have, and have you downloaded any compilers yet?
Ide is offline   Reply With Quote
Old 08-09-2012, 04:40 PM   #34
Lorei
New Member
 
Join Date: Aug 2012
Posts: 14
Lorei is on a distinguished road
Re: MUD Creation/Coding Help

I use Windows 7, it has 3GB of RAM, and it has an AMD C-50 1GHz processor. Also, no, because I figured I could compile right in notepad++.
Lorei is offline   Reply With Quote
Old 08-09-2012, 04:56 PM   #35
Ide
Senior Member
 
Join Date: Feb 2006
Location: Seattle
Posts: 361
Ide will become famous soon enoughIde will become famous soon enough
Re: MUD Creation/Coding Help

You can, but you need to download the compiler separately.

First read this short article:



Then read this to choose a compiler:

Ide is offline   Reply With Quote
Old 08-09-2012, 05:52 PM   #36
camlorn
Member
 
Join Date: Aug 2011
Posts: 144
camlorn is on a distinguished road
Re: MUD Creation/Coding Help

A good coding tutorial would help you a lot at this point--if it;'s a good one, it'll tell you exactly what to get to get started and how exactly to install it.

Notepad++ is a text editor and has nothing to do with a compiler. It can compile if you set it up to, but it doesn't actually do it itself; it calls a separate program that you provide. Basically, if you're familiar with the command line (I believe you are), notepad++ invisibly brings up that program, issues the command you tell it to to compile, and then closes it. If you don't understand that, don't worry; you will soon enough.

A compiler is a translator--code is readable by humans, machine language isn't, and computers can only execute machine language. The compiler takes the readable code, checks it to make sure it can be translated and tells you if it can't, and then does the translation into unreadable-but-executable machine language. Beware: just because the compiler says it works doesn't mean it does what you intended; the compiler was able to translate it, but that doesn't mean it does what you think it does, or that it even runs at all. Welcome to the world of cryptic errors about "missing _foo", "segfault", and the like. It's not that bad, you can google most of them, and find out what they mean.

Being completely honest here, for someone who's never programmed before, go get and install visual c++ express 2010, the free IDE from microsoft. Unlike notepad++, it comes with a compiler, and you're up and going as soon as the godawful long install process is done (It can take forever to download--it's really quite large, and includes pretty much everything you ever need to develop for windows if you're writing a mud, short of the documentation which used to come with it but is now all online). Any c/c++ tutorial will work with it; if you're using something else, you'll need something else.

Given that you're writing a mud, you'll eventually need to move away from it, but for getting started i-don't-know-how-to-set-up-the-compiler, you can't beat it. There's no reason you can't use it for mud development, but you'll probably find you eventually want something else--most mud codebases run on linux these days, and Microsoft products make it understandably hard to make that happen. As linux is the only reasonable host option, or so it seems to me, for a reasonable price (free to $10-$20, depending), you'll probably end up using it. You can host on windows, but that takes a lot more know-how, and there's a lot less help floating around.

I'd stop at this point and look up what a compiler is, and I wouldn't continue until I understood why a compiler doesn't come with notepad++, but that's just me--my outlook tends to be "There are no black boxes", and that's not always best.

If your tutorial says to use something specific (I'm assuming you're using a tutorial, if not please do, it'll save you a lot of headaches), then make sure you're using that specific thing: you'll probably run into cryptic errors following that tutorial with a different compiler.
camlorn is offline   Reply With Quote
Old 08-10-2012, 12:34 AM   #37
realmsofvalor
New Member
 
Join Date: Jul 2011
Posts: 22
realmsofvalor is on a distinguished road
Re: MUD Creation/Coding Help

For some reason I read that sentence without the 'if', and started laughing. Ah, dev.

Good luck, Lorei. Starting your own MUD is an ambitious goal, and a successful compile can be the most difficult of first steps. I wish you every success!
realmsofvalor is offline   Reply With Quote
Reply


Thread Tools


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -4. The time now is 07:31 AM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Style based on a design by Essilor
Copyright Top Mud Sites.com 2022