Christopher Allan Webber

"Live hacking" in the MUD

Christopher Allan Webber at

Here's a special quandry. I want the MUD to be live hackable. Since it's already using 8sync, it already is, in the sense that you can redefine things on the fly.

It's possible to do the "runtime is all their is" approach that the network spaces desiderata document encourages, but I'm not satisfied with that. Theoretically there will be player-and-gameplay-generated content too (rooms and etc), so yes.. but I also want certain structures described in s-expressions. I have a nice syntax for it. I think it'll be a lot more pleasant for me to hack as a world-builder.

But in order for this to work, I either need to shut down and restart the system or...

... or I need a dynamic linking system, and a "rebuild-and-replace" system. Yikes!

I kind of already have the roots of the dynamic system. Structures declared in the initial structure are stored in a special mapping of 'special-object -> actor-id.

Adding support throughout the whole system for rebuilding and being replaced dynamically though? That sounds desirable but it'd take a lot of work.... it probably won't be done by the end of the jam. But it sounds like what I want. Unfortunately, the "living object" aspect of the actor model makes doing so complicated.

I wish what I wanted wouldn't be such a mess!

AJ Jordan, Charles Stanhope, Jason Self likes this.

So how did you get around this problem?

joeyh at 2016-05-05T15:37:50Z

@joeyh So I haven't totally. You can live hack mudsync, to some extent, by replacing procedures and message handlers and etc while things are running. But you can't replace an actor with a new definition.

I have a loose plan for how to do that... it'll involve some wonky surgery where new actors can "replace" old actors and their connections, and actors can optionally support a "transfer" activity where they help transfer over the important information. But that's possibly as wonky as it sounds. It'll have to be tried in a branch.

In the meanwhile I'm just restarting the server every time I redefine an actor in a way that's about one of its core (non-toplevel-procedure) properties. Not ideal, since I'd like live hacking with friends hanging out on the server! But it's doing well enouth for the game jam.

Christopher Allan Webber at 2016-05-06T01:50:16Z