CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg n In Depth Design – Lee Duvall n Soundtrack and Audio – Daniel Baxter
User Interface Jesse Jenifer
User Interface
Watson Walkthrough Imaging Model presented by Matt T. Yourst
Each location on map has: (x, y) coordinate matching one in database List of possible directions relative to viewer Link to destination location for each direction; forms a graph structure of discrete positions.
Imaging Model 180-degree panoramic photographs presented as player's viewpoint. Hotspots on view are clicked to select movement direction. For each location, both front facing (180- degree view) and back facing (e.g., down hallway) images for consistency. Sprite model (alpha blended photo overlays) used to present characters in scene.
User Interface Preview Item #1 Item #2 Item #3 Item #4 Item #5 Item #6 Items
Additional Image Details Image Retrieval: Images stored as progressive JPEG files Retrieved from web server via HTTP After move, client notifies server of new coordinates and retrieves relevant data
Protocol Handling Presented by BG Boyd
Possible Commands n Commands –Commands have parameters n Move x y n Pick “Pencil” n Say “Lets make a text game!” n Attack “Steflik” –Amount of parameters will be variable. n Some commands will only need 1, some will need more 1Say 2Move 3Pick 4Use 5Attack 6Buy
Sending commands n Communicate with server via simple Java TCP Socket class. n We will send commands to the server via a message string –Message = + … –There will be no spaces is the token n Just as a space is in a StringTokenizer –Examples n you have a is the tokenizer not “ “, the whole phrase will stay in tact n –Means: Player requests to move to room 3,4 in the Grid
Message String Broken Down
Receiving commands n You may have noticed there is no player identifier in the command string. –a.k.a. PID (Player ID) –The server will keep track of the PIDs for all players. –It will know who is sending the message, so there is no reason for us to re-identify ourselves
Receiving commands n After the server gets our command, it will act accordingly and send us the required information back in another string that the client will have to parse. n If the move command was sent, the reply will contain the people, and items in the room (and of course the new coordinates).
Client Design Seth Levenberg
Client Design n Log in n Choose character –Male or female Watson student n GUI –Controls –Movement –Inventory
Client Design n Beginning a game –Start as a freshman –Gain experience n Talking to professors n Getting grades for classes –Have schedule n One class at a time
Client Design n Scenarios –Professor’s office n Talk to professor about grades –Support Staff n Gain experience by talking to support staff –TA’s n Talk to TA’s for experience –Hallways n Basic movement through buildings –Actions n Take test n Work on project n Etc.
Client Design n Objects –Objects will appear at random in rooms –Pick up object to put in knapsack (inventory) –Choice of using objects in different scenarios n Map –Map will become clearer as more experience is gained –Display current location
Client Design n Goals –Finish every semester’s class with a decent grade to move on to the next semester –Finish all 4 years for a CS degree –Better grades for better score, if scoring system is implemented n Room for improvement –Student interaction scenarios –More buildings –More classes and objects at once
In Depth Design Lee Duvall Movement Data passing
One Step at a time n Movement –How to display proper image with only sending x,y n Message Passing –Simplest means to send all needed info
Movement n Client must hold images. – Saves on bandwidth n Server needs to know following –Building –Floor –X, Y
Directory structure n 1 X Images/items/ n N X Images/Buildings/BuildingName/ –Can create future buildings –Building name is only passed when character logs in or changes buildings.
File names n Items: itemname.jpg –Wanted to number them, but to save time stick with passing item name for reference. n Rooms: FDXY.jpg –F = Floor. This is passed only when changing floors and creating/logging a character. –D = Direction. This is used only by client. –X, Y = (x,y) This is room grid. This is passed whenever player moves.
Message passing n Rough design for this established with meeting with DB group. n Basis for message passing comes from my internship at Infimed. n Simplifies the data passed from server to client lowering the amount of bandwidth utilized. Originally suggested commands be numerically based, but groups prefer to program with full text names.
Structure of message n Message structure appears as the following: n Server parses this string and runs the move command. –This would put the new X,Y in the database and return the string with the new room info
Needed work n Message list is small now. n Until character creation and login are finished the command list should stay small. n Server and Client need to discuss potential commands and what data needs passing.
Soundtrack and Audio Processing Daniel Baxter
Overview n Format n Style n How
Client or Server? n Part of the client n Removes unnecessary transfer of data n Perhaps if this was a commercial program would be a more desirable option –New music every month or so with upkeep
Format n MIDI n using javax.sound.midi n Why midi? –Java’s got that nifty built in stuff –Doesn’t take up much space –Totally easy – then I just have to use a keyboard
Style n Musical style –I’m gonna be all over the place n Implementation style –Intro (main theme) –Normal background music –Action background music
How is this goin down? n Easy – events are sent from the client to a Soundtrack object –Types of events are the 3 implementation styles n Soundtrack object selects appropriate midi and plays it – BAM, music
Diagram Client Instance of Soundtrack Object
Diagram Client Instance of Soundtrack Object Dude, I need some music
Diagram Client Instance of Soundtrack Object OK, I’m on it, boss
Diagram Client Instance of Soundtrack Object