my dog learned polymorphism
The moose likes Game Development and the fly likes MUD client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Game Development
Bookmark "MUD client" Watch "MUD client" New topic

MUD client

Piter Smith
Ranch Hand

Joined: Feb 25, 2009
Posts: 55
I'm working on a MUD client, using Apache Telnet. Here's an excerpt from wikipedia for context:

Generally, a MUD client is a very basic telnet client that lacks VT100 terminal emulation and the capability to perform telnet negotiations.

Here's my basic structure:

├── telnet
│   ├──
│   └──
└── weather

I'm having a major design problem:

TelnetConnection connects to the remote MUD server through Apache TelnetClient. Messages to the remote game server are managed here.

The IOUtil class is adapted from the Apache sample, and handles:

1.) console input
2.) console output
3.) redirecting output

The third point, redirecting remote output for regex parsing, is tricky. What, or where, should that output go? Currently, it goes to, not surprisingly, Regex for parsing. That part is okish, but then what does Regex do? The connection is back in TelnetConnection, which Regex doesn't have a reference to. IOUtil is all static methods, and doesn't have a reference to TelnetController, either.

Possibly TelnetController could be an Observer, but that seems wrong. TelnetController is a resource, and the Controller should send messages to TelnetConnection. But what messages? The messages are in Regex, which does not have a reference in the Controller. Only IOUtils has a reference to the Regex parser.

Hopefully, that problem description makes sense.

Then, it gets messier.
I agree. Here's the link:
subject: MUD client
It's not a secret anymore!