Codex Gamicus
This is the main article for Tetris, for the several variations of this game, see Tetris Variations.

Tetris is a computer game developed by Alexey Pajitnov in 1984, while he was working for the Academy of Sciences in Moscow, Russia, inspired by a pentominoes game he had purchased earlier.

Tetris is one of the best-known computer games ever devised, thanks partly to its success as a video game. It, or a similar version known as a clone, has appeared on nearly every games machine available. It has even appeared as part of an art exhibition on the side of a building.[1] The most famous variant has been the Game Boy variant (released in 1989) since the game was distributed with the machine. Another famous version is for the NES, which includes the Tetris classic music. This version is quite good because it is very similar to the Arcade version, despite the hardware differences.

The game[]

Tetrominoes or tetrads, shapes composed of 4 blocks each, are falling down the screen that consists of a matrix or play field 10 blocks wide and 20 blocks high, and one has to direct them so they will fit to the wall on the bottom.

When a line of blocks has no gaps, it is complete and disappears.

Tetris on the Nintendo Game Boy

I Tetris Block.gif
I Block
T Tetris Block.gif
T Block
O Tetris Block.gif
O Block
L Tetris Block.gif
L Block
J Tetris Block.gif
J Block
S Tetris Block.gif
S Block
Z Tetris Block.gif
Z Block

The seven tetrominoes that make up Tetris are "I," "T," "O," "L," "J," "S," and "Z." All are capable of single and double clears; the "I," "L," and "J" are able to clear triples, and only the "I" has the capacity for the four simultaneous clears that is also known as a "Tetris", after its namesake.


Original algorithm

When a row of blocks is cleared and removed, the stacks of blocks above it fall. Many versions of Tetris simply move blocks down by a distance exactly equal to the height of the cleared rows below them. This results in behavior unlike real-world gravity, in that blocks may be left "floating in mid-air". Many feel that this behavior, called "naive gravity", contributes to the gameplay rather than detracting from it.

Some newer variants implement a different algorithm that uses a flood fill to segment the playfield into connected regions and then makes each region fall individually, in parallel, until it touches the region at the bottom of the playfield. This opens up additional "chain-reaction" tactics involving blocks falling to fill additional lines, which those games tend to reward with a higher score.

Algorithm with chain reactions

Is it possible to play forever?[]

Normally, players lose because:

  • they can no longer keep up with the increasing speed, or
  • a specific implementation of the game with not very responsive control fails to keep up with itself when the pieces' downward velocity exceeds the maximum lateral velocity the player can apply to a piece. (Avid players consider this situation a design flaw.)

But what if the speed did not increase? Would it be possible to play forever? An article has been published that addresses this issue, and it turns out that in theory, you are doomed to lose eventually.

The problem is the S- and Z-shaped pieces. Suppose you got a large sequence of S-shaped pieces of the same orientation. Eventually, many implementations' approximation of gravity (see above) forces the player to leave a hole in a corner.

Suppose you then get a large sequence of identical Z-shaped pieces. Eventually, you'll be forced to leave a hole in the opposite corner, without clearing your previous hole. Now, things go back to the original orientation for a while and so on until the pieces stack up to the top. Since the pieces are distributed randomly, this sequence will eventually occur. So, if you play long enough, and your random number generator is theoretically perfect, you will lose the game. (See also a more detailed discussion of this issue at, along with an implementation written in Java that has been modified to deal only S- and Z-shaped pieces.)

Practically, this does not occur because the pseudorandom number generator in most implementations, which is usually a linear congruential generator, does not deal such a sequence.

Even on an implementation with a theoretically perfect random number generator (for example, based on hashing Brownian motion) and with naive gravity, a good player can survive over 150 consecutive pieces that are all S-shaped or Z-shaped; the probability at any given time of the next 150 pieces being only S- and Z-shaped pieces equals one in (7/2)150 (approximately one in 4 × 1081). This number has the same order of magnitude as the number of atoms in the known universe.[2]

Several of the subproblems of Tetris have been shown to be NP-complete.

Scoring formula[]

The scoring formula for the majority of Tetris applications is built on the belief that more difficult line clears should be awarded more points. The four possible line clears are as follows:

  1. Single = (level+1)*40 one line is cleared
  2. Double = (level+1)*100 two lines are simultaneously cleared
  3. Triple = (level+1)*300 three lines are simultaneously cleared
  4. Tetris = (level+1)*1200 four lines are simultaneously cleared
Level 00 01 02 03 04 05 06 07 08 09 10
Single 40 80 120 160 200 240 280 320 360 400 440
Double 100 200 300 400 500 600 700 800 900 1000 1100
Triple 300 600 900 1200 1500 1800 2100 2400 2700 3000 3300
Tetris 1200 2400 3600 4800 6000 7200 8400 9600 10800 12000 13200

History and legal issues[]

Tetris NES

Tetris has been embroiled in a strangely large number of legal battles since its inception. In June 1984, Alexey Pajitnov created Tetris on an Electronica 60 while working for the Academy of Sciences in Moscow. He created it at their Computer Center, and Vadim Gerasimov ported it to the IBM PC.

The name "Tetris" is a combination of the Greek prefix tetra-, referring to the four square blocks in each piece, and "tennis", Pajitnov's favorite sport at the time.[3]

From there, the game exploded into popularity, and began spreading all around Moscow. (This version was available on Vadim Gerasimov's web site at, but the Tetris Company used the DMCA to force Gerasimov to remove it.)

The IBM PC version eventually made its way to Budapest, Hungary, where it was ported to various platforms and was "discovered" by a British software house named Andromeda. They attempted to contact Pajitnov to secure the rights for the PC version, but before the deal was firmly settled, they had already sold the rights to Spectrum HoloByte. After failing to settle the deal with Pajitnov, Andromeda attempted to license it from the Hungarian programmers instead.

In 1987 Andromeda managed to obtain copyright licensing for the IBM PC version and any other home computer system.

Meanwhile, before any legal rights were settled, the Spectrum HoloByte IBM PC version of Tetris was released in the United States in 1988. The game's popularity was tremendous, and many players were instantly hooked—it was a software blockbuster.

By 1988, the Soviet government began to market the rights to Tetris through an organization called Elektronorgtechnica, or "Elorg" for short. By this time Elorg and Pajitnov had still seen no money from Andromeda, and yet Andromeda was licensing and sub-licensing rights that they themselves didn't even have.

By 1989, half a dozen different companies claimed rights to create and distribute the Tetris software for home computers, game consoles, and handheld systems. Elorg, meanwhile, held that none of the companies were legally entitled to produce an arcade version, and promptly signed those rights over to Atari Games, while it signed console rights over to Nintendo.

Tengen (the console software division of Atari Games), regardless, applied for copyright for their tetramino game for the Nintendo Entertainment System, loosely based on the arcade version, and proceeded to market and distribute it under the name TETЯIS (with faux Cyrillic typography incorporating the Cyrillic letter Ya), disrespecting both Nintendo's and Elorg's rights to the name. Many people think that the Tengen version is a more playable port than the Nintendo version.

After only a few (very popular) months on the shelf, the courts ruled that Nintendo had the rights to Tetris on home game systems, and Tengen's TETЯIS game was recalled, having sold only about 50,000 copies.

Nintendo released two Tetris variants for both the Game Boy and the NES (the rights to the Game Boy version were sub-licensed from Bullet-Proof Software) and sold more than three million copies; most players considered Nintendo's NES version inferior because it lacked the side-by-side simultaneous play of Tengen's version, but Nintendo's Game Boy Tetris became arguably the most well-known version of Tetris. The lawsuits between Tengen and Nintendo over the NES version carried on until 1989.

Alexey Pajitnov himself made very little money from the initial deal, however, even though Nintendo was able to profit from the game handsomely.

In 1996, Pajitnov and Henk Rogers formed The Tetris Company LLC and Blue Planet Software in an effort to get royalties from the Tetris brand. It manages the licensing of Tetris copyrights and trademarks owned by Tetris Holding LLC, Elorg's successor, to publishers of authentic Tetris games.

The Tetris Company has registered the trademark for "Tetris" throughout the developed world and owns copyrights for numerous authentic Tetris games. It also claims copyright on any game implementing the rules of Tetris, but a form letter published by the United States Library of Congress [1] refutes much of TTC's copyright claims on the game, leaving the trademark on "Tetris" as TTC's most significant claim on any government-granted monopoly. The company has occasionally sent cease-and-desist letters to developers of "Tetris clones", or clean-room developed tetromino game software with rules similar to Tetris, which are distributed for free on the web. The vast majority of these cases have been resolved once the author of the clone agreed to change the game's name or otherwise stop infringing the trademark. The company has also filed actions with U.S. Customs to block importation of certain video game machines containing "Tetris clones" into the United States.

Tetris variants[]

A number of Tetris variants exist for different platforms. Some feature alternate rules and pieces, and others have completely different gameplay.

There are also some variations made by some freeware or shareware programmers, for the PC. In one version of the game, called Stygian Tetris (Matthew Versluys, 1995), a freeware game, there are blocks that suddenly appear and disappear from the screen at random positions. Also there are other type of gameplay where there are lines added to the board every certain time. Moreover, in versus mode the player can send "punishments" to his/her opponent. There is also a Tetris with colors, to make lines with colors instead of plain pieces. There is another variation with bombs called Bombliss for the NES. The bombs are like wild cards.


See also[]

External links[]

Wikipedia-logo.png This page uses content from Wikipedia. The original article was at Tetris. The list of authors can be seen in the page history. As with Codex Gamicus, the text of Wikipedia is available under the Creative Commons Attribution-Share Alike 3.0 (unported) license. The content might also be available under the terms of the GNU Free Documentation License.