Table of Contents
Design Document
Story
Tetris doesn't have a story. The goal of the game is to stack blocks in as quickly as possible. For each row that has no opening it will be cleared and points will be awarded.
Intro
The intro for this game is the logo for tetris then a fade to the menu.
Menu System
The menu will consist of the title for the game “Tetris” at the top. In the middle will be all of the high scores for the game and at the bottom will be the play button. The play button will be able to be activated by either the left mouse click or the enter key.
Controls
The controls for this game are simple and cannot be changed in game. The enter key on the menu will initiate the game. The left mouse click on the play button will also initiate the game. During game play the user will be able to use the arrow keys to move the pieces. The left and right arrow keys will move the piece left or right on the screen. The up and down arrow keys will rotate the piece either clockwise or counter clockwise. The space bar will pause and un-pause the game. The ESC key will return the game back to the menu.
Sounds
The background music needs to be a short repeatable loop that doesn't get on one's nerves. The music will be slow at lower levels and sped up at higher levels. This change in speed should be handled programmatically.
The sound effects will be a crashing sound for the blocks locking into place. The removal of a line will be a cheaful sound, something along the line of bells.
The movement of a piece could have a “click” sound associated with it.
Camera View
This is a strait on view of the board. The camera will not move. Reference the concept art Game Board.
Engine
This will be a simple engine that is based on a timer and a game state. The execution loop will consist of:
- get user input
- calc movement
- calc collision
- draw screen
The Game
The play area is 10 blocks wide by 18 blocks high. On the right hand side at the top will be the next block that will drop. Below the next block is the player's current score. Under the current score will be the player's current level. At the bottom of the screen will be the game status. The game status can be “playing”, “paused”, or “game over”. This area maybe clickable to pause the game.
The scoring is as follows:
- 1 line cleared. level*40+40
- 2 lines cleared. level*100+100
- 3 lines cleared. level*300+300
- Tetris - 4 lines cleared. level*1200+1200
The level advance is calculated based on the score and is based on 5000 point increments. The speed at which the blocks fall will be based on the level as well:
- level * vel
The user loses when the blocks reach the top of the screen.
Scoreboard
The scoreboard for the game will be integrated into the menu as mentioned above. At the end of play (when the user loses) the game will return to the menu but if the user scored high enough to get on the scoreboard then the play button will be replaced with an enter initial dialog. The user can enter their initals then hitting enter will submit there initials to the scoreboard.
External Game Elements
Most of these elements will have their own design documents.
- Web Sites
- Forums
- Updates
- Tech Support
- Distribution