Project: The Watson Game - Binghamton



Project: The Watson Game

Function: Client

Subsystem: Chat Client (GUI)

Author: Todd Grober

Date: 5/08/05

1 Introduction 3

1.1 Goals and objectives 3

1.2 Statement of scope 3

1.3 Software context 3

1.4 Major constraints 3

2 Data design 4

2.1 Internal software data structure 4

2.2 Global data structure 4

2.3 Temporary data structure 4

2.4 Database description 4

3 Architectural and component-level design 4

3.1 Program Structure 5

3.1.1 Architecture diagram 5

3.1.2 Alternatives 5

3.2 Description for Chat Client GUI Component 5

3.2.1 Processing narrative (PSPEC) for chat client GUI 5

3.2.2 Chat GUI interface description. 6

3.2.3 Chat GUI processing detail 6

3.3 Software Interface Description 7

3.3.1 External machine interfaces 7

3.3.2 External system interfaces 7

3.3.3 Human interface 7

4 User interface design 7

4.1 Description of the user interface 7

4.1.1 Screen images 7

4.1.2 Objects and actions 9

4.2 Interface design rules 9

4.3 Components available 9

4.4 UIDS description 9

5 Restrictions, limitations, and constraints 10

6 Testing Issues 10

6.1 Classes of tests 10

6.2 Expected software response 10

6.3 Performance bounds 10

6.4 Identification of critical components 10

7 Appendices 11

7.1 Requirements traceability matrix 11

7.2 Packaging and installation issues 11

7.3 Design metrics to be used 11

7.4 Supplementary information (as required) 11

SOFTWARE DESIGN SPECIFICATION

Introduction

The Watson Game is a virtual simulation of the Engineering building and of students walking through the building. The game differs a little from real life as students spend their entire time in the engineering building and take tests to boost their gpa there, rather than going to different class rooms and taking courses and tests as real students do.

The chat client will allow students(users) to solicit help from other students and/or talk during the game.

1 Goals and objectives

The overall goal of this class is to get the Watson Game fully working and operational, creating a very life-like scenario. The goal for my part of this project is to get the chat GUI operational so that it could be integrated with the networking part of the chat client.

2 Statement of scope

The Watson Game resembles a 3D type game such as Doom, only without the violence when you make a mistake or succeed in the game. Users can create new accounts or load previous ones and either continue from a previous position in the game or if new, begin by the elevator on the 3rd floor of the engineering building.

The Chat Client (GUI portion) enables a chat button to appear on the bottom of the screen and upon pressing the button, a chat window opens up to allow the user to select a user in the game to talk to and then begin the conversation with them.

3 Software context

As of right now, the Watson Game would appeal only to a student in the Computer Science program at SUNY Binghamton. But every semester more and more gets added onto the game by the current student workers who are enrolled in CS495. Eventually this game should simulate life of students all over Binghamton University campus.

4 Major constraints

The game right now is only limited to the Computer Science portion of the engineering building. The sound files are pretty large, which makes the game a pretty big file to put on your computer. There are memory leaks in the program. If you minimize the game and then close it through Windows rather than through the game, the resolution on your computer display can get changed if it isn’t already set to the resolution of the game.

Data design

I created no new chat class. The chat GUI was made in the files CgameManager.cpp, CWatsonGamePlay.h, and CwatsonGamePlay.cpp. There were no global variables created for this portion of the game.

1 Internal software data structure

The chat GUI uses case switch statements to describe what action should be done next when the mouse is clicked on one of the buttons. Sort of like an action listener in Java.

2 Global data structure

No global data structures with the chat client GUI. All users can access the chat client function by clicking the chat button in the bottom menu.

3 Temporary data structure

There are no temporary data structures.

4 Database description

Nothing needs to be saved in the database for the chat GUI. For the chat network, IP addresses and x, y, z-coordinates need to be obtained from the database in order to connect for communication.

Architectural and component-level design

A description of the chat GUI is presented.

1 Program Structure

The chat GUI is in the CGameManager class and the CwatsonGamePlay class. This runs through the client only. The chat button appears on the bottom of the screen. When the button is clicked on, a new window pops up that enables the user to select another user and begin a conversation with them. I was responsible for the GUI portion.

1 Architecture diagram

2 Alternatives

Though there are probably many alternative ways to create a chat client GUI, I created it the way I did because of simplicity and lack of time to do the required research to learn how openGL works in more efficient ways.

2 Description for Chat Client GUI Component

The following is a detailed description for the chat client GUI.

1 Processing narrative (PSPEC) for chat client GUI

chatButtonSend

chatButtonHangup

outChatField

inChatField

StartChat()

2 Chat GUI interface description.

The chat GUI is written in openGL c++ code.

ChatButtonSend is the button in the chat window that sends the message.

ChatButtonHangup is the button in the chat window that closes the chat window.

OutChatField is the text field for sending text lines.

InChatField is the text field for receiving text lines and the old text lines from the conversation.

StartChat() is the function to begin the chat feature.

3 Chat GUI processing detail

When the user clicks on the chat button on the bottom of the main screen that triggers the new chat menu to pop up a new window. You select a user to communicate with and type the text you want to send. Then you click send or hang up which then triggers whether to go to the chat network to communicate or to go back to the main screen.

1 Interface description

User clicks on chat button with the mouse, then click on the text field and type what you want. Then click to send or to hang up.

2 Algorithmic model (e.g., PDL)

If chat button is clicked on (not sure the case number anymore since other people updated the files), the next window has a choice of 2 commands. Case 0 is to send a message (chatButtonSend) and case 1 is to hang up (chatButtonHangup).

3 Restrictions/limitations

No restrictions on the GUI portion. Not sure with the networking aspect since that part wasn’t my responsibility.

4 Local data structures

Vectors will handle strings for user information and for message handling.

5 Performance issues3.2.3.6 Design constraints

As of right now, no constraints are found for the GUI performance except for string handling code.

3 Software Interface Description

The client, which the chat GUI is a part of, is written in C++ and the server is written in Java. The two communicate through sockets. The chat GUI, much like the Watson Game’s interface itself, is written in openGL C++.

1 External machine interfaces

The mouse and keyboard are the only interface for the chat GUI by itself.

2 External system interfaces

The chat GUI doesn’t have any external system interfaces.

3 Human interface

The Chat GUI has a direct has a direct interaction with human interface. The user has to click on buttons with the mouse and has to type text in the text field.

User interface design

The chat GUI is directly interacted with users (people) in the game.

1 Description of the user interface

If a user would like help from another user while playing the Watson Game, he or she can solicit help by clicking on the chat button on the bottom of the screen. After clicking on this button, a new window pops up and allows the user to select which user they would like to chat with. Clicking the send button would send the message to that particular user, while clicking the hang up button would cancel and close the chat.

1 Screen images

Figure 4.1.1.1[pic]

[pic]

figure 4.1.1.2

2 Objects and actions

Figure 4.1.1.1 shows the main screen when you start to play and shows the chat button on the bottom of the screen. When you click on that button, a new window pops up as shown in figure 4.1.1.2. Here you have the option to send or hang up with your chat.

2 Interface design rules

All user interface design rules aren’t yet set since we did not establish an integration between the chat GUI and the chat Network yet.

3 Components available

The GUI components that are available are the chat button and the chat panel when the chat button is clicked on.

4 UIDS description

Glut.h had to be downloaded as well as Visual Studio (I used 6.0). once these are downloaded and used, the Watson Game should be functional on any computer. Then as you run the game, you can activate the chat GUI at any time by clicking the chat button.

Restrictions, limitations, and constraints

Chat GUI does not do much by itself without the network part of the chat client. Not very easy to work with another person on part of a project, but we did alright together. Time was a problem mostly with working with another person on this code.

Testing Issues

Test strategy and preliminary test case specification are presented in

this section.

1 Classes of tests

The only testing done was running the program and seeing if the GUI windows and functions worked when buttons were clicked on. Most of the logic was the same as for the knapsack.

2 Expected software response

A chat button should appear in the proper location at the bottom of the screen. When the chat button is clicked on, a chat panel should open up where the user can select another user to chat.

3 Performance bounds

Chat GUI cannot be tested for chat performance without the chat network completed.

4 Identification of critical components

Does not apply to the chat GUI.

Appendices

1 Requirements traceability matrix

Not applicable.

2 Packaging and installation issues

Glut.h needs to be downloaded and placed in the include directory in Visual Studio (.net and 6.0, which can be downloaded for free if you are a Watson student)

3 Design metrics to be used

Not applicable.

4 Supplementary information (as required)

Not applicable.

-----------------------

CGameManager

Other users

Chat Network

Chat GUI

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download