CS435 Billiards Project Requirements

Version: 3.0

1. Introduction

The goal of this project is to build a software simulation of a billiards game, which will simulate the physical interactions of a cue stick, billiards balls, and table. Unlike other billiards games which "fake" effects of friction, angular momemtum, etc., this game will address these issues using a physical simulator. As a result, it will be possible to use advanced billiards techniques such as Masse' and hopping of balls.

The system will present the user(s) with an interface that allows them to choose a game type (8-ball or 9-ball) and interact with the billiard balls as if they were playing a real game (within the constraints of the physics model implemented). In the finished version of the software package, the user will have the options of a 2-dimensional or 3-dimensional view of the table. Users of this product are assumed to have a reasonable familiarity with computers, but not necessarily with any particular platform or window manager. They are also assumed to understand the basic concepts of billiards, although they probably will not know all the rules of a particular game.

1.1. About This Document

This document is intended to be read by the software development team members, managers and the client and/or the client's representative. This is a new project; therefore, there is no summary of previous versions. In this document, we describe the overall product and three milestones which the customer has specified. We then lay out all the requirements for the whole system, indicating the appropriate milestone(s) for each. Use cases are located in a separate document. The goal of this document is to provide the system developers with both the user requirements and a detailed specification of the system requirements for each milestone of the software product.

Each section of the requirements addresses a different aspect of the system. Requirements use a standard schema, which has ID, name, description, importance, and planned delivery milestone. Requirements are numbered by section. Priorities are: 1: critical, 2: very useful, 3: useful, 4: nice to have, 5: wishlist. Requirements with priorities 1-3 are necessary for successful completion of the project.

1.2. Changes from Previous Versions

1.2.1 Changes from the High-Level Requirements

The requirements in this version of the document are a synthesis of those developed by the project members (who started with the high-level requirements developed by the managers). They have been validated by the client.

1.2.2 Changes from Version 1.0

Network play has been dropped in order to allow the developers time to create a solid product. During milestone 2 it was realized that implementing "real" physics is too difficult to do in M2, so it was extended to M3. A number of less important requirements have been pushed from M2 to M3, and from M3 to the wishlist.

1.2.3 Changes from Version 2.0

Masse' and English have been dropped. Jumping has also been dropped. Audio has been moved to a wishlist item. Animate Ball rolling in both 2D and 3D have been dropped to wishlist. "Ball aimer" view has been dropped to wishlist. Friendly/Competitive play was moved from wishlist to M3. A requirement was created for the website.

2. Scope and Overall Schedule

Functionality will be added to the system in 3 phases, called milestones. The general requirements listed above will all be implemented by the first milestone. The second milestone will add a 3-dimensional interface to the software. The third milestone will add realistic physics. At each milestone, all functionality from the previous milestones should be preserved. Users can connect to and play other users remotely. The projected deadlines for completion of each milestone are as follows:

Scope requirements later in the document help to define the scope in more detail.

3. Project Development Requirements

This section describes requirements outlined by the client, including tools and documentation.

3.1. Tools

This section outlines the various tools we will be using including the software language, code commenting, graphics package, build system, testing tools, and source control. It describes which tools will be used in each milestone.

ID: 3.1.1
Name: Software Language
Description: All code will be written in Java
Importance: 1
Planned Delivery: Milestones 1, 2, 3
ID: 3.1.2
Name: Graphics Package
Description: 3D rendering will be done with Java3D
Importance: 1
Planned Delivery: Milestones 2, 3
ID: 3.1.3
Name: Code Comments
Description: All comments will be written using JavaDoc
Importance: 1
Planned Delivery: Milestones 1, 2, 3
ID: 3.1.4
Name: Build System
Description: Apache Ant must be used for the build system
Importance: 1
Planned Delivery: Milestones 1, 2, 3
ID: 3.1.5
Name: Testing Tools
Description: JUnit must be used to automate testing
Importance: 1
Planned Delivery: Milestones 1, 2, 3
ID: 3.1.6
Name: Source Control
Description: All code will be maintained in a source control system. CVS will be used for this purpose.
Importance: 1
Planned Delivery: Milestones 1, 2, 3

3.2. Documentation

This section outlines the various documentation requirements at each milestone.

ID: 3.2.1
Name: Documentation Format
Description: HTML will be used for all documentation. HTML documentation must be written in valid HTML (any version).
Importance: 2
Planned Delivery: Milestones 1, 2, 3
ID: 3.2.2
Name: Detailed Requirements
Description: Required system functionality, as well as development constraints and potential risks
Importance: 1
Planned Delivery: Milestone 1
ID: 3.2.3
Name: High-Level Design
Description: The major modules of the system and how they interact
Importance: 1
Planned Delivery: Milestone 1
ID: 3.2.4
Name: Detailed Design
Description: The definition of the interfaces for all the modules, and descriptions of algorithms/data structures.
Importance: 1
Planned Delivery: Milestone 1
ID: 3.2.5
Name: Test Plans
Description: Test plans and test results must be documented. This is in addition to the actual test cases themselves.
Importance: 3
Planned Delivery: Milestones 1, 2, 3
ID: 3.2.6
Name: User Manual
Description: In-program help system. Documentation aimed at end users of the system.
Importance: 1
Planned Delivery: Milestone 3
ID: 3.2.6.1
Name: Rules Documentation
Description: The official rules of the games must be available.
Importance: 2
Planned Delivery: Milestone 3
ID: 3.2.6.2
Name: Tutorial Documentation
Description: A short tutorial showing how to use the program.
Importance: 4
Planned Delivery: Milestone 3
ID: 3.2.6.3
Name: Interface Documentation
Description: A description of the user interface.
Importance: 4
Planned Delivery: Milestone 3
ID: 3.2.6.4
Name: Web Site
Description: A website for the Billiards game and documentation.
Importance: 5
Planned Delivery: Milestone 3

4. Functional Requirements

In this section the functional requirements are outlined for gameplay, the user interface, the game-playing interface, taking a shot, shot animation for the 2D version as well as the 3D version, physics simulation, and networked games.

4.1. Gameplay

This section outlines the functional requirements relating to gameplay. Included in this are game rules, exiting/starting a game, and various other details related to specific functionality of the game.

ID: 4.1.1
Name: Game Management
Description: The various controls of a game (new game, quit/forfeit, etc.)
Importance: 1
Planned Delivery: Milestone 1
ID: 4.1.2
Name: Exiting Game
Description: The ability of the user to exit the game at any time.
Importance: 1
Planned Delivery: Milestone 1
ID: 4.1.3
Name: Starting a Game
Description: The ability of the user to start a game at any time.
Importance: 1
Planned Delivery: Milestone 1
ID: 4.1.4
Name: 8-ball
Description: The ability of the user to play 8-ball, which includes breaking, calling shots, and other actions of the game.
Importance: 1
Planned Delivery: Milestone 1
ID: 4.1.6
Name: Starting Player 1
Description: Random choice of starting player.
Importance: 2
Planned Delivery: Milestone 1
ID: 4.1.7
Name: Starting Player 2
Description: Lag to choose starting player.
Importance: 3
Planned Delivery: Wishlist
ID: 4.1.8
Name: 9-ball
Description: Ability of user to play 9-ball.
Importance: 1
Planned Delivery: Milestone 2
ID: 4.1.9
Name: Player Names
Description: Ability of users to enter names with keyboard.
Importance: 2
Planned Delivery: Milestone 2
ID: 4.1.10
Name: Friendly/Competitive gameplay
Description: Ability of users to play either a friendly or competitive type game.
Importance: 2
Planned Delivery: Milestone 3
ID: 4.1.11
Name: Undo Shot
Description: Ability of users to undo to state prior to last shot.
Importance: 3
Planned Delivery: Milestone 3
ID: 4.1.12
Name: Re-animate Shot
Description: Ability of users to re-animate last shot.
Importance: 3
Planned Delivery: Milestone 3
ID: 4.1.13
Name: Rules
Description: Rules are required to be official rules from an organization to be determined.
Importance: 1
Planned Delivery: Milestones 1, 2, 3
ID: 4.1.14
Name: Standard Table Size
Description: Standard (full size) table.
Importance: 1
Planned Delivery: Milestones 1, 2, 3
ID: 4.1.15
Name: Other Table Sizes
Description: No other pool table sizes will be supported.
Importance: 3
Planned Delivery: Milestones 1, 2, 3 (SCOPE REQUIREMENT)
ID: 4.1.16
Name: Human-vs-Human Play
Description: Human versus human play will be supported.
Importance: 1
Planned Delivery: Milestones 1, 2, 3
ID: 4.1.17
Name: Computer Player
Description: No computer player will be supported.
Importance: 1
Planned Delivery: Milestones 1, 2, 3 (SCOPE REQUIREMENT)

4.2. User Interface

In this section we present the requirements for the overall user interface of the game.

4.2.1. The New Game Interface

ID: 4.2.1.1
Name: Game Selection
Description: User can select which game to play (8-ball or 9-ball).
Importance: 1
Planned Delivery: Milestone 2
ID: 4.2.1.2
Name: Network Game Selection
Description: User can specify a networked game.
Importance: 1
Planned Delivery: Wishlist
ID: 4.2.1.3
Name: Friendly Rules
Description: User can specify friendly or competition rules.
Importance: 1
Planned Delivery: Milestone 3
ID: 4.2.1.4
Name: 2D or 3D View
Description: User can specify a 2D or 3D view.
Importance: 1
Planned Delivery: Milestone 2

4.2.2. The Game Playing Interface

ID: 4.2.2.1
Name: Menus
Description: Must have menus for new games, game selections, etc.
Importance: 1
Planned Delivery: Milestone 1 (updated for milestones 2 and 3)
ID: 4.2.2.2
Name: Main User Interface
Description: The "camera" view of the table, a scoreboard for game information, and controls.
Importance: 1
Planned Delivery: Milestone 1 (but view and controls will change in Milestone 2)
ID: 4.2.2.3
Name: Ball Aimer User Interface
Description: Add "ball aimer" view which allows you to pick where to hit the cue ball.
Importance: 1
Planned Delivery: Wishlist
ID: 4.2.2.4
Name: Game Status User Interface
Description: The scoreboard will show the score as well as whose turn it is.
Importance: 1
Planned Delivery: Milestone 1
ID: 4.2.2.5
Name: Slider Control
Description: There will be a slider for power.
Importance: 1
Planned Delivery: Milestone 1
ID: 4.2.2.6
Name: Angle Control 1
Description: There will be a slider for lateral angle.
Importance: 1
Planned Delivery: Milestone 1
ID: 4.2.2.7
Name: Angle Control 2
Description: There will be a slider for vertical angle.
Importance: 1
Planned Delivery: Milestone 2
ID: 4.2.2.8
Name: Mouse-Oriented
Description: Keyboard used for name entry only. Everything else is controlled by mouse.
Importance: 1
Planned Delivery: Milestones 1, 2, 3
ID: 4.2.2.9
Name: User Interface Resizing
Description: Overall user interface is resizeable.
Importance: 2
Planned Delivery: Milestone 3
ID: 4.2.2.10
Name: Game Save
Description: No ability to save a game.
Importance: 2
Planned Delivery: Milestones 1,2, 3 (SCOPE REQUIREMENT)
ID: 4.2.2.11
Name: User Interface Not Resizeable
Description: The user will not be able to resize the user interface
Importance: 4
Planned Delivery: Milestone 1

4.4. Taking a Shot

This section describes the requirements for the portion of the game in which the user aims for a shot.

ID: 4.4.1
Name: User Aim Restriction 1
Description: The user will be restricted to taking a shot on the cue ball only.
Importance: 1
Planned Delivery: Milestones 1, 2, 3
ID: 4.4.2
Name: User Aim Restriction 2
Description: The user will not be allowed to apply english.
Importance: 3
Planned Delivery: Milestone 1 (SCOPE REQUIREMENT)
ID: 4.4.3
Name: User Aim Restriction 3
Description: Assume the cue is always parallel to the table.
Importance: 1
Planned Delivery: Milestone 1 (SCOPE REQUIREMENT)
ID: 4.4.4
Name: User Aim Restriction 4
Description: The edge of the table can limit cue angle.
Importance: 3
Planned Delivery: Milestone 3
ID: 4.4.5
Name: Masse'
Description: Applying masse' to the balls should be possible.
Importance: 1
Planned Delivery: Wishlist
ID: 4.4.5
Name: Jumping
Description: Jumping balls should be possible.
Importance: 1
Planned Delivery: Wishlist
ID: 4.4.6
Name: 3D Ball Aimer User Interface
Description: Sight down the cue (in 3D) to the cue ball.
Importance: 3
Planned Delivery: Wishlist
ID: 4.4.7
Name: Animate Cue During Aiming
Description: Animate cue movement during aiming.
Importance: 1
Planned Delivery: Milestones 1, 2, 3

4.3. Shot Animation

This section describes the requirements for the portion of the game after the user has specified a shot, in which the results of the shot are animated. The general requirements are given first, then the specific requirements for the 2D and 3D versions.

ID: 4.3.1
Name: Top-Down View
Description: The game must have a top-down view.
Importance: 1
Planned Delivery: Milestones 1, 2, 3
ID: 4.3.2
Name: Ball Movement
Description: Ball movement must match physics ( if it should be going 15 mph, then the object on the screen must be moving 15 mph).
Importance: 1
Planned Delivery: Milestones 1, 2, 3
ID: 4.3.3
Name: 2D Available
Description: 2D will be available in addition to 3D.
Importance: 1
Planned Delivery: Milestones 2, 3
ID: 4.3.4
Name: Sound Effects
Description: There should be realistic audio effects during animation.
Importance: 4
Planned Delivery: Wishlist

4.3.1. 2D

ID: 4.3.1.1
Name: Overall 2D Implementation
Description: 2D implementation is required.
Importance: 1
Planned Delivery: Milestone 1
ID: 4.3.1.2
Name: 2D Rendering
Description: Circles for balls and lines for cue.
Importance: 1
Planned Delivery: Milestone 1
ID: 4.3.1.4
Name: 2D Visibility of Numbers
Description: Numbers should be visible on balls at all times.
Importance: 1
Planned Delivery: Milestone 1
ID: 4.3.1.5
Name: Visible Solids/Stripes
Description: Solids/stripes should be visible on balls at all times.
Importance: 1
Planned Delivery: Milestone 1
ID: 4.3.1.6
Name: Animation Area Resizing
Description: Animation area is not resizeable.
Importance: 3
Planned Delivery: Milestone 1 (SCOPE REQUIREMENT)
ID: 4.3.1.7
Name: Don't Animate Ball Rolling
Description: Only animate ball movement, not rolling.
Importance: 2
Planned Delivery: Milestone 1 (SCOPE REQUIREMENT)
ID: 4.3.1.8
Name: 2D Animation of Cue
Description: Don't animate cue movement for the shot.
Importance: 2
Planned Delivery: Milestone 1 (SCOPE REQUIREMENT)

4.3.2. 3D

ID: 4.3.2.1
Name: Overall 3D Implementation
Description: 3D implementation is required.
Importance: 1
Planned Delivery: Milestones 2,3
ID: 4.3.2.2
Name: View Area Resizing
Description: View area is resizable.
Importance: 1
Planned Delivery: Milestone 3
ID: 4.3.2.3
Name: Animate Ball Rolling
Description: Animate ball movement, rolling.
Importance: 1
Planned Delivery: Wishlist
ID: 4.3.2.4
Name: 3D Visibility of Numbers
Description: Numbers need not be visible at all times.
Importance: 2
Planned Delivery: Milestone 2 (SCOPE REQUIREMENT)
ID: 4.3.2.4
Name: 3D Animation of Cue
Description: Animate cue for the shot.
Importance: 3
Planned Delivery: Milestone 3
ID: 4.3.2.5
Name: Camera Angles
Description: There will be 5 different static camera angles: the 4 corners, plus top-down. Each angle will allow the user to see the entire table.
Importance: 1
Planned Delivery: Milestone 2
ID: 4.3.2.5
Name: Camera Motion
Description: The user will be able to move the camera.
Importance: 4
Planned Delivery: Milestone 3

4.5. Physics Simulation

This section lays out requirements pertaining to the physics simulation including: Spin, "english", elasicity of rails, and computation speed.

ID: 4.5.1
Name: 2D Spin
Description: Assume there is no spin on the ball
Importance: 1
Planned Delivery: Milestone 1 (SCOPE REQUIREMENT)
ID: 4.5.2
Name: 3D Spin
Description: Ball can spin and has angular momentum.
Importance: 1
Planned Delivery: Milestone 3
ID: 4.5.3
Name: 3D English
Description: Can apply "english".
Importance: 1
Planned Delivery: Wishlist
ID: 4.5.4
Name: 2D Inelastic Rails
Description: Assume rails are perfectly inelastic.
Importance: 2
Planned Delivery: Milestone 1 (SCOPE REQUIREMENT)
ID: 4.5.5
Name: 3D "Elastic" Rails
Description: Rails absorb energy from the balls.
Importance: 1
Planned Delivery: Milestone 3
ID: 4.5.6
Name: Speed of Computations
Description: Computations must be fast enough for 30 frames per second.
Importance: 2
Planned Delivery: Milestone 3

4.6. Networked Games

This section contains requirements pertaining to networked games. Most requirements in this section are for Milestone 3.

ID: 4.6.1
Name: Direct Network Game
Description: User will be able to play direct network connection games.
Importance: 1
Planned Delivery: Wishlist
ID: 4.6.2
Name: Networked Game Management System
Description: "Pool Hall" game management system.
Importance: 3
Planned Delivery: Wishlist
ID: 4.6.3
Name: Security Compromises
Description: Avoid trivial security compromises. (Not going to spend a lot of time on this).
Importance: 2
Planned Delivery: Wishlist
ID: 4.6.4
Name: User Interface Lag
Description: There should be as little lag in the game as possible.
Importance: 1
Planned Delivery: Wishlist
ID: 4.6.5
Name: Local Animation
Description: Animation should be done locally.
Importance: 2
Planned Delivery: Wishlist

5. Non-Functional Requirements

In this section the non-functional requirements are outlined. Memory leaks, usability, testing, invalid input, and unhandled exceptions are all discussed in this section.

ID: 5.1
Name: Usability
Description: The usability of each version must be adequate, as determined by the customer.
Importance: 1
Planned Delivery: Milestones 1, 2, 3
ID: 5.2
Name: Memory Leaks
Description: There should be no memory leaks in the software.
Importance: 1
Planned Delivery: Milestones 1, 2, 3
ID: 5.3
Name: Unhandled Exceptions
Description: There should be no unhandled exceptions in the software.
Importance: 1
Planned Delivery: Milestones 1, 2, 3
ID: 5.4
Name: Stability
Description: The software must be stable enough to play at least 10 games in a row.
Importance: 1
Planned Delivery: Milestones 1, 2, 3
ID: 5.5
Name: Tests
Description: There must be "adequate" tests for ever class, as decided by the managers.
Importance: 1
Planned Delivery: Milestones 1, 2, 3
ID: 5.6
Name: Design: New Rules
Description: It should be easy to create new games by implementing a single class.
Importance: 1
Planned Delivery: Milestone 2
ID: 5.7
Name: Invalid Input
Description: Invalid input should be handled gracefully.
Importance: 1
Planned Delivery: Milestones 1, 2, 3
ID: 5.8
Name: Invalid Network Input
Description: Invalid input should be handled gracefully: corrupt network data should be handled.
Importance: 3
Planned Delivery: Wishlist

6. Performance and Environmental Requirements

This section lays out the performance and environmental requirements.

ID: 6.1
Name: Latency
Description: Latency for all non-network operations is less than 1 second.
Importance: 1
Planned Delivery: Milestone 1
ID: 6.2
Name: Network Timeout
Description: Timeout network communication after 1 minute.
Importance: 1
Planned Delivery: Wishlist
ID: 6.3
Name: Minimum System Requirements
Description: Minimum system requirements are the same as Java 1.xx (to be decided)
Importance: 1
Planned Delivery: Milestones 1, 2, 3
ID: 6.4
Name: MS Java Compliance
Description: MS Java compliance is not necessary.
Importance: 3
Planned Delivery: (SCOPE REQUIREMENT)
ID: 6.5
Name: Java3D
Description: The user must not be required to have Java3D. In this case, the system only allows 2D animation.
Importance: 1
Planned Delivery: Milestones 2,3
ID: 6.6
Name: Applet
Description: The program must be runnable as an applet.
Importance: 1
Planned Delivery: Milestones 1,2,3