View Single Post
Old 07-24-2013, 03:05 PM   #5
swampdog
Member
 
Join Date: Jul 2010
Posts: 31
swampdog is on a distinguished road
Re: Proof of Concept: Android App Directly Integrated into Existing MUd

In this case MCCP is irrelevant because the node.js server is the only one interacting with the MOO directly. You're not sending MOO packets to the browser at all, but rather to the node server which then sends either a JSON packet or an event to the browser and the browser then emits events back to the node server. And socket.io (a component of node.js) supports gzip of all communications on the socket, whether to the MOO or to the browser.

I got the inspiration from this client: - which has examples of the event emitting and node proxy system, although it is only used to create a text entry MUD client. Going a step farther I've got my HTML layouts updating based on incoming JSON data or changing displays based on emitted events from the server (which themselves are generated by parsing the outgoing JSON data for special commands).

I do support MCP, MSP, MXP, MSDP, and the generic moo "out of band commands" on the MOO for text players, and the game is still text accessible. Even though it would actually be easier to just rewrite the game itself in node.js, I do want to keep the game itself as a MUD, while extending the appeal with a fully graphical HTML5 client.

I'm not overly familiar with GMCP but I haven't implemented it MOO side, so this does seem easier, especially with the ability javascript has to instantly parse and use JSON structures. And again, since the client (browser) isn't interacting with the MOO directly, and since the MOO can send JSON packets just fine, it seems unnecessary. I'm pretty interested in this stuff, so it's always interesting to see what other people have done or are thinking about.
swampdog is offline   Reply With Quote