watch this  

the official mrchucho blog

ChuchoMUD Updated!

Posted 2005 Nov 02

ChuchoMUD has been updated!

One of the (many) outstanding issues with ChuchoMUD was that it was sort of gratuitously passing around entities. Well, this is great except that when the databases dump to YAML, they dump to different files. Thus more than one copy of a given entity would exist. Clearly this was not right.

I solved the problem by storing only “references” to the entities. This is pretty easy because each entity has a unique database ID and its type can be used to determine which database to check. Unfortunately, you get some yucky code like this:
<pre><code>
    def entity
        db = case @entity_type
            when Character.to_s
                $character_db
            when Room.to_s
                $room_db
            when Item.to_s
                $item_db
            when Portal.to_s
                $portal_db
            when Region.to_s
                $region_db
            else
                $stderr.puts("@{entity_type} not found")
                nil
            end
        if @entity_logic!=nil then
            db.get(@entity_id).find_logic(@entity_logic)
        else
            db.get(@entity_id)
        end
    end
 </code>
You might notice two things: one the “types” are getting stored as Strings (another issue with YAML) and there’s special code for “logic” modules. Basically, logic modules aren’t stored in databases, but are associated with an entity. They can, however, operate somewhat independently.

All in all, it works. Though, it “breaks” the previous YAML files. So, if you happened to create an entire MUD in the last few days, I apologize.

As a bonus, though, I added a day/night cycle example and a wandering, talkative NPC. See: I care.

See: ChuchoMUD

comments (4)

Visual Source Safe: Worst App Ever

Posted 2005 Nov 01

I’m sorry, but VSS is my choice for Worst App Ever. Let me enumerate some of the reasons:

  1. It’s almost unusable over the Internet (specifically, over a VPN) even with these tips.
  2. It regularly corrupts files! This is your Version Control System, not your mp3 collection! Corrupting files is like saying it’s OK if your Bank makes subtraction errors!
  3. There’s no convenient way to see what’s not under version control, but still in the same tree.
  4. It requires a GUI that is slow and often fails to respond. This is especially true over a network.
  5. There’s no “server” setup. You have to use a shared drive to have any sort of “shared” repository.

But my number one problem with VSS is that it is totally unintuitive. I’ve used RCS, CVS and Subversion… so I’m no slouch when it comes to version control systems. It just doesn’t make any sense to me. Even simple things are confusing. More complex tasks like branching and merging get jumbled-up under names like “sharing” and “pinning”. Heck, even the MSDN docs say that merging is nearly impossible.

No doubt about it: Visual Source Safe is the worst app ever.

comments (0)

Introducing ChuchoMUD: A Ruby MUD

Posted 2005 Oct 29

Queue fanfare!

Please meet my latest obsession: ChuchoMUD a MUD written in the wonderful, amazing Ruby programming language.

The goals of ChuchoMUD are as follows:
  1. To be genre-independent
  2. To be extensible and adaptable
  3. To be written in Ruby
  4. To be awesome

I’ve been working tirelessly on ChuchoMUD for over a month-and-a-half. It was hard to just pause and actually upload the code—I kept wanting to add features. It’s still pretty barebones, though. No combat, for example.

ChuchoMUD is based off BetterMUD from Ron Penton’s MUD Game Programming book. It facilitates a very flexible system by encoding a minimal engine, then delegate most of the “game” logic to separate “logic modules”. The modules intercept queries and communicate via messages. Ruby is great for this stuff.

I also used meta-programming to create a domain-specific language for content creators. It lets you do some pretty cool stuff while ignoring the plumbing. I’ll post more about that soon.

Right now, I’ll just be uploading tarballs until I can get by Subversion repository online. In addition to being my first real foray into Ruby programming and MUD development, it’s also my first big project using Subversion. I have lots of experience with both CVS and VSS. Subversion leaves them all in dust!

I should also acknowledge Teensy MUD another Ruby MUD. My networking code experience is thin, so I decided to stand on the shoulders of giants. In this case, that means I incorporated the Teensy MUD networking core directly into my MUD!

Anyway, without further ado:

Download: chuchomud.tar.gz

For more info: Project Page

comments (1)

Agile vs. The Process

Posted 2005 Oct 29

The company I work for is very process-driven. So much so, that it has patents on processes. But my current client (and former employer) is very much of the “Make it happen” mentality.

While I can see the benefits of both a process-driven and an informal, relationship-driven approach, I wonder how well the process-heavy schemes will hold up in an environment where the customer is not particularly tech-saavy. These business users are in the business of whatever it is their company does—not in the software business. They’re not NASA, either. Software exists only as a means to an end. That’s something that can be hard for a developer to swallow.

One of the tentants of the Agile Manifesto is “Individuals and interactions over processes and tools”. To me this means, the days when the business user would call you up on the phone or walk into your office and say, “make it happen” and you’d do it. That works great until it doesn’t. Often you end up with a lot of specialization and dependence on a particular individual. And there’s no transparency (and probably no audit trail). But here, I think developers can help themselves and each other: avoid the “job security” mentality, don’t be clever. Write quality, standards-compliant software using good practices. Write tests, use version control—this stuff isn’t hard.

The alternative is The Process. It solves the problem of specialization by abstracting the work to the lowest common denominator. And it creates an Audit Trail made out of paper and Red Tape. [ed. sorry for mixing metaphors] But it’s prohibitive and doesn’t otherwise add value.

And really, don’t we all just want to “make it happen”?

comments (0)

Chucho MUD

Posted 2005 Oct 29

ChuchoMUD is a new MUD written in Ruby.

Chucho MUD is my foray into Game programming and Ruby. The basis for my MUD came from Ron Penton’s MUD Game Programming book.

My main goal is to create a flexible, extensible Ruby-based MUD that is easy to use and adapt to any genre. I endeavored to separate engine code from game logic using the “logic module” system. I’m also using Meta-Programming to create an intuitive domain-specific language (in this case the domain is MUDs!) to relieve content developers from as many “programming” tasks as possible.

All that being said, Chucho MUD is definitely a Work In Progress.

All of the source code for Chucho MUD is hosted as a Google Code project.
  • Chucho MUD Project Home
  • Browsable Subversion Repository
  • To checkout the latest version:

svn checkout http://chuchomud.googlecode.com/svn/trunk/ chuchomud

More Info: See all posts related to ChuchoMUD.

comments (0)

mrchucho.net Miscellanea

Posted 2005 Oct 26

I upgraded WordPress, reorganized my server setup and installed a couple of plugins in an attempt to stem the tide of spam. We’ll see how it goes…

comments (0)

What the flock?

Posted 2005 Oct 22

I downloaded and am trying Flock, the latest browsing craze(?) This post is from “inside” Flock! Clever. Right now, I’m just checking stuff out—we’ll see how it goes.

Update: well, I certainly found the cool feature in Flock: the Favorites manager. It’s very slick and integrates (both ways) with del.icio.us.

Ooh. I also like the Shelf, which is like a fancy clipboard. Though, you can’t drag a favicon from the address bar…

Update: OK. Five minute review: meh, I’m more interested in the latest Opera beta...

comments (0)

Signs of Autumn

Posted 2005 Oct 19
  • Halloween decorations: check
  • Soccer: check
  • Falling leaves: check
  • 90° temperatures: wtf?
comments (0)

SQL Starts with Alpha

Posted 2005 Oct 12
Using SQL (and Oracle), is there an easier way to see if a string (VARCHAR) starts with an alpha?
<pre><code>
select id, value
from parameters
where lower(substr(value,0,1)) between 'a' and 'z'
</code>

I know that Oracle 10 supports regular expressions, but I’m using Oracle 9.

comments (0)

Testing Revelation

Posted 2005 Oct 11

I’ll admit it: I’ve come late to the unit-testing party. I finally broke down and wrote a unit test because I had a section of code where the logic seemed fragile and liable to break with the more business logic I applied to it.

Once I realized how easy (and rewarding) unit testing was, I was immediately hooked. I refactored some code and setup unit tests (these things, by the way, go hand-in-hand) and never looked back.

However, it wasn’t until later that I had my revelation: unit testing isn’t about testing; it’s about development. Now I write a test before I write my code. I get two things from this: one, I really have to think about what I’m doing and what I mean. Two, I get immediate feedback: this code works. I don’t have to wait until runtime (or walk through the whole app) to find out if my code does what I want.

Like I said, I’m late to the party, but I’m oh-so-glad to be here.

comments (0)
atom rss