Table of Contents
Tetris '2005 is an exciting action game. Throughout the game, bricks of various types fall from the top to the bottom of the playing area. When the bricks form a solid row of blocks across the playing area, that row vanishes.
Because this is the only way to remove blocks, you should try to form solid rows whenever possible. The game ends when the pieces stack up to the top of the playing area.
You can manipulate a brick only when it is falling. Falling pieces may be rotated, moved horizontally, or dropped to the bottom of the playing area.
This nice and small game offers High score lists, Preview Screen, Position Pointer and more. It has no multimedia but is intended to bring a taste of fun to a small break on a long, hard working day. However, if you would like to support my work, please rate this article and visit one of my other programs.
Check them out!
I realize that a number of people will just want to try out the sample and see if it is worth spending the time looking at the source code. So I will first present the game, the controls, then I will explain how it works in later sections.
This intermediate tutorial describes how to play Tetris and how to move Bricks.
The "." brick
The ":" brick
The "H" brick
The "I" brick
The "J" brick
The "L" brick
The "N" brick
The "O" brick
The "T" brick
The "Z" brick
Bricks appear one at a time at the top of the playing area and then proceed to fall at a constant speed.
Each brick continues to fall until it lands on another brick or the bottom of the playing area.
You can manipulate a brick only when it is falling.
With the keyboard, you can rotate a falling brick and move it left, right, or down.
Each time there is a solid row of blocks across the playing area, that row vanishes. Try to manipulate the pieces as they fall so that solid rows form and disappear.
The game ends when the pieces are stacked to the top of the playing area.
Up Arrow,
Insert,
Home Rotates the current brick
Left Arrow Moves the current brick left
Right Arrow Moves the current brick right
Down Arrow, Drops the current brick to the bottom
[ ] Show preview screen
By unchecking this option, the preview box in which the upcoming brick is displayed, will be hidden. This results in special bonus points.
[ ] Show position pointer
By checking this option, RSM's Tetris 2005 will display a position pointer at the bottom of your "playground" to ease navigation of your pieces. Read the Scoring section for information about how this could influence your bonus points.
Skill Level
Here you can choose from which level to start playing. User can Select level according to their desire. Beginner for new user, Intermediate for Normal and Expert is suggested for advanced users.
Background Color
Click on the color preview area to change the background color of your RSM's Tetris 2005 "playground".
The object of RSM's Tetris 2005 is to continue playing for as long as possible. The game is over when the playing area is stacked to the top with bricks. The following section explains how to play the game.
To Choose a Skill Level:
In the Options menu, choose a starting level from 1 to 20. The higher the level, the faster the pieces fall.
To Start a New Game:
From the buttons at the right, choose Start.
To Move a Brick Horizontally:
Use the appropriate keyboard controls. You can move the current brick either left or right.
Note: If the current brick is close to the borders or close to already-positioned pieces, you may be unable to move it.
To Rotate a Brick:
Use the appropriate keyboard controls. You can rotate the current brick 90 degrees counterclockwise.
Note: If the current brick is close to the borders or close to already-positioned pieces, you may be unable to rotate it.
To Drop a Brick:
Use the appropriate keyboard controls. When you drop a brick, it falls rapidly until it lands on a stationary brick or the bottom of the playing area.
To Pause a Game:
From the Game menu, choose Pause, or Click Pause Button.
Note: To resume the game, choose Pause again.
The current brick starts with an initial score value, which increases for each successive playing level.
The "Tetris '2005 Hall Of Shame"
If you achieved a new High score (this means, if you achieved more points than the ones listed in the "RSM's Tetris 2005 Hall Of Shame" window), a special window opens and you can add your name and a "cool quote" of your choice to this list !
You can also use the "Save" button to save your High score window to bitmap file named "HiScore.bmp".
This section contains helpful hints for playing RSM's Tetris 2005 successfully.
- Use the Brick Preview box to gain experience, and then turn this option off for higher scoring.
- Experiment with the position pointer tool .. based on your reaction time, does it bring you more points than it costs ?
- Avoid building "mountains." Try to keep the pile of pieces level at the top.
- Avoid creating "canyons" that are one block wide and many blocks deep. You may find yourself nervously waiting for the long, skinny brick (which never seems to appear when you need it).
- Always try to leave a "flat spot" at least three blocks wide along the top of the stacked pieces. This way you can drop most of the pieces without leaving any gaps.
- Sometimes it is to your advantage to leave a gap and go on to the next level. If you can make the next level disappear, you may have time to fill the gap afterwards.
- Once a brick lands on another brick, it can still be manipulated for a very short time. You can use this time to "slide" the brick under an "overhang."
Detailed comments can be found in the source archive.The game is built up from a number of smaller sub-systems. Each system provides a distinct purpose. I have identified the systems below.
Architecture
- Game Engine
- Main Window
- Brick Display
- Preview Screen
- Position Pointer
- 2D Button Display
- Option Window
- Score window
- Help window
CORE ENGINE
The Tetris Core engine consists of the main four functions:
SelectBrick
SetCurrentPosition
DrawBrick
HideBrick
These functions provide support for brick related functions such as selecting a Brick, setting the current Position of the Brick, showing and hiding a Brick.
The core engine is implemented as a strict back-end engine. It has no user-interface components. Most of the functions return an Boolean
return code. The return codes should always be examined to determine the completion status of these functions.
Special care has been taken to ensure that these functions are very stable and robust.
Public Sub SelectBrick()
This Subroutine is used to select Brick
type.
Public Sub HideBrick(frm As Form)
This Subroutine is used to Hide all Bricks in the frm Form
.
Public Sub DrawBlock(frm As Form)
This Subroutine is used to Show selected Brick in the frm Form
.
Public Sub SetCurrentPosition(a As Integer, Optional b, _
Optional c, Optional d, Optional e, Optional f)
This Subroutine is used to set initial position of Brick in the frm Form
.
Other Functions of Importance
Public Sub Increment(X As Integer)
This function is called when a user presses Left, Right or Down key from within the Main Window KeyDown
Event. It increments the value of next position variables.
Public Sub CheckStatus(X As Integer, a As Integer, Optional b, _
Optional c, Optional d)
This function is called after Increment
to check the availability of the position specified in next position variables.
Public Sub MoveBlock()
If CheckStatus
function returns true
, then this function is called to move the current brick to the next position.
Public Sub CheckRowBuilt(frm As Form)
This function checks the status of each row and if any row is built, i.e., a row having 10 bricks, then removes that row and increases the score.
Public Function CheckGameOver(frm As Form) As Boolean
This function is used to check the status of the game before drawing the new brick.
Public Sub frmOptionSetting()
This function is used to change the game setting according to the setting user made using Option Window.
Public Sub LoadScoreFile(frm As Form)
This function is used to Load score from the files to the Score Window.
Public Function CheckGameOver(frm As Form) As Boolean
This function is used to Save score.
Preview Screen
The Preview Screen Module consists of the three functions:
Public Sub HidePicBox(frm As Form)
This function is used to clear Preview Screen.
Public Sub ShowPicBox(frm As Form, a As Integer,Optional b, _
Optional c, Optional d, Optional e,Optional f)
This function is used to display Preview of next brick.
Public Sub ShowPreview(frm As Form)
This function is used to set the position of the brick in the Preview window.
Position Pointer
The Position Pointer Module consists of the three functions:
Public Sub ShowPositionPointer(frm As Form)
This function is used to display Position Pointer.
Public Sub HidePositionPointer(frm As Form)
This function is used to Hide Position Pointer.
Public Sub SetPositionPointer()
This function is used to set the Position of Position Pointer in Main Window.
2D Button Display
To display 2D button, we have to manipulate some of the Image box Mouse Events:
Private Sub imgbutton_MouseMove(Index As Integer, Button As Integer, _
Shift As Integer, X As Single, Y As Single)
In this Event, we draw rectangle with the help of Grey and White lines.
Private Sub imgbutton_MouseDown(Index As Integer, Button As Integer, _
Shift As Integer, X As Single, Y As Single)
In this Event, we change image box left and top Position.
Private Sub imgbutton_MouseUp(Index As Integer, Button As Integer, _
Shift As Integer, X As Single, Y As Single)
In this Event, we restore Image box left and top Position.
Private Sub imgbutton_DblClick(Index As Integer)
In this Event, we execute commands according to Image box index.
Option Window
Option Window gives the user the facility to configure the game setting according to their need.
Score Window
Score Window displays the detail list of users who achieved the highest score.
Help Window
Help Window displays Keyboard functions.
I would like to give credit and thanks to my brother Rohit Soam for constructive criticism & editing, and also to my friend Nikhil who helped me in testing the game.
THE STORY
I started the whole thing by writing a small game including sources (based on Turbo C++). Since it has always been my (Mohit's) dream to create a logic game like this one, but I've never taken the time to even think about where to start with, I took the chance. We put ourselves together, added some nice features we knew people like you would like and here it is !
Everything we did on that game is just for our fun. It makes us happy to receive mails from you telling us if you like the game, why you like it (why you don't like it ... well, not sure ~'.'~ ) .
NOTE
RSM's Tetris 2005 is in no way affiliated with 'The Tetris Company' nor is it an official Tetris product. The Graphical Interface of Game is based on Bricks 2005 .
- 8-Aug-2005 - Initial release of "RSM Tetris 1.1"