1 / 43

Watson Game, Fall 2004: The Server Group

Watson Game, Fall 2004: The Server Group. 1. The Protocol. Joseph Wong. WAG Protocol. TCP Connection Port 1500 Communication between: Server and Client Server and Database. End of arguments list. Number to identify the command. Command Number. List of arguments for the command.

albina
Download Presentation

Watson Game, Fall 2004: The Server Group

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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. End of arguments list Number to identify the command Command Number List of arguments for the command Watson Game Protocol • Data stream format CMD;CMD_ID;PARAM1=ARG1;…;PARAMk=ARGk\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 semester’s 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 • (3+3+5)*(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. A=5/5, B=4/5, C=3/5, D=2/5, F=1/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? • Player’s level vs. Challenge’s 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 Info&Database 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)

More Related