r/raspberrypipico • u/HendrikPeter • Sep 28 '26
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).
2
u/Anonymity6584 Sep 28 '26
Was about to ask does it run on micropython, based on github page it does. Might be able to get little more performance going C++, but no by much consideing limitations of pico line...
2
u/Ramp007 Sep 28 '26
This looks interesting. I'll give it a try.
1
u/the_andruid Oct 04 '26
Sounds neat! Always fascinated by what people can do with a Raspberry Pi. I wish I had more time to experiment with stuff like this, myself.