Sie sind auf Seite 1von 16

Classic Tetris

PROPONENT
RANTAEL, JONATHAN T.

September 2019

INSTRUCTOR
ANGELA LOU A. MAULA
CHAPTER ONE: INTRODUCTION

1.1 PROJECT CONTEXT


Games are part of today’s modern society. Games are activities which people, especially
children take part for enjoyment, leisure, learning, and competition. With technology, games are
created by using console devices, or developing an application for desktops and smartphones. For
one to be called a game, one must have rules, mechanics and its logic. A rule restricts the player
to do actions that are only allowed in the game. Mechanics are actions that a player must practice
to make good progress in the game. Logic is the basis of how a game must work.

In order to understand how a game works, the proposed project is about developing a
desktop application called Classic Tetris. Tetris has a particular logic called collision detection.
What collision detection in the game is to arrange the blocks based on how physically it should
move and stack. The aim of this research is to understand how collision detection and other
mechanics and rules of the game works.

1.2 PROJECT PURPOSE AND DESCRIPTION


The purpose of this research is to create a game application for desktop computers. The
main part of this research is to understand the logic of the proposed project by creating a game
called Classic Tetris. Classic Tetris is a game with blocks and when a group of blocks form a
particular shape, this shape is called tetrimino. There is a vertical rectangular field and above it
tetrimino are falling one by one. These pieces stack at the bottom of the field. While falling, the
player can rotate and move the piece left and right. If there are a row of blocks in the field, that
row will be cleared out.

1.3 OBJECTIVE
The main objective of the research is to create the proposed project and understand its
particular logic called collision detection:
a. To give entertainment
b. To enhance cognitive ability by playing the game.
c. To expand the knowledge in creating game applications.

1.4 SCOPE AND LIMITATION


The scope of the game project is that the game can determine or draw where the current
piece will potentially fall. Also the game can also see what will be the three next pieces after the
current piece. The game can also hold a current piece swapping it to the next piece if there’s no
currently hold piece. Otherwise the current hold piece will be swapped to the current piece.

The limitation of the game is that the modern collision where a certain piece can rotate
along with the stacked blocks as long as there is a potential space in the blocks that can occupied
by the piece, is not possible in the game.
CHAPTER TWO: REVIEW OF RELATED SYSTEM AND RELATED LITERATURE

NES Tetris Version (1989)


This version of Tetris is one of many conversions of the famous block-stacking game, as
well as the best-known (but not the only) version on Nintendo’s first home console. The goal is to
place pieces made up of hour tiles in a ten-by-twenty well, organizing them into complete rows,
which disappear. As rows are cleared, the pace of the game increases, and the game ends if the
stack reaches the top of the well. The game offers two different modes of play, ‘Type A’ and ‘Type
B’. ‘Type A’ is a standard endless mode, where the speed of the game increases every ten lines,
with an option for the starting level when beginning the game. ‘Type B’, on the other hand, is a
race to clear 25 lines, with options for both drop speed and starting garbage. In both modes,
successful play is rewarded with cute animations.
In comparison, Classic Tetris is more like the “Type A” of the NES Tetris Version where
the game is endless, and speed of the game increases every ten lines. But there's a problem in the
NES Tetris Version, some of the pieces don't rotate when they are near or touch the walls of the
field. Classic Tetris solved this problem along with its collision detection algorithm.
Brick Game Tetris (popularity early 1990s)
A gaming device that runs on batteries, equipped with a number of pre-installed games and
black and white (monochrome) screen. In such devices, almost always there is a game similar to
"Tetris", but along with it there are often other games. There are different types of devices with
different number of games. Loading additional games in such a device is not possible. Due to the
fact that the name "Tetris" is a registered trademark, device manufacturers, in order to avoid
conflict with the rights holders, is used to refer to it, the term "Brick Game". This allows
manufacturers to freely exercise this kind of production in the EU, as evidenced by the presence
of many of the machines the CE mark (Conformité Européenne). Brick Game was very popular in
post-Soviet Russia in the 1990s and early 2000s. These devices were manufactured primarily in
China. Currently available devices modified several constructions made in the classical form of
buildings and in buildings that mimic the appearance of mobile phones, today's gaming consoles
and others. Copies of the classic design also occur. They still enjoy a certain popularity among
retrocomputing fans, with copies of the release of the previous years are valued higher.
Though Brick Game Tetris and Classic Tetris use the same background sound, the
difference between the two is that Brick Game Tetris is a console game while on the other hand,
Classic Tetris is a desktop application. Also Brick Game Tetris has a lot of stages in it while Classic
Tetris is only a standard endless game.
Tetris Battle (2011)
Enjoy multiplayer Tetris against other players on Facebook. Battle 2P+ - All-new battle
mode! 2-KO max for faster battles and improved ranking system. Battle 2P - Classic battle mode,
where you need to knock out your opponents as much as possible in a two-minute match.
Marathon - Complete 15 levels to win the game. Battle 6P - Play against five other opponents.
Sprint - Clear 40 Lines as fast as you can. Sprint 4P - Clear 40 Lines faster than your opponents.
Arena - Become the Arena Champion in a two-minute battle royale!
Tetris Battle is the so-called modern tetris where its collision detection algorithm is
flexible. Classic Tetris collision detection is not as flexible as Tetris Battle but its collision logic
is enough than the old versions of tetris. Also Tetris Battle is an online game while Classic Tetris
is not. The only similarity between the two is both have ranking systems though in Tetris Battle,
they rank players online while Classic Tetris is only rank players locally.

Tetris Ultimate (November 11, 2014)


A puzzle video game developed by SoMa Play and published by Ubisoft. Ubisoft partnered
with The Tetris Company to develop the game to celebrate the 30th anniversary of the Tetris
franchise. Tetris Ultimate was first released in November 2014 for the Nintendo 3DS as retail
game and as a digital download in the Nintendo 3DS eShop. In December 2014 the game became
available as a digital download for Xbox One and PlayStation. These versions were criticized for
frame rate issues in the online modes. In 2015, the game was released for PlayStation Vita. Because
of the release of Tetris Ultimate, Nintendo removed the Game Boy version of Tetris and digital
download Tetris: Axis from the Nintendo 3DS eShop in December 2014. Since January 2014,
Ubisoft holds the license rights for the console/handheld versions of Tetris whereas Electronic Arts
retains the Tetris license for mobile platforms.
Tetris Ultimate is the modern version of the NES Tetris Version. The same as NES Tetris
Version, the comparison between the two is that Classic Tetris is only a standard endless game,
whereas Tetris Ultimate has a lot of stages, and also play online. Classic Tetris doesn’t require an
internet connection to be played as it only operates as a single player offline game.
Tetris PS3 (July 09, 2008)
Electronic Arts and Wanako Games (Chile) have joined to release Tetris for the
PlayStation Network. This game features 1080p high-definition graphics, 5.1 surround sound,
replay functionality and online multiplayer. Players can see how they stack up to the best Tetris
players internationally by checking out worldwide and regional leaderboards, which are refreshed
weekly. This game can be considered as an upgraded version of Tetris PSP Mini and shares many
music and game modes with the said game.
Tetris(PS3) is a console game played on PlayStation. Classic Tetris is a desktop application
game. Tetris(PS3) is also an online game while Classic Tetris only works offline as it is only a
single player game. The only similarity between the two is that both have leaderboards.
CHAPTER THREE: TECHNICAL BACKGROUND

3.1 ARCHITECTURAL FRAMEWORK

One-Tier Architectural Framework


Classic Tetris is a game that can only be played by one user at a time. To make the game a
little bit exciting, a leaderboard where the score of the player could be ranked. All of these are
included in only one system. This represents that the game project uses a one-tier architectural
framework where all elements of the game are packed in one place. Examples of these elements
are the interface of the game which the player can see, and the scores of the players that are
recorded in the game.

3.2 SOFTWARE DEVELOPMENT TOOLS

The software used in developing the project proposed are the following:
● Programming language: Java JDK 8.2
● Integrated Development Environment(IDE): Netbeans 8.2
● Image Editor: Krita, Photoshop CS6
● Text Editor: Sublime Text 3
● Version Control: Github

3.3 HARDWARE REQUIREMENTS

The following specifications are required in order to run the project:


● Java SE (8u221 version up to latest)
● Operating System: Windows XP, 7, 8.1, 10
● Processor: Intel® Pentium® Silver N5000 CPU @ 1.10 GHz
● Installed Memory (RAM): 2GB to 4GB
3.4 RESEARCH AND METHODOLOGY

Use Case Diagram

Figure 3.1 Use Case Diagram

Use case diagram shows the interaction of the player on the game system. Above, shows
that the player can only interact in adding a username, play the game and viewing the highscores.
The player is directly engaged in adding a username and viewing the highscores. Upon playing the
game, this area is expanded to several functionalities. The player can optionally resume, pause, or
quit in game. When the game reaches its end, the game must submit the score of the player to the
leaderboard.
Context Level Diagram

Figure 3.2 Context Level Diagram

Context diagram shows only one external entity and one process node. On the left side is
an external entity named Player. Player sends the username, plays the game, and pushes the score
after the game. On the right side is a process node called Classic Tetris System. This process gets
what the player inputs and by the end of the game manages these inputs to rank the scores of the
players.
Data Flow Diagram

Figure 3.3 Data Flow Diagram


Data flow diagram expands the Classic Tetris System process node in context level diagram
into four parts. First is the select username process. This handles the usernames of the player. This
process also controls that the player should select a username in order to play the game. Second is
the in-game process. During gameplay, score change depends on how many lines the player has
cleared. This score is shown live to the player as the game progresses.
Flow Chart

Figure 3.4 Flow Chart


The flowchart shows the whole process of the game. Upon starting the game, the player
will ask to select a username. If the player doesn’t have a username, then the game will ask to add
or enter a username to play the game. The main part of the whole process is to show how to avoid
collisions of the pieces. In the diagram above, you can see that after selecting a username, the game
instantiates a tetris game. Tetris game is an object that is called to operate the whole gameplay.
The first thing this process does is to add a piece that will drop according to the game speed. But
the piece must not drop without particular conditions. So after adding a piece, the next thing the
process will do is to check if there’s a collision at the next drop. If there’s a collision found, the
drop must stop and the piece will not be able to move by the player. If there’s no collision found,
the drop of the piece will not be interrupted. Around this condition, the game must check if the
piece reaches the stack of blocks. By the time the piece reaches the stack, the piece will be fixed
or joined the stack. After this procedure, the game will check if the stack surpasses the redline
above. If the stack surpasses the redline, the game will stop, if not the game clears out a row of
blocks then proceed to add a new piece. This will continue until the stack surpasses the redline
indicator.

APPENDIX A: USER’S MANUAL

Main Window

Figure 4.0 Main Window

Main window is the first the player will see after starting the game. There are four
components in the main window, select username combobox, play game button, highscore
button and exit button.
● Select Username Combobox - is where the player chooses username inside the
combobox.
● Play Game Button - when this button is clicked a new window will pop-up
which is the game itself.
● High Scores Button - shows the list players ranked according to their highest
scores.
● Exit Button - Close the main window.

Add Username

Figure 4.1 Add Username

Add username name is found inside the select username combobox. Upon selection, a
dialog window will pop-up on the screen and ask for name to input.
High Scores

Figure 4.2 Highscores Window

Highscore window will show when the highscore button is clicked. This window shows
the list of players ranked according to their highest score.
Play Game (Gameplay)

Figure 4.3 Gameplay

When the play game button is clicked the above image will pop-up. This is where they
play the game. The controls are shown on the bottom right corner and if the player wants to
pause the game there’s a text above the screen telling to press escape key if they want to pause.
Game Pause

Figure 4.4 Game Pause

When the escape key is pressed a small dialog window will pop-up. Inside this dialog
there are three buttons:
● Resume button - the game will continue after being paused.
● Retry button - the game will reset setting the score and line cleared to zero and
removing all the blocks stacked in the game area.
● Return to the menu button - the game will exit back to the main window.
Game Over

Figure 4.5 Game Over

When the blocks reach the redline above a dialog will pop-up indicating that you lose the
game. Inside of this dialog is the score you earn after the game.
REFERENCE

https://www.retrogames.cz/play_1030-NES.php?language=EN
https://harddrop.com/wiki/Brick_Game
https://tetris.com/product/3/tetrisreg-battle
https://harddrop.com/wiki/Tetris_Ultimate
https://harddrop.com/wiki/Tetris_(PS3)

Das könnte Ihnen auch gefallen