?

Log in

No account? Create an account

Abi

Previous Entry Share Next Entry
11:22 am: I finally started work on the web mud client today. This has gone better than I expected. I am able to load up a web page, type a command into a box, press a button, and then have it log in to the mud as a user, do that command, and send the result back for display in the HTML page, which displays with formatting as it would have done in a telnet.






I am declaring victory for today.


The big missing thing is that each time I do a command it logs me in and out, so we need some kind of persistent server-side process that maintains the connection. This will probably be a Comet-style hidden-IFrame thingy, so it can asynchronously send the output of other people's commands to you. The tricky bit will be synchronising this and the HTTP POSTs we'll be sending on each command - which will either involve doing a lot of HTTP server wrangling, or possibly just some backend changes to the MUD to allow transient connections to provide an auth cookie and a command, and have the output sent to them, which might be easier. Also there is the issue of ordering to consider: for the moment I might just make it not possible to execute a command until the answer for the previous command has come back, which will probably not be ideal for production use but will do.

Eventually I'll make some significant changes to the mud's output backend to make the output we can display in the browser nicer: we have an internal formatting markup that I can just dump out directly, which can provide richer information than just the ANSI escape codes (like, it knows the difference between a playername and something that happens to be in bright cyan). Also we can annotate the bits that actually need to be in >pre;< (ASCII art, tables), and then have the prose be in a proportional font. (maybe tables can end up being actual HTML tables, that sort of thing.)

But for now I just need to get the Comet bit working.


Tags: ,

Comments

[User Picture]
From:squirmelia
Date:November 10th, 2010 12:20 pm (UTC)
(Link)
People still use MUDs? :)
[User Picture]
From:abigailb
Date:November 10th, 2010 12:23 pm (UTC)
(Link)
No. This is what I am hoping to fix!
[User Picture]
From:squirmelia
Date:November 10th, 2010 01:18 pm (UTC)
(Link)
Ah, I see!

Just having a look to see if Mono still has any linked. Hmm.. 1 up, 2 down, apparently.
[User Picture]
From:plexq
Date:November 11th, 2010 04:01 am (UTC)
(Link)
Mono? Is that thing still going? Haven't been on ther ein years!
[User Picture]
From:squirmelia
Date:November 11th, 2010 10:04 am (UTC)
(Link)
It is indeed still going. You should obviously log on again to see.
From:thatmakesmemad
Date:November 10th, 2010 01:07 pm (UTC)
(Link)
A return to the days when they did something useful at Essex University ?
I would say this makes me feel so old as I remember reading articles about the original MUD when it first went online. But i don't do feeling/thinking old.
What's the overall motivation behind this ? A yearning for the days when adventure games as exemplified by the products of Infocom had richly described textual environments with dashes of, god forbid,humour unlimited by bandwidth or graphics limitations (The Hobbit, a gateway to a brave new world or the beginning of the fall, discuss) and actions aside from KILL,KILL,KILL or er KILL ?
[User Picture]
From:abigailb
Date:November 10th, 2010 01:39 pm (UTC)
(Link)
See, we have this MUD, which is 13 years old now.

But hardly anyone plays our MUD any more, while there are plenty of vaguely MUD-type web games that are massively popular. If we can tap into 0.01% of that space, it's still way more users than we've got at the moment. So can we lower the barrier to entry (ie make it so you don't need to use a dedicated client), and make it less like a throwback to the 1980s (ie using proper text rendering rather than monospace, possibly even change the colours round so its black-on-white)? A web-based mud client can do both these. What we currently have on our website is a Java telnet applet, which is all well and good but it's still a Java telnet applet at the core of it - it's not resizable, etc etc.

And anyway, I've been meaning to do this for ages...
[User Picture]
From:plexq
Date:November 11th, 2010 03:58 am (UTC)
(Link)
In Elysian fields i achieved this sort of de facto. A users object and their current socket connection are divorced from one another. If a user sufferrs link death, their object remains in world for a period of time until such a time as it times out. The time out is dermined when they go link dead, so for an http connection, the timeout is just set relatively high. It's not perfect perhaps, but it does sort of work in most cases. Things like personal tells are then queued as mail objects (at least in theory, I'm not sure I ever got that far in the implementation).

I'm not sure how you are bridging from http to the mud, back in those days i was masochistic enough to actually implement http in the mud.
[User Picture]
From:abigailb
Date:November 11th, 2010 07:52 am (UTC)
(Link)
We have linkdead, but I don't think it's suitable for what I want as things get suspended durin a link death.

I ended up doing a lot more coding since this post and got the server-side push working as well as commands. I hope to bring it to a state where I can put it up soon.
Powered by LiveJournal.com