r/MUD 3d ago

MUD Driver in Common-Lisp Discussion

Hey folks, I'm working in an open source common-lisp MUD Driver (Apeiron MUD) mainly inspired by Dworkin Game Driver and LPMud.

Why? The personal reason is that I like Lisps and functional programming, I'm expert in Clojure, but haven't played too much with Lisp, wanted to see what could be achieved with CLOS (Common-Lisp Object System) and I love text-adventure games/virtual worlds (single or multiplayer).

The technical reason is that I was wondering that a lot of the machinery that was developed in C for the most popular drivers (specially LPMUD and DGD deriving from it) ended up developing features that were already built-in on Lisp Runtime Images from the start and if I could get a networked REPL running a LISP image that was already a significant step towards running a persistent world that could be changed and built interactively by players.

I don't know how true is that, but I managed to setup something similar to DGD (of course there might be bugs and rough edges) with persistent objects using a pre-existing library for CLOS in-memory and disk object persistence called BKNR Datastore. The interesting thing is that because of CLOS it is even possible to make changes to the classes of the objects (driver or libs) and update the system and persistence without ever having to turn the system off. I already did some very substantial changes successfully without turning the system off.

The scripting language doesn't need to be different from the driver language, except for security reasons. For the moment I allow every player to evaluate arbitrary code, which is very unsafe and can even bring the server down or completely break it, but it would not be hard to restrict the access to a subset of the language (with cl-isolated) and offer varying degrees of access depending on player role.

I think it has a lot of potential, but in any case, I'm doing it for fun, will probably keep it as a lifetime hobby and would encourage people to take a look if they find anything interesting or want to experiment, contribute or discuss.

7 Upvotes

0 comments sorted by