cs 495b client group n user interface – jesse jenifer n graphics handling – matt yourst n...

39
CS 495b Client Group CS 495b Client Group User Interface – Jesse Jenifer User Interface – Jesse Jenifer Graphics Handling – Matt Yourst Graphics Handling – Matt Yourst Protocol Handling – Brian Boyd Protocol Handling – Brian Boyd Client Design – Seth Levenberg Client Design – Seth Levenberg In Depth Design – Lee Duvall In Depth Design – Lee Duvall Soundtrack and Audio – Daniel Soundtrack and Audio – Daniel Baxter Baxter

Post on 21-Dec-2015

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

CS 495b Client GroupCS 495b Client Group

User Interface – Jesse JeniferUser Interface – Jesse Jenifer Graphics Handling – Matt YourstGraphics Handling – Matt Yourst Protocol Handling – Brian BoydProtocol Handling – Brian Boyd Client Design – Seth LevenbergClient Design – Seth Levenberg

In Depth Design – Lee DuvallIn Depth Design – Lee Duvall Soundtrack and Audio – Daniel Soundtrack and Audio – Daniel

BaxterBaxter

Page 2: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

User InterfaceUser Interface

Jesse JeniferJesse Jenifer

Page 3: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

User InterfaceUser Interface

Page 4: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

Watson WalkthroughWatson Walkthrough

Imaging ModelImaging Model

presented bypresented by

Matt T. YourstMatt T. Yourst

Page 5: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

Each location on map Each location on map has:has:

(x, y) coordinate matching one in (x, y) coordinate matching one in databasedatabase

List of possible directions relative to List of possible directions relative to viewerviewer

Link to destination location for each Link to destination location for each direction; forms a graph structure of direction; forms a graph structure of discrete positions.discrete positions.

Page 6: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

Each locationhas a coordinate

and a set of directions(links to other locations)

Active roomsare in red,

inactive roomsare in gray.

Green forfloor entry

Page 7: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

Imaging ModelImaging Model

180-degree panoramic photographs 180-degree panoramic photographs presented as player's viewpoint. presented as player's viewpoint.

Hotspots on view are clicked to select Hotspots on view are clicked to select movement direction.movement direction.

For each location, both front facing For each location, both front facing (180-degree view) and back facing (e.g., (180-degree view) and back facing (e.g., down hallway) images for consistency.down hallway) images for consistency.

Sprite modelSprite model (alpha blended photo (alpha blended photo overlays) used to present characters in scene.overlays) used to present characters in scene.

Page 8: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

User Interface PreviewUser Interface Preview

Item #1 Item #2 Item #3 Item #4 Item #5 Item #6

Items

Hotspots on image areclicked to go that direction

Items playercurrently owns

Page 9: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

Additional Image DetailsAdditional Image Details

Image Retrieval:Image Retrieval:Images stored as progressive JPEG filesImages stored as progressive JPEG files

Retrieved from web server via HTTPRetrieved from web server via HTTP

After move, client notifies server of new After move, client notifies server of new coordinates and retrieves relevant datacoordinates and retrieves relevant data

Page 10: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

Protocol HandlingProtocol Handling

Presented by BG BoydPresented by BG Boyd

Page 11: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

Possible CommandsPossible Commands CommandsCommands

– Commands have Commands have parametersparameters

Move x yMove x y Pick “Pencil”Pick “Pencil” Say “Lets make a text Say “Lets make a text

game!”game!” Attack “Steflik”Attack “Steflik”

– Amount of parameters Amount of parameters will be variable.will be variable.

Some commands will Some commands will only need 1, some will only need 1, some will need moreneed more

11 SaySay

22 MoveMove

33 PickPick

44 UseUse

55 AttackAttack

66 BuyBuy

Page 12: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

Sending commandsSending commands Communicate with server via simple Java Communicate with server via simple Java

TCP Socket class.TCP Socket class. We will send commands to the server via a We will send commands to the server via a

message stringmessage string– Message = ”@COMMAND“ + @p1 + @p2 + …Message = ”@COMMAND“ + @p1 + @p2 + …– There will be no spacesThere will be no spaces– @ is the token@ is the token

Just as a space is in a StringTokenizerJust as a space is in a StringTokenizer– ExamplesExamples

@Say@Do you have a mint?@...@Say@Do you have a mint?@...– Since @ is the tokenizer not “ “, the whole phrase will Since @ is the tokenizer not “ “, the whole phrase will

stay in tactstay in tact ““@Move@3@4”@Move@3@4”

– Means: Player requests to move to room 3,4 in the GridMeans: Player requests to move to room 3,4 in the Grid

Page 13: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

Message String Broken Message String Broken DownDown

Page 14: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

Receiving commandsReceiving commands

You may have noticed there is no You may have noticed there is no player identifier in the command player identifier in the command string.string.– a.k.a. PID (Player ID)a.k.a. PID (Player ID)– The server will keep track of the PIDs The server will keep track of the PIDs

for all players.for all players.– It will know who is sending the It will know who is sending the

message, so there is no reason for us message, so there is no reason for us to re-identify ourselvesto re-identify ourselves

Page 15: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

Receiving commandsReceiving commands

After the server gets our command, it After the server gets our command, it will act accordingly and send us the will act accordingly and send us the required information back in another required information back in another string that the client will have to parse.string that the client will have to parse.

If the move command was sent, the If the move command was sent, the reply will contain the people, and items reply will contain the people, and items in the room (and of course the new in the room (and of course the new coordinates).coordinates).

Page 16: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

Client DesignClient Design

Seth LevenbergSeth Levenberg

Page 17: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

Client DesignClient Design

Log inLog in Choose characterChoose character

– Male or female Watson studentMale or female Watson student GUIGUI

– ControlsControls– MovementMovement– InventoryInventory

Page 18: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

Client DesignClient Design

Beginning a gameBeginning a game– Start as a freshmanStart as a freshman– Gain experienceGain experience

Talking to professorsTalking to professors Getting grades for classesGetting grades for classes

– Have scheduleHave schedule One class at a timeOne class at a time

Page 19: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

Client DesignClient Design ScenariosScenarios

– Professor’s officeProfessor’s office Talk to professor about gradesTalk to professor about grades

– Support StaffSupport Staff Gain experience by talking to support staffGain experience by talking to support staff

– TA’sTA’s Talk to TA’s for experienceTalk to TA’s for experience

– HallwaysHallways Basic movement through buildingsBasic movement through buildings

– ActionsActions Take testTake test Work on projectWork on project Etc.Etc.

Page 20: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

Client DesignClient Design ObjectsObjects

– Objects will appear at random in roomsObjects will appear at random in rooms– Pick up object to put in knapsack (inventory)Pick up object to put in knapsack (inventory)– Choice of using objects in different scenariosChoice of using objects in different scenarios

MapMap– Map will become clearer as more experience Map will become clearer as more experience

is gainedis gained– Display current locationDisplay current location

Page 21: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

Client DesignClient Design

GoalsGoals– Finish every semester’s class with a decent Finish every semester’s class with a decent

grade to move on to the next semestergrade to move on to the next semester– Finish all 4 years for a CS degreeFinish all 4 years for a CS degree– Better grades for better score, if scoring Better grades for better score, if scoring

system is implementedsystem is implemented Room for improvementRoom for improvement

– Student interaction scenariosStudent interaction scenarios– More buildingsMore buildings– More classes and objects at onceMore classes and objects at once

Page 22: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

In Depth DesignIn Depth Design

Lee DuvallLee Duvall

MovementMovementData passingData passing

Page 23: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

One Step at a timeOne Step at a time

MovementMovement– How to display proper image with How to display proper image with

only sending x,yonly sending x,y Message PassingMessage Passing

– Simplest means to send all needed Simplest means to send all needed infoinfo

Page 24: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

MovementMovement

Client must hold images.Client must hold images.– Saves on bandwidthSaves on bandwidth

Server needs to know followingServer needs to know following– BuildingBuilding– FloorFloor– X, YX, Y

Page 25: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

Directory structureDirectory structure

1 X Images/items/1 X Images/items/ N X N X

Images/Buildings/BuildingName/Images/Buildings/BuildingName/– Can create future buildingsCan create future buildings– Building name is only passed when Building name is only passed when

character logs in or changes character logs in or changes buildings.buildings.

Page 26: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

File namesFile names

Items: itemname.jpgItems: itemname.jpg– Wanted to number them, but to save Wanted to number them, but to save

time stick with passing item name for time stick with passing item name for reference.reference.

Rooms: FDXY.jpgRooms: FDXY.jpg– F = Floor. This is passed only when changing floors F = Floor. This is passed only when changing floors

and creating/logging a character.and creating/logging a character.– D = Direction. This is used only by client.D = Direction. This is used only by client.– X, Y = (x,y) This is room grid. This is passed X, Y = (x,y) This is room grid. This is passed

whenever player moves.whenever player moves.

Page 27: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

Message passingMessage passing

Rough design for this established with Rough design for this established with meeting with DB group.meeting with DB group.

Basis for message passing comes from Basis for message passing comes from my internship at Infimed.my internship at Infimed.

Simplifies the data passed from server Simplifies the data passed from server to client lowering the amount of to client lowering the amount of bandwidth utilized. Originally bandwidth utilized. Originally suggested commands be numerically suggested commands be numerically based, but groups prefer to program based, but groups prefer to program with full text names.with full text names.

Page 28: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

Structure of messageStructure of message

Message structure appears as the Message structure appears as the following:following:– ““@move@x@Y”@move@x@Y”

Server parses this string and runs the Server parses this string and runs the move command.move command.– This would put the new X,Y in the This would put the new X,Y in the

database and return the string with the database and return the string with the new room infonew room info

– ““@newroom@etc”@newroom@etc”

Page 29: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

Needed workNeeded work

Message list is small now.Message list is small now. Until character creation and login Until character creation and login

are finished the command list are finished the command list should stay small.should stay small.

Server and Client need to discuss Server and Client need to discuss potential commands and what potential commands and what data needs passing.data needs passing.

Page 30: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

Soundtrack and Audio Soundtrack and Audio ProcessingProcessing

Daniel BaxterDaniel Baxter

Page 31: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

OverviewOverview

FormatFormat StyleStyle HowHow

Page 32: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

Client or Server?Client or Server?

Part of the clientPart of the client Removes unnecessary transfer of Removes unnecessary transfer of

datadata Perhaps if this was a commercial Perhaps if this was a commercial

program would be a more program would be a more desirable optiondesirable option– New music every month or so with New music every month or so with

upkeepupkeep

Page 33: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

FormatFormat

MIDIMIDI using javax.sound.midiusing javax.sound.midi Why midi?Why midi?

– Java’s got that nifty built in stuffJava’s got that nifty built in stuff– Doesn’t take up much spaceDoesn’t take up much space– Totally easy – then I just have to use Totally easy – then I just have to use

a keyboarda keyboard

Page 34: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

StyleStyle

Musical styleMusical style– I’m gonna be all over the placeI’m gonna be all over the place

Implementation styleImplementation style– Intro (main theme)Intro (main theme)– Normal background musicNormal background music– Action background musicAction background music

Page 35: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

How is this goin down?How is this goin down?

Easy – events are sent from the Easy – events are sent from the client to a Soundtrack objectclient to a Soundtrack object– Types of events are the 3 Types of events are the 3

implementation stylesimplementation styles Soundtrack object selects Soundtrack object selects

appropriate midi and plays it – appropriate midi and plays it – BAM, musicBAM, music

Page 36: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

DiagramDiagram

Client

Instanceof

SoundtrackObject

Page 37: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

DiagramDiagram

Client

Instanceof

SoundtrackObject

Dude, I need some music

Page 38: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

DiagramDiagram

Client

Instanceof

SoundtrackObject

OK, I’m

on it, boss

Page 39: CS 495b Client Group n User Interface – Jesse Jenifer n Graphics Handling – Matt Yourst n Protocol Handling – Brian Boyd n Client Design – Seth Levenberg

DiagramDiagram

Client

Instanceof

SoundtrackObject