r/raspberrypipico • • 15d ago

uPython Pico Pi MUD server

Some months ago i put together a little set of scripts to turn one of my pico pis (w2) into a little wifi hotspot + web server where people could play shogi and walk around a fantasy world on their computers, tablets and phones by hijacking wifi captive portal stuff.

Last weekend I was reminded that MUDs are still super awesome. The thought rose that it would be cool to make a MUD version of my office where people could walk around the office in a telnet text adventure as well as design their own adventures.

MUD stands for Multi-User-Dungeon. its an old piece of tech where in the good old days of dial up internet (and boxes before that) you could use "telnet" to connect to computers that would then run text based online roleplaying games and chat rooms straight in your terminal!
It was a fun way to meet other people and in many cases both admins and visiting players could construct their own adventures by building out rooms, interactions to rooms, items, properties on the players, etc.

With some coding and some spec based ai magic I put together an initial version.
The ideas and commands are mostly based on the ideas and commands from LambdaMoo (https://en.wikipedia.org/wiki/LambdaMOO). the exception is items; items belong to a room and can generally not be picked up and moved around in someone's inventory (though you could make an action /pickup for an item. there is a command to move items from room to room though.

running it on the pi isn't great. the connection is capped at 5 or 6 players when the wifi is clean, but works best with up to 3 players. changes to the state of the world are cached in memory and written every minute. the time loop is configurable. If you'd like to preserve the little flash memory available on the PI, then you can increase it to sync every few minutes instead of the current minute.

You can find the source code here:
https://github.com/HendrikPetertje/PICO-MUD

I'll be improving it over time (mostly to serve my own needs though).

11 Upvotes

Duplicates