3 ms·
a MUD (multiplayer text-based RPG) written in Ruby. It's cool because MUDs are awesome. But I'm doing this in Ruby because it's a language I'm somewhat familia
by Jemaclus 13y ago
a MUD (multiplayer text-based RPG) written in Ruby.
It's cool because MUDs are awesome. But I'm doing this in Ruby because it's a language I'm somewhat familiar with but I don't really consider myself an expert on (as opposed to PHP and Javascript, both on which I do consider myself to be an expert). I figured that building a Ruby project from scratch would be the best way to learn the language. So far, so good.
Thoughts:
- No framework yet. Decided to just build it and see what happens. I'm not trying to learn Rails -- I'm trying to learn Ruby. They're not quite the same, obviously.
- It's harder than I thought. It took quite some time for me to figure out how to mix together sockets and threads to keep track of multiple players
- It's more fun than I thought. I've used Ruby in the past but have never really been impressed. (I think that's mostly Rails.) But this project is full of far more epic wins than my usual ideas.
- Ruby probably isn't the best language to do a MUD in. I initially started with C and I got pretty far, but I decided I wanted to learn a new language, not build a MUD in a language I already know.
- The old school Merc/Diku muds out there are based on flat files. All data, such as character files and area files, are stored in a custom flat format. I'm using JSON for my test data, since it's pretty easy for Ruby to consume, but I'm thinking I may switch to a DB-based setup. But then again, the flat file thing is working just fine...
I guess I'll publish the source some day, when I get to the point where it's playable.
- moreoutput 13y agoAnother MUD lover here; I have a full JS MUD (WebSockets) engine I hack on from time to time for fun. Generally speaking its modeled after a flavor of diku. I have another big commit planned with some significant refactoring but was holding off for nodejitsu to update their supported node version (you can try an early version of the mud with the link on the github page) and for socket.io to move to 1.0. See: https://github.com/MoreOutput/RockMUD https://github.com/MoreOutput/RockMUD