Watson Game, Fall 2004: - PowerPoint PPT Presentation

About This Presentation
Title:

Watson Game, Fall 2004:

Description:

Both client/server talk in same format. Command Number. Number to identify ... Bumping into the wall that causes damage to laptop which will require repairs. ... – PowerPoint PPT presentation

Number of Views:20
Avg rating:3.0/5.0
Slides: 44
Provided by: joes48
Category:
Tags: bumping | fall | game | watson

less

Transcript and Presenter's Notes

Title: Watson Game, Fall 2004:


1
  • Watson Game, Fall 2004
  • The Server Group

2
1. The Protocol
  • Joseph Wong

3
WAG Protocol
  • TCP Connection
  • Port 1500
  • Communication between
  • Server and Client
  • Server and Database

4
Watson Game Protocol
  • Data stream format
  • CMDCMD_IDPARAM1ARG1PARAMkARGk\n
  • used as the delimiter
  • Both client/server talk in same format

5
Commands
  • Command Numbers
  • 1 Login
  • 2 Logout
  • 3 Create
  • 4 Load Player
  • 5 Load Game State
  • 6 Save
  • 7 Load Challenge
  • 8 Complete Challenge
  • 9 Get DARs
  • Examples
  • Can be found in previous semesters PowerPoint
    slides.

6
Scoring Module
  • Old Scoring Module
  • Fake GPA
  • Number of question correct / Number of questions
    4 GPA
  • Example
  • 11 correct, 15 questions
  • GPA (11/15) 4 2.933
  • Required a score of 4.0 to beat the game.

7
Scoring Module
  • New Scoring Module
  • More efficient and real
  • Requires a 2.0 GPA to graduate

8
2. The Score Module
  • Martin Goldman

9
In the Current Scoring System...
  • Course grades are precise numeric representations
  • GPA (Class1Grade Class2Grade ...
    ClassNGrade) (4/5N)
  • Example Class1Grade 3/5, Class2Grade 3/5,
    Class3Grade 5/5
  • (335)(4/5(3)) 2.933

10
In Real Life...
  • Course grades are letters -- loose
    representations
  • The new scoring module will attempt to simulate
    this concept more closely
  • GPA (Class1GradeValue Class2GradeValue ...
    ClassNGradeValue) / N

11
An Example
  • Example Class1Grade 5/5, Class2Grade 3/5,
    Class3Grade 3/5
  • Pick a grading scale, e.g. A5/5, B4/5, C3/5,
    D2/5, F1/5 or 0/5
  • Class1Grade 3/5, Class2Grade 3/5, Class3Grade
    5/5
  • Class1GradeValue 2.0, Class2GradeValue 2.0,
    Class3GradeValue 4.0
  • GPA (2.0 2.0 4.0) / 3 2.667

12
3. Game Statistics
  • Ryan Andrew

13
Watson Game Server
  • Has five global singleton objects
  • ChallengeDispatcher
  • DatabaseObject
  • Scorer
  • WGListener
  • GameKeeper manages the game statistics
  • I will focus on this object

14
Watson GameKeeper
  • getPosition() / setPosition()
  • addNewItem() / dropItem()
  • addNewPlayer() / dropPlayer()
  • getTotal()
  • setWorldDescription() / getWorldDescription()
  • showAll() - // debug
  • showItems() - // debug

15
To Be Added
  • Statistics button to Client
  • When pressed, GameKeeper receives a request for
    statistics of all players in the database
    currently logged onto the Watson Game
  • GameKeeper does a database query through the
    DatabaseObject
  • Format results and send back to the Client for
    the player to view

16
To Be Added
  • Statistics to return to Client about currently
    logged on players
  • Total time logged on this game session
  • Total time logged on in total
  • Total number of times player has logged on
  • Proper fields must be added to the database
  • With timestamp and calculations

17
My Responsibilities
  • Debug showItems(), and showAll() if necessary
  • Interact with Client and Database groups to
    design Statistics button handling and database
    field creation
  • add necessary functions to display and track
    these new statistics

18
4. Challenge Dispatching(Part 1)
  • Gene Cumm

19
Challenge Dispatching
  • Seems complete
  • Ensure functionality of current dependencies
  • WatsonGameServer.getDatabaseObject()
  • DatabaseObject.getChallenge()
  • WGCommand.getCmdID()
  • WGConnection.writeToClient()
  • WatsonResultSet .nextRow(), .getData(),
    .hasMoreRows()

20
Challenge Dispatching
  • Ensure functionality with client
  • Output matches Protocol Client expects
  • Ensure that the Table attribute names are correct
  • Matches with Database
  • Work with WGConnection owner to integrate
    ChallengeDispatcher

21
5. Challenge Dispatching(Part 2)
  • Larisse Voufo

22
Input and Dispatching Visualization
23
Process and Output Methods Used
  • getChallengeInfo
  • Text and choices
  • Correct answer
  • Major
  • checkChallengeAnswer
  • Right answer?
  • Return correct answer to client?
  • Allow second-chance if wrong?

24
Future
  • Incorporate the level and type of challenge while
    getting the Information?
  • Players level vs. Challenges difficulty level
  • Add True/False questions.

25
6. Challenge Trigger Handler
  • Roy Chung

26
Goals
  • New hot spots will have to be defined.
  • Some will be constant, for example, the elevator
    button, opening/closing doors.
  • Others hot spots will be at specific points, i.e.
    a specific corner or a certain wall.
  • A challenge will be generated depending on the
    hot spot.

27
Handler Duties
  • Client will send a message stating that the
    player has triggered a challenge.
  • The handler will determine whether the challenge
    is academic or a residential life challenge.
  • This can be identified by keeping track of the
    hot spot ID.

28
Handler Duties
  • The handler will respond with the appropriate
    type of challenge.
  • A query will be made to the database to get the
    appropriate challenge.
  • The handler will then send the challenge back to
    the client.
  • Since players can only attempt one challenge,
    other current challenges will have to be
    suspended.

29
Implementation Ideas
  • New challenges will have to be devised and
    entered into the database.
  • May need a new field to designate the type of
    challenge (academic or residential life).
  • Have specific ID numbers assigned to hot spot,
    i.e. academic starts with 1 and residential
    life challenges start with 2

30
New Challenges
  • Possible new residential challenge ideas
  • Bumping into the wall that causes damage to
    laptop which will require repairs.
  • Delivering packages to other professors or
    teaching assistants and possibly getting a reward
    (like money).
  • This will allow players to familiarize themselves
    with the environment.

31
New Challenges
  • Posting flyers on bulletin boards around the
    building
  • Buying items from vendors, i.e. extra pencil or
    paper.
  • Other ideas?

32
7. Login-Logout Support
  • Steve Safranek

33
  • What the LoginLogout Class Does
  • Handles logging in the player
  • Authenticates player
  • Logs player out

34
  • How the Class Accomplishes This
  • User enters name and password
  • These are sent to database
  • Database returns int value for one of three cases
  • User exists and password is correct, 1
  • A logged in message sent from db connection
  • User exists and password is incorrect, 0
  • Message sent telling user incorrect password has
    been entered
  • User does not exist, -1n
  • Message sent to user asking if they are new to
    the game

35
8. Player Maintenance Character Creation
Support
  • Priyal Shah

36
PlayerMaintenance Class
  • Purpose keep track of user activity
  • If a character in the database has not played the
    game for three months, activity status turns to
    Inactive
  • No activity for six months leads to account
    deletion

37
Player Maintenance (2)
  • Implementation Requirements
  • Need a Date field in Character Table of the
    database to keep track of most recent user login
  • Another Number field in Character Table to keep
    track of user activity
  • 0 Active 1- InActive
  • methods in DatabaseObject class
  • lastLoginDate(String username)
  • activityStatus(String username)

38
Player Maintenance (3)
  • Variables
  • Two final int variables ACTIVE INACTIVE
  • DatabaseObject to connect to the database
  • Methods
  • getLastLogin(String username)
  • setActivityStatus(int activity)
  • getActivityStatus(String username)
  • deleteAccount(String username)
  • activate(string username)

39
Player Maintenance (4)
  • When is it used
  • While internal Maintenance is run
  • On Login
  • Checks if the user is active
  • If active Normal process path
  • If inactive sends a message to client, so that
    it can prompt the user to activate the account
    before he/she can login

40
Character Creation support
  • Currently, code for character creation is stubbed
    off in WGConnection.
  • Fix code in WGConnection
  • Test the support code in CharacterCreation,
  • LoginLogout, ChallengeDispatcher classes
  • Fix code where needed

41
9. Game Status InfoDatabase Object Support
  • Brian Wolf

42
Wrap-up
  • Time is short we wish to especially update
    comments documentation
  • Many hands make work light
  • Bugs commented out code now examined by new eyes

43
The End
  • (Applause)
Write a Comment
User Comments (0)
About PowerShow.com