Basically, I rewrote the MUD to accept HTTP requests and wrap a javascript call around the output from each pulse. Taking Matt's advice, I decided to use <b> tags with short class names, rather than the <span style=”color:…”> stuff I was doing before.
Example (mud prompt):
<script>parent.push('<br><b class=g><20hp 100m 100mv> <b class=X>');</script>The browser downloads this “page” inside a hidden <iframe> (using the hack I previously posted for Internet Explorer, just a plain iframe for FF). The push() function in the frame’s parent creates a new <pre> tag, stuffs the argument text inside it, then appends it to the display <div>. Then the div’s scroll is set to the bottom.
Mud input uses a form submit handler, which takes the value of the <input> and sticks it into an XMLHttpRequest, which is sent to the aforementioned worst web server implementation ever.
I hacked it into QuickMUD rather than my own code base so that, should I ever decide to clean it up, other people can use it.
Okay, so it’s pretty trivial. But it was fun.


You could build up a fairly media-rich game this way. hmmm… Now I want to do that.