webHugo 1.0 - Web-based Interactive Fiction System
webHugo Architecture Overview |
webHugo is a port of an interactive fiction system called Hugo by Kent Tessman. For those not familiar with "Interactive Fiction", I'll give my brief description. For a more comprehensive collection of articles and links, visit About.com's Interactive Fiction Guide. The original term for interactive fiction style games was simply "adventure games". My first experience with this sort of computer-based recreation was about 20 years ago, with a game called "Pirate Adventure" by Scott Adams (not the Scott Adams of Dilbert fame). The game was running on the TRS-80 Model I at my high school, with 4 kilobytes of RAM and a cassette recorder in place of a disk drive. It took about 15 minutes (that's right, 15 minutes) to load the program from cassette. It was worth every minute of finger-tapping anxiety. Once the game was running, my classmates and I found ourselves immersed in a story - not just reading the story, but participating in it. By typing in shortened English sentences like "get book" or "light torch", we could control the main character in the story. The story was also a puzzle, since there was an objective other than just wandering about in an imaginary land. By interacting with the things in the game one could find clues to meet the objectives - like finding buried treasure. Since that time, I've been hooked on this genre of computerized entertainment. For a number of years, I've experimented with programming systems that enable one to build adventure games. Some time ago, it occurred to me to introduce a traditional interactive fiction system to the web. Rather than write my own interactive fiction programming language, I decided to pick an existing system with available source code and some cross-platform capabilities. Hugo is one of the better engines, and it met both of these criteria. My goal is to help revive - to whatever extent possible - the popularity of interactive fiction by merging the technology with web. Let's face it, the average video game today is far more visually appealling than your typical interactive fiction-style game. The objective with webHugo is provide multi-player, multi-session capabilities to an application that will use a web browser for the user interface. A user would be able to connect to a web server running webHugo and either join a game already in progress or start a new session. The webHugo engine tracks individual user movements through the system and object inventories and manages all of the running sessions. |
Hugo port of the Pirate Adventure |
There are three major components to this system. First is the Hugo engine itself. Kent and others that have worked on the various ports have done a great job making the engine code easy to modify. Second, the system has a virtual window manager that is used to intercept any of the normal output from the Hugo engine. This window manager transparently allows the engine to create and destroy windows, position the cursor, set fonts and colors and output text (and eventually graphics). The webHugo virtual window manager tracks all of the information for all of the windows in all of the running sessions within an instance of the Hugo engine. At any time, the window manager can send session/window information back to the client web browser through the third component - the Hugo web adaptor. An instance of this program is started for every user that wants to connect to webHugo via a web browser. The web adaptor then makes a network connection to the Hugo engine. When Hugo needs to send screen information to the client web browser, it sends the virtual window information over the network to the web adaptor, which converts this screen information to HTML and relays it to the client via the web server. Along with the screen information, the virtual window manager sends any requests for user input (the "what do you want me to do"-type prompts). This prompt is translated into an HTML form and merged with the screen output that gets sent back to the client's browser. The windows on the Hugo virtual screen all have configurable screen buffers that are converted into scrollable text areas on the output webpage. The end result is something that looks similar to the traditional interactive fiction user interface - running inside a web browser. This project has been broken up into phases:
At this point, we are in the third phase
of development. Phase two still has some
holes, but the pieces are coming together
nicely. The next update to this page should
include some screen shots of the webHugo
interface, along with a summary of the techology
requirements for building webHugo. Check
back with this page for status updates. |