Transcript Visual jMUD

Visual jMUD
Oscar Chen
CS491
Important Note
• The IMAGES used in this presentation and demonstration of Visual
jMUD are COPYRIGHT by their respective holders and are only
meant to illustrate an example and should NOT be
REDISTRIBUTED or DISPLAYED in any other context.
What is a MUD?
• A MUD is a Multi User Dungeon
– A shared playing environment and experience
• Most MUDs are text based
– Rooms are text based
– Action feedback is given to the user as a
written description
Why Operate a MUD?
• Allows administrators to create their own
worlds, rule sets
• Smaller, more tight-knit communities than
those found on commercial Massively
Multiplayer Online RPGs (MMORPGs)
Visual jMUD’s Purpose
• Create a Graphical MUD environment
– Make it easily accessible for new players
• Based on Modern standards
– Built with Java, Hibernate, MySQL
– Easily modifiable with Open Source tools
• Efficient Use of Bandwidth
– MUDs are run by enthusiasts, not corporations
The Visual jMUD Server
Server Technologies
• Built in Java
– Requires Java 1.4+
• For New I/O Package (java.nio)
• Utilizes Hibernate for data retrieval and
storage
– Requires SQL database with supported JDBC
connectivity
Server Flow
• Process Server events (independent of User
action)
• Receive command from the User Client
• Process command from User, applying the
current Game Rule Set
• Return the result of the User command and
Server events to the Client
Server Classes
• Rooms, Objects, Players loaded by Hibernate
from SQL database
• Hibernate abstracts SQL tables into Java
classes
• Hibernate transparently handles transactions,
queries and data storage
• http://www.hibernate.org
Main Server Thread
• Process independent Server Events
• Check for User Input
• Track User and Object status (health,
location, etc.)
Command Processor
• Executes when a User Command is received
• Validates User input
• Determines what the Command targets: Users,
Rooms, or Objects
• Applies the Command to the target
Possible User Interactions
• Communication with other Users
• Navigate Virtual World (represented as individual
Rooms)
• Interact with Objects
– Attack Monsters
– Examine Treasure Chests
– Etc.
• Initial Set of Possible actions will be limited in
comparison with a normal MUD, but easily extensible
The Visual jMUD Client
Client Technologies
• Built in Java
– Standalone Application
– Java2D for Graphics
– Java Web Start for easy Installation and
Updates
• http://java.sun.com/products/javawebstart/
Client Flow
• Waits for updates from Server or User
• Parses Server responses to display visually to
the player
– Retrieves Images to represent the current Room
– Displays Images to represent the current Users and
Objects existing in the room
• Sends User Commands to Server
Client Visualization Flow
• Receive Necessary information from Server
• Upon Entry to a New Room
– Draw “Background Image” to represent current User Room
– Determine Artificial Horizon line to draw Players and Objects
upon
– Overlay Player and Object Images on the Background against
the Artificial Horizon
• As the Server Updates the Room status
– Redraw Players and Objects to reflect the current status of the
Room
• Player movement, Object interaction, changing Room conditions,
etc.
Client Structure
• VJMClient class handles command
parsing and processing
• VisualArea class handles the visual
presentation
– Draws the scene
• Consisting of Background, Title, and
Players/Objects
Demonstration
• Server address: blackgate.raidgroup.net
• Client location:
http://the.raidgroup.net/visualjmud
• User logins:
– Currently five user accounts available.
• user1:user1 … user5:user5
Thank You
• Visual jMUD
• Oscar Chen
– CS491
– [email protected]
• http://cs.calstatela.edu/~wiki/index.php/Courses/CS_491
b/Fall_2005/Oscar_Chen