bastilleangel
Clueless newb
Wielding the Power of Love and Investigation Since 2013
Posts: 119
|
Post by bastilleangel on Feb 6, 2016 19:07:49 GMT -5
Evening, all.
As the title says, what skill(s) are needed to code a MUD from scratch? I mean specifically, as opposed to more general ones (time management, mental focus, etc.).
I ask because, over the next few years, it looks like I'm in the odd position of actually needing to take classes that my overly-college-houred, liberal arts geek self has never taken. I was thinking of pursuing dance (which I'll still probably do), but upon reflection, think that joining the "I'm making a MUD" club (only slightly smaller than the "I'm writing a book club", of which I have also been a card-carrying member) is a grand idea.
Ideas? Guidance from pros who already have those skills? Assume the person you're addressing has a background in literature, law, medicine, and history, midling math skills, and is reasonably trainable.
[Edit to add: Sorry, wasn't sure where to post this. If it's better moved elsewhere, JC, by all means, please do. Thanks!]
|
|
|
Post by BitterFlashback on Feb 7, 2016 6:55:01 GMT -5
(This should probably be in Code Discussion. jcarter - any chance of a move?) This all depends on what type of MUD you intend to create, so I am going to divide my answer up by complexity. For a basic MUD, you're only going to need executable programming skills. That means C++ or another executable programming language. I've heard the scripting language Python be used to program executables now but I have not looked into it. I guess you could use Java, but why use a language that will make you wish for death? For storing/retrieving information (which is 80% of what a MUD does) I'd recommend getting some basic database skills as well, but you can get away with using flat-files as well. For something more advanced, like a MUD that is also manageable from the web or with additional web-integration (which I am amazed is almost non-existent), you'll need web development skills, some database skills, and maaaaaybe server-side scripting. Web development means learning HTML, JavaScript, and a web scripting language (PHP, Python, etc). You'd also need to take 10 minutes to learn CSS. It would be more work, but the benefits are nothing to scoff at. An obvious example of web-integration's value is the creation of new objects. In Arm, someone hand-writes an email, negotiates with a staffer, and eventually a staffer goes into the game and manually creates an object one property at a time in a TUI by typing commands. Any command and property combo that doesn't jive doesn't work. Holy shit. On the other hand, a GUI web interface would allow you to let the player create the object and submit it. A staffer then modifies, improves, or does whatever else to the object from their version of the GUI. Once it is approved in the GUI it is immediately in the game. Of course, all of that is extra work in the beginning but it reduces your workload running the game.
You also asked for some general questions about skills. The closest two things to programming a normal person will encounter in their lives are contract law and technical writing. Programming is the writing of clear, unambiguous instructions for an autistic golem to mindlessly obey millions of times per second. If you don't want it to keep digging a moat around your house until it hits magma and kills you both, you need to be specific with it about exactly when it will be done with that trench. The main programming skills are abstraction, interpretation, resource management, communication (wit' dat golem), proofreading, and rules of mathematics. Unfortunately, most programming skills (or programming versions of skills) can only be learned by programming, which is a recursive problem. Luckily understanding recursion is a programming skill that you learn by learning recursion. - Abstraction is the ability to break things down into vague, representations that simplify your work without going too far and trying to make everything into some universal item. There is no parallel in the real world to this. There is, however, a semantic behavior by the same name that should not be considered similar.
- Interpretation is the ability to become the computer and instinctively follow the code so you can tell where it has or will go wrong. There is no parallel in the real world to this. You can only learn this skill by debugging code.
- Resource management is unique in programming. None of your resources actually exist outside of programming. Programming virtually always involves three resources: processing, disk space, and RAM. A MUD introduces additional resources you have to manage: bandwidth/throughput, threads, and network sockets. If you use a database, you'll also have to deal with database locks and the big 3 all over again.
You can typically reduce the load on one resource by increasing the load on another. Your ultimate goal is to create the fastest, stablest system you can without making it difficult to maintain. There is never a best way to manage resources and anyone who uses the phrase "best practices" around you on this topic is an idiot. Every project is different. - Communication with a computer comes in the form of instructions. You write them. The computer does exactly what it is told to do, which may or may not match what you meant to tell it to do. Other instructions running in the background environment may act upon it as well, but usually when things stop working after you make a change, it's your fault and you should feel bad.
Code should be human-readable first, computer readable second, even when it makes the system less efficient. The mistakes of a programmer misunderstanding exactly what the code they're modifying does can be so staggeringly worse than a few milliseconds of wasted cycles you suffer that you're better off learning to live with them. Yes, even if you're the only person working on the project. - Proofreading code is identical to proofreading writing in any other language, except programming languages are a combination of words, symbols, math, placeholders, commands, and shit HP Lovecraft warned us about.
- The rules of mathematics are only needed as far as knowing what to use and how to convert a mathematical formula into code. This will only come up when you actually need to plug a formula in, and you're unlikely to need anything complicated for a MUD. You also only really need to be able to mathematically interpret any formula correctly once, as the computer will do whatever you tell it to.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Feb 7, 2016 10:37:02 GMT -5
Bitterflashback did a great write up. I've taken both Python and Ruby classes online (mostly Ruby), so I'll chime into say that Ruby can be put anywhere Python is above. Don't take Java or C# if you have other options (Python, C++, Ruby, Go - doubt they'd teach Google's new C successor though). C# is modern, but it's Windows biased and almost all servers are running Linux. I can't comment on its server potential though.
You're probably best off using Evennia for your MUD unless you want to create a new codebase to cater to new ideas you have, or if it'd be for the learning experience. Evennia uses Python. The heavy lifting will be done already; what's left depends entirely on your ambitions.
Take a SQL or JSON class for databases. If you're using an existing codebase, just the one database class should be sufficient.
If my memory serves correctly, Evennia is actually built on top of Twisted and Django. I haven't taken a close look, but it's reasonable to suspect that it should have good front end capabilities ready to go (web integration stuff bitter talks about)
|
|
|
Post by jcarter on Feb 7, 2016 10:37:47 GMT -5
ehhh it can go either way, if bastilleangel wants it to stay here it's fine. code-discussion is more general formula and hard numbers
|
|
Patuk
Shartist
Posts: 553
|
Post by Patuk on Feb 7, 2016 12:25:30 GMT -5
Fuck off BitterFlashBack, java masterrace
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Feb 7, 2016 12:46:01 GMT -5
Fuck off BitterFlashBack, java masterrace I was going to say don't let the dark side seduce you, but the only thing Java has in common is hating yourself. You don't get any edgy cool powers or anything
|
|
|
Post by BitterFlashback on Feb 7, 2016 15:15:22 GMT -5
Fuck off BitterFlashBack, java masterrace I'd fuck off in Java except, by the time I finished coding and referencing all the classes I'd need, I'd be dead of old age. Take a SQL or JSON class for databases. Wait, what? Someone tried to make JSON work as a query language? What madness is this?!?
|
|
Patuk
Shartist
Posts: 553
|
Post by Patuk on Feb 7, 2016 15:45:44 GMT -5
Bro, do you even type?
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Feb 7, 2016 16:12:39 GMT -5
Take a SQL or JSON class for databases. Wait, what? Someone tried to make JSON work as a query language? What madness is this?!? . As I'm sure you know, JSON is a language-independent data format. One could, for instance, use MongoDB to perform queries on JSON documents. There are also a lot of JSON query languages. "JavaScript Object Notation (JSON) is an open, human and machine-readable standard that facilitates data interchange, and along with XML is the main format for data interchange used on the modern web." "A JSON database returns query results that can be easily parsed, with little or no transformation, directly by JavaScript and most popular programming languages – reducing the amount of logic you need to build into your application layer." If I was making a codebase, I'd probably go with JSON to store data first first and maybe extend it with MongoDB later.
|
|
dcdc
Shartist
Posts: 539
|
Post by dcdc on Feb 7, 2016 17:26:31 GMT -5
Lucky for you! Some engine basics are already created in more modern saner languages. www.evennia.com/Python base, seems robust, played around with it a little. www.ranviermud.com/Javascript/JSON based. Really simplistic, but might be easily modifiable. I would recommend if you choose to undertake this task, use an already built engine, and built/modify that as oppose to starting from scratch. Do you really need to create all the infrastructure, when some one in the open source community did all the work for you?
|
|
Patuk
Shartist
Posts: 553
|
Post by Patuk on Feb 7, 2016 17:31:41 GMT -5
Goddammit Python, you can't just say import engine and be done with it!
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Feb 7, 2016 17:43:14 GMT -5
Lucky for you! Some engine basics are already created in more modern saner languages. www.evennia.com/Python base, seems robust, played around with it a little. www.ranviermud.com/Javascript/JSON based. Really simplistic, but might be easily modifiable. I would recommend if you choose to undertake this task, use an already built engine, and built/modify that as oppose to starting from scratch. Do you really need to create all the infrastructure, when some one in the open source community did all the work for you? I recommended Evennia above as well. Ranvier looks interesting.
|
|
|
Post by BitterFlashback on Feb 8, 2016 0:52:14 GMT -5
Wait, what? Someone tried to make JSON work as a query language? What madness is this?!? . As I'm sure you know, JSON is a language-independent data format. That doesn't mean someone wouldn't try to make a query language out of it. Someone made Javascript into a server clustering OS. Mad computer scientists only get noticed when they're trying to download people's brains; this shit flies under the radar. That said, my recommendation to bastilleangel would be to learn SQL and practice database architecture on traditional database like mySQL.
|
|
deadelf
staff puppet account
Posts: 44
|
Post by deadelf on Feb 8, 2016 8:45:09 GMT -5
You mention college classes so I'm not sure if you are asking about formal training or not. It's also not clear if you are wanting to create a code-base for yourself or an actual game to be played on the internet. Maybe this will add to the discussion.
If you are asking what classes to take: intro programming (whatever language), data structures, databases, networking, and I recommend software engineering. Most of those would be core classes for a minor in computer science. (checked at UNC and those classes, except software engineering, would count towards a minor there, your school might be different).
If you are interested in learning to program for yourself there are plenty of free online classes: coursera, MIT, edX.
I was trying to find a website on abstract mud game design but here's an interesting assignment: MIT class assignment-create a mud.
If you are interested in actually putting a mud online to play (it's a lot more than just programming) try the forums at Top Mud Sites and The Mud Connector. There are many questions/answers about creating, coding, staffing, and running a mud.
Now, the truth of the matter is that you don't need to know any programming to get started making a mud. Many high school kids (back in the day) just downloaded diku/envy/circle/whatever (various muds and their relationships) and learned on the go. It's not that hard, just get in there and play a bit. When you run into a wall ask questions.
I cut my teeth on programming with, let's just say hex editors and disassemblers, before taking classes at college. While most colleges will introduce you to the particular language of the year - it's all just abstracted machine code. I learned algorithms from the mathematical side using pseudocode and once you get used to that changing languages is simple (currently playing around with Swift). I do think mud programming helped my career. Like real-life, it is a large, difficult to manage project with many competing interests (builders, coders, players, time) and the usual human management problems (rage quitters, my farts don't stinkers, drama queens, perma-whiners).
But if you are just interested in learning to code then, nah, my advice is go make an app. Get eclipse and the android packages or xcode from the apple store and have at it. Let me think...you mentioned dancing so maybe a lap-dance app, instruct users to hold their phone against their crotch and a picture of a shaking booty appears while the phone vibrates? Probably already exists. Ugh, another brain cell committed suicide over one of my terrible ideas..
|
|
bastilleangel
Clueless newb
Wielding the Power of Love and Investigation Since 2013
Posts: 119
|
Post by bastilleangel on Feb 11, 2016 1:12:46 GMT -5
Wow, a wealth of information! BF, thank you for an interesting and informative entry point. I had to look up many of the points you referenced; not bad at all, just a little intimidating at first.
Thanks to everyone for contributing. The links were great, and I'm going to have a lot of follow-up to do the replies in this thread justice.
Deadelf, you raise some great questions. Moreover, you've gotten me to reframe my original objectives. The initial impulse that lead me to posting was in response to a fairly consistent theme on our forum, which is that Arm. exists as it does largely because there isn't a true dark fantasy RPI alternative. And I type that with full respect to the many projects and MUDs out there. If cornered, I'd give you SoI and Harshlands as the closest, and they really aren't all that close. Maybe Evolution of Esos? None of these has captured Armageddon's heady mix of grit, intensity, and consistent depth when it's at its best.
I feel like some kind of living stereotype typing this, buuut: I truly believe me and a few of my girlfriends could nail the RP aspect of a thriving RPI MUD. That includes culture, history, sustainable day-to-day excitement, and so on. The problem is in having enough knowledge to understand how the RP interfaces with the coded aspect of a MUD. Much like when I founded and ran a LARP, there are always unexpected cross-impacts of the mechanics of a medium to the way it's role-played out. I wouldn't even attempt to put together something as complicated as a functioning, self-sustaining MUD without a solid grasp of what the code actually does in terms of shaping the story - stories are very, very different if the strongest warriors can fight four or five people at a time vice twenty or thirty at once, for example. And the tweaking of combat ability has a host of impacts that someone who is "code illiterate" will never see coming.
I'm not doing a good job of explaining what I mean, but hopefully the reader will be able to glean the gist of it. Thanks guys!
|
|