Jim Kelly
Phil Thomas
Johnson Joseph
Timothy Bieniosek
Joseph Purayidathil
This document describes the requirements of a proposed application based on the game Tangrams, as well as an overview of the game. The requirements call for added enhancements and functionality to an existing Tangrams application called JTans, an Open Source Project with GNU public license. The functional and non-functional requirements of both the original JTans application and the proposed application will be discussed.
Tangrams is an ancient Chinese puzzle game, the object of which is to arrange seven geometrically-shaped puzzle pieces into a given outline or pattern. A player may move, rotate, and flip the pieces to solve the puzzle, but all seven pieces must be utilized to construct the pattern. Each puzzle piece must be adjacent to another piece and no pieces may overlap.
A puzzle is solved when the Tangrams pieces are assembled into the pattern specified. It is possible to have more than one distinct solution for a Tangrams puzzle. The game can be a single player or two-player competitive game, where players race to solve a puzzle.
Tangrams has been implemented in many different forms, each version having different key features which add to the usability and play of the game. Some of the more advanced features that were discussed amongst the design team and deemed desirable in a Tangrams-based application are:
a) Collision Detection - when moving the pieces, do they collide
with each other to mimic physical game play?
b) Two Player Networked Play - can players challenge each other in head-to-head
matches over a LAN?
c) Answer Checking - how and when are solutions checked?
d) Snapping of pieces - will game pieces be able to snap or attach together
for easier 2D manipulation?
e) Web Game Play - can the game be played over the internet via a web
browser?
f) 3D perspective - is there a 3D viewing perspective of the game pieces
and the overall game play?
There are many different versions and implementations of a Tangrams-based application, all of which possess certain basic features such as shape movement and rotation. The following list contains those applications which possess the six features previously mentioned.
This screenshot shows the 2D user interface from "Tangrams" by Mark Overmars. There are seven shape objects that may be moved or rotated. This screenshot demonstrates the "outlining" technique for answer checking. The solution of the game is reached with the user places all of the seven pieces within the white outlined area with no shapes overlapping and all of the white area covered.
This screenshot from Geert-Jan van Opdorp's "Tangram Puzzle" displays a simulated-3D interface, where the pieces appear similar to those in the screenshot above, but have a slight 3D perspective. This game also features collision physics amongst the puzzle pieces. For example, when a user picks up a piece and quickly drags into another piece, the piece that was dragged into will move accordingly to the angle and speed of collision.
The goal is to add innovation to the Tangrams application genre. It was decided that this could be best accomplished by modifying and enhancing an existing Tangrams application. Thus, the vast majority of time devoted to project would be to designing and implementing innovative features.
After reviewing several Tangrams-based applications, the design group decided to use JTans, the SourceForge project, as a basis for enhancement to add innovative features. JTans features solutions for problems such as computer answer-checking, movement and rotation of pieces, and snapping. Being OpenSource and not proprietary, it allows for the freedom to add functionality to it without special permission.
Furthermore, JTans is written in Java, and thus the application can be run as an applet over the internet and across a variety of platforms.
The Functional and Non-Functional requirements below detail all of the additions to the Jtans program that we intend to make.
The Title Screen is the first screen that a user sees upon launching the application. The user will be presented with a graphic, a logo representing the game, followed by three options in the form of buttons:
Clicking on the "One Player" button will take the user to the screen where they will be able to choose from a variety of One Player game types. Clicking on the "Two Player" button will take the user to the BattleTans Lounge, which will be explained later. Clicking on the "High Scores" button will take the user to a screen which displays the fastest times of those players who have completed One Player BattleTans games.
Once a player has decided to play a One Player game and clicked on the "One Player" button on the Title Screen, they will be presented with the "One Player Game" screen, which displays the various options for configuring a One Player game. A user may choose from two basic game types, Single Puzzle or Fast Five.
In Single Puzzle a user may either choose a puzzle to be solved from a list, or they may have the application select a puzzle at random to be solved. During game play, the user must complete a single tangrams puzzle, and is timed doing so. If the time is fast enough (higher than another high score), it will be reflected in the high scores screen.
When playing a One Player game the screen is divided into 3 main sections:
On the table are the seven pieces. The Player can manipulate these with the mouse. A single mouse click will select a game piece, then the user can move the piece by clicking and dragging, or rotate the piece by clicking and dragging outside the border of the piece. The player can also flip a piece by clicking on the "Flip" button.
When the player correctly places the last piece of the puzzle the game automatically informs the user that the puzzle has been solved.
In a Fast Five game the user can either choose the five puzzles from a list, or have the computer randomly choose five puzzles.
The object of a "Fast Five" game is to solve five consecutive tangrams puzzles as quickly as possible. During a Fast Five game the user solves the first puzzle, then the second one begins and so on until the fifth puzzle is solved.
The two player network game begins inside of the Tangrams lounge. After the game types are chosen the game looks very similar to the one player game with the addition of a screen that shows other users the status of the other players pieces. This adds as an insentive to make the game more fast paced and challanging. The two player status window simply shows the status of the pieces.
The network play window displays the user's opponent status window and, if weapons were chosen, shows the weapon icon. When the player selects that option the result of the weapon choice is reflected in the status window. The weapon can only be played once and does not get regenerated until the next match.
Problems which occur during the game maye be resolved between players through the use of the chat function.
Upon choosing the Two Player option the user will be taken to the "Tangrams Lounge." From here the user can be invited to a game or choose options for a game and invite other users to it. The lounge screen will have the following features:
To start a game, the user will first choose the desired game type:
After selecting the game type, the user will have to specify to options that are valid for that game type. In the case of the Fastest Puzzle Game, the user will need to specify:
In the case of the Tangrams Match game, the user will need to specify the number of puzzles that declares a winner (e.g. 3 of 5, 4 of 7, etc.).
Regardless of the game type selected, the user will also have to specify if weapons will be used, and if opposing game pieces will be visible.
Once all of the game options have been selected, the user will choose an opponent from the player list and click on "Challenge." If the opponent agrees to the terms of the game, the game will proceed. If the opponent does not agree to the game then the user will be notified and will proceed accordingly.
When a user is challenged, a window will appear showing the type of game and the options selected. From here, the user can either accept the game or decline it.
If needed, the user will also be able to exit the lounge and return to the Title Screen.
The two player Fastest Puzzle pits two users against each other. When one user completes the puzzle before the other player the former is determined the winner. The game continues until one player wins or a user quits the game for some reason.
Within the game, the user has the option of using a weapon of their choice to impede the progress of their opponent. The weapons are then choosen by selecting the weapon icon. The weapon functionality is similar to the weapon functionality described in the two player match except players get a porportional amount of weapons to the number of puzzles they are set to solve.
In Tangrams match mode, players compete to solve the same puzzle first. When one player solves a puzzle, both players are notifed and after 5 seconds the next puzzle in the match is played. When a player has won a majority of the puzzles that player has won the match.
Each of the weapons listed below will function in any Two Player game where weapons are enabled. When Weapons are enabled the game will randomly choose two weapons for each player. The weapons will be accessible as buttons on the game screen. When a player enables a weapon, he or she will not be able to use another for the duration of the first weapon.
When enables, the opponents screen (both his and his opponents pieces) will be obscured for 30 seconds (number subject to change). During this time the player who enabled the weapon will be able to work on their puzzle without interuption since the opponent's weapon functions will be disabled. The opponent will still be able to see the win state of the puzzle that they are working on and use the chat function.
This weapon will simulate the user banging on the game table and jostling the player's pieces. The opponent's pieces will all be moved short distances in random directions, thus forcing the opponent to take time to realign them. This weapon is used instantaneously and will not lock out players from using any functions.
When wind is used there will be a 5 to 10 second period of "wind" which will move the puzzle pieces on the board. Both the wind speed and direction will be random and varying during the 5 to 10 second period. Pieces may all be forced to one side of the screen or may just get blown around. While the wind is on a player can still manipulate their pieces, but once they let go of them they will be affected by the wind. During this time the player who enabled the weapon will be able to work on their puzzle without interuption since the opponents weapon functions will be disabled.
When this weapon is used on an opponent he won't know what hit him. For a period of 5 to 10 seconds this weapon will reverse the effects of mouse movements and or mouse clicks, making it challenging to move and place the puzzle pieces. During this time, the player who used the weapon will be able to work on his or her own puzzle without interuption since the opponent's weapon functions will be disabled.
There are several ideas and functionality that we would have liked to have implemented for this version, but due to the level of complexity of these features and time constraints, they will not be possible. In the future, however, we would like to implement these features:
Giving the puzzle pieces a 3D appearance (if not true 3D properties) would probably improve the quality of game play for players. Another way we could improve the game play through puzzle piece augmentation would be to have the option of grouping pieces together so that they are joined as one piece. This would make solving a puzzle easier in that the pieces would not be moved out of place after being joined together by the player.
Additional complex weapon types would be implemented. Although interesting and entertaining. they were originally discarded due to how much development time they would require. These weapons include stealing another player's piece (a piece is temporarily missing from an opponent's board), pieces moving of their own accord for a period of time (even when placed back where they were originally, they still move across the playing surface), and shrinking the puzzle pieces of an opponents so as to make it harder for him or her to see the pieces.
Another feature that would be nice to implement in the future that of the user being able to create puzzles. The user could arrange the puzzle pieces, and then save the outline as a puzzle. Additional two player and one player types would also be implemented in the future, including "Poker," where two players would each get five different puzzles in two player fast five mode.