1. Introduction
1.1 Purpose
The purpose of this document is to describe all of the requirements
regarding Cell-Pong. The functional requirements which describe the game itself will
be similar to the functionality of Pong as released by Atari (not the
original version of the game). This document is intended for the software
developers as listed beneath the Team #. It will also be a reference
for anyone intending to modify the project as it exists.
1.2 Scope
Cell-Pong will function by the interaction of two different software
applications. There is the client application which will be used by each
person intending to play Cell-Pong. There is also a server application which will maintain
the interactions between two separate client applications (as chosen by the
clients).
Once within the game, the server maintains the information that
each player must be aware of. The movement of each paddle must be
communicated to both client applications. The ball itself moves according to vectors
assigned to each client by the server. These vectors are changed when a paddle interacts
with the ball.
Once a session has ended between the two client applications, all relevant
information regarding the winner and loser will be stored within a database. The information from
this database will be available to all players.
1.3 Definitions, Acronyms, and Abbreviations
- Cell-Pong: The name of this project.
- Pong: The name of the Atari project.
- J2ME: Java 2 Platform, Micro-Edition
- J2EE: Java 2 Platform, Enterprise Edition.
- MIDP: Mobile Information Device Profile.
- TCP/IP: Transmission Control Protocol/Internet Protocol, a basic protocol to communicate over the Internet.
- SQL: Structured Query Language, a standardized language to communicate with a database.
- Player: This person operates the client application.
- Paddle: A vertical bar which is controlled by the designated Player.
This paddle is used to
hit the ball. The new direction and speed of the ball is decided by the
position of the paddle.
- Ball: Small circle which moves with both an x vector and a y vector.
These vectors can only be
altered when the ball hits a paddle or a wall.
- Wall: A wall is described as the entire length of one side of the
screen. For the purposes
of Cell-Pong, the wall is the top and the bottom of the screen.
- Score: If the ball ever leaves the confines of the screen, the player on
the opposite side of the
screen scores a single point.
- Tournament Ladder: A list which begins with the player which has the
most number of wins.
- X Vector: The ball's horizontal velocity.
- Y Vector: The ball's vertical velocity.
1.4 References
The original Pong (http://www.pong-story.com)
Sample
Documentation (http://www.ugrad.cs.ubc.ca/~cs410/documents/sample-completed-req-spec.pdf)
2. Overall Description
2.1. Product Functions
Cell-Pong is a version of Pong made specifically for online play. It will
allow players to connect to a server and compete with each other. Players will
be able to initiate games with other players and view a tournament ladder
which keeps a ranked list of all players.
2.2 User Interface
In-Game Interface: This interface will be seen while playing a game against
an opposing player. It consists of the playing
field (2 horizontal paddles on opposing sides of the screen) and the score and name
of each player in the appropriate top corner.
Out-Of-Game Interface: A simple text menu with a small pointer on the left
hand side. This pointer can be moved up and down and will select various options.
When an option is selected, the indented options are displayed.
- Create Account
- Login
- Create Game
- Join Game
- (List all players who created a game and are waiting for another player to join.)
- View Ladder
- View All Players (Shows 8 players at a time on the list and allow page scrolling)
- Your Rank
- Exit
2.3. Constraints
- Players must log into the system before being able to play.
- There must be 2 players per game.
- A player may only be able to play one game at a time.
- Player login names and passwords are case sensitive and can only contain alphanumeric characters.
- If a player loses their connection to the server, the game will pause for up to 60 seconds.
- Once these 60 seconds have passed, the remaining player is given the option to either 'win', 'wait' or 'void'.
- If he/she chooses 'wait', up to another 60 seconds will pass.
- If he/she chooses 'win', then he/she is declared the winner of the match.
- If he/she chooses 'void', then the match is voided.
2.4. Assumptions and Dependences
- We are using the J2ME Wireless Toolkit 2.1 MIDP 2.0 default color phone.
- This phone is capable of low-level TCP/IP sockets.
- This phone is capable of an internet connection.
3. Requirements
3.1. Functional Requirements
3.1.1 Menu
- Players "create" a game. This game is given a 3-digit number by the server and added to the list of waiting games.
- Players can view a list of current games (just a list of player IDs and and 3-digit game nunbers).
- Players select a game by entering the appropriate 3-digit number.
- Players can view their ranking on the tournament ladder.
- Players can view the list of all the players in ranked order on the tournament ladder.
3.1.2 In-Game
- A game ends when one player achieves a score of 10 points.
- If a player loses their connection to the server, the game will pause for up to 60 seconds.
- If a player is disconnected for more than 60 seconds, the remaining player is given the choice to either 'win', 'wait', or 'void'.
- If he/she chooses 'wait', up to another 60 seconds will pass.
- If he/she chooses 'win', then he/she is declared the winner of the
match.
- If he/she chooses 'void', then the match is voided.
- If both players are disonnected from a game, the game is voided.
- Each player has Wins and Losses which are recorded.
- When the game ends, each player's record is updated.
- The server application can retrieve this information and display it appropriately to the player.
- A player moves their paddle up or down using the appropriate keys. There is only one speed.
- A player can see their name and current score in their top corner.
- When the ball hits a wall or a paddle, it changes x and y vectors appropriately.
- The player's screen is updated whenever the position of either each paddle or the ball changes.
- The player's screen is updated whenever a player scores.
3.2. Pseudo Requirements
- Cell-Pong client application will be written using J2ME.
- It will be created to run specifically on KVM (a Java virtual machine).
- The user controls will be tailored to match the key layout of the J2ME Wireless Toolkit 2.1 MIDP 2.0 default color phone.
- The server-side application (servlet) will be designed to run on a J2EE server.
- The client and servlet will communicate using TCP/IP.
- All game results will be stored using an SQL database.
|