MUD (!)
April 26th, 2007 by Mario BalibreraSo we just released 0.1.1, which means you guys all get to play with the toys we’ve been working on. You’ve seen the first Orbited chat demonstration. Now here’s the first Orbited game (brought to you by the new iframe transport)!
I know you better than you think. You had your 10th birthday party at a library because you didn’t get internet access until middle school. When you got there, the librarian wouldn’t even let you play because it was peak library season. And now, you relive the shame five days a week because your boss won’t let you install zMUD on the company computer.
But you’re reading this in a web browser, right? Well, dust off your vorpal sword and join the dozens already exploring this monument to the 90’s.
This was surprisingly easy to implement, and you will soon see that I have very little ’splainin to do. Here’s how it works:
You have
- http.py
- game.py, where all the objects in the game live
- a few short files with very human-readable information about the world
- app.py
app.py is a very simple animal. Besides a world clock and a couple functions for handling basic game mechanics, app.py doesn’t really have anything but connect() and msg(), which listen to http.py, which in turn takes orders from the browser. But isn’t it time the browser listened to me, for a change?
Downstream messages are sent out by the objects in game.py and delivered by Orbited to the iframe, which signals an event that is processed in the game’s javascript.
But the developer doesn’t need to know anything about orbit, or, really, the iframe. She only needs to know four things:
- <iframe id=”events” style=”display:none;”></iframe> goes in websitename.html
- the browser connects to and updates the server with XMLHTTPRequests
- the server generates Orbit events
- the application magically updates itself
Go forth brave adventurer, full speed ahead, you’re welcome.
UPDATE 6-6-2007
0.1.3 auto-wraps events, so the server code is further simplified! And the game will be running here for a while.

August 27th, 2007 at 5:01 am
[...] good name? I think so. We’ll see, I guess. So Twisted worked beyond my wildest dreams for the MUD. Anyway, a few days ago I was showing it off and a friend of mine mentioned an IRC MUD that he had [...]