![]() |
#1 |
New Member
Join Date: Mar 2009
Posts: 3
![]() |
Flexible base code for a beginning coder
Hello,
I've been a long-time player of muds and amateur programmer and I've been wanting to dip my toes into learning to code for muds. Can anyone recommend any base code, resources, and websites that would be able to help me with this? I'm not even sure what most muds use for their programming language. Any help would be appreciated. |
![]() |
![]() |
![]() |
#2 |
Senior Member
Join Date: Feb 2006
Location: Seattle
Posts: 361
![]() ![]() |
Re: Flexible base code for a beginning coder
What are your favorite muds? You probably could download something similar to what they use and start playing around. Check out the repository at Mudbytes.
|
![]() |
![]() |
![]() |
#3 |
Member
|
Re: Flexible base code for a beginning coder
C, C++, Python, Ruby, Java... there are probably more, but those are the programming languages I see thrown around the most as far as what many popular codebases are coded in.
You said amateur programmer, what programming language(s) do you know or are most familiar with? That'd probably be the easiest place to start, unless you specifically are looking to learn a different programming language. |
![]() |
![]() |
![]() |
#4 |
New Member
Join Date: Mar 2009
Posts: 3
![]() |
Re: Flexible base code for a beginning coder
I'm most familiar with Java, I've dabbled a very, very little in Ruby.
I suppose my ideal muds would be games like Atonement RPI, Shadows of Isildur, things of that nature. I want to say SOI is Dikumud based but customized? I'm not really sure. |
![]() |
![]() |
![]() |
#5 |
Member
|
Re: Flexible base code for a beginning coder
Speaking from personal experience, the Diku branch really does require a lot of stripping out in order to get anything that goes very far from the way those games typically play.
Don't get me wrong, I love my Diku>Merc>Rom based game, and I wouldn't go with a different codebase even if I were starting over, but I wouldn't exactly call it flexible. I haven't played either of those games, so I can't reference anything specific there. What I can say, however, is that there is a Java codebase called Coffee MUD that you may look at, and I only say that because it's the first Java based codebase I can think of. You can download it here: There's also here, where it seems like you can connect and play, which might not be a bad first step to see if you even enjoy the way the game plays enough to develop on it: |
![]() |
![]() |
![]() |
#6 |
New Member
Join Date: Mar 2009
Posts: 3
![]() |
Re: Flexible base code for a beginning coder
Thanks, I'll check out Coffee Mud. If only because I may be able to take inspiration from the code since it's in a language I understand.
Do you run a mud yourself? What language does yours use? |
![]() |
![]() |
![]() |
#7 |
Member
|
Re: Flexible base code for a beginning coder
I run End of Time (the connection info is in my signature) and it is coded in C.
|
![]() |
![]() |
![]() |
#8 |
Member
Join Date: Aug 2011
Posts: 144
![]() |
Re: Flexible base code for a beginning coder
My personal suggestions from having failed to write a mud and, in the progress plus other stuff, moved on to writing 3D audio mixers and other esoterica-avoid C. I just had to refactor my 2000+ line project to C++ because C is really really horrid at giving you tools for manual memory management in complicated cases. I unfortunately must have the performance of C++ (I'm doing 2 128-point convolutions per sound source for a 3d audio mixer and hope to get it on phones). What I mean by this is that C and C++ do not provide garbage collection, which is invaluable for any programmer-let alone new ones (advanced devs: I am intensionally avoiding a discussion of shared_ptr as that brings its own complexities to the table). Coffeemud is probably the place to start for you: you know Java. My prejudice against Java aside, stick with what you know. Disregarding my own advice, because I'm now a Python fanatic: There are also a few codebases in Python : evennia comes to mind, though I don't know if that's being used in production. I really like Python these days: you don't worry about memory, and there's lots of "magic" tools that the developers of your libraries have to make life easier on you [1]. Python can be learned by someone familiar with programming in a couple hours. If you find a game you really like, using their codebase is an option, but there's a 99% chance you get to learn about life without the garbage collector. Finally, do not make the mistake of rolling your own: you can, you will spend a year, and you won't rival what's already out there [2].
1: I don't believe in magic everywhere. Things like __getattr__ and descriptors, however, make databases a breeze. And debugging (want to log all property accesses to a certain type of object? 5 lines. Want to get notifications when an object changes? you can do that in __setattr__ really simply; bring in blinker for extra productivity, implement things that look like built-in containers, all easy in Python). The magic is not for you so much as those writing the pieces you use to get things done, but there are things you can do in Python that you can do in few other languages. When you need them, you're glad to have them. 2: There are valid reasons to do so anyway. Fun comes to mind. So does doing something so out there that it literally can't be done on a framework we already have public access to, i.e. something similar to Godwars2. But for the most part, don't. Especially if you want a game. |
![]() |
![]() |