jump to navigation

Modern MUD May 22, 2018

Posted by PythonGuy in Uncategorized.
add a comment

Thinking about how I would write a MUD nowadays, I realized that they are quite useful for stateful applications.

Regardless, one of the interesting things is the idea that you have to be able to store the state of your MUD and restore from a previously stored state. Using greenlets and such to track the states of the various on-going events makes that incredibly difficult. Instead, you’ll want to introduce a data structure that represents the state of the thing.

Really, what we want is a language that can be stored to disk, and when recovered, go back to its previous state, despite whatever changes have happened around it. Obviously, this language can’t talk to open file handles or anything to do with the OS at all. It would need a way of communicating with the outside world, and something like a pubsub service would be ideal.

Writing in this language, the code for the world would be easier to describe, but you’d have to keep in mind that you have thousand if not millions of “threads” running at once.

Anyway, food for thought.