Learn about the history of Tetris from the evolution of the rule that blocks fall
By
Since Tetris was born in 1985, more than 150 Tetris games have been released. Tetris, which has been improved over the decades of history, has evolved programs that allow the random appearance of blocks by programmers. A typical Tetris program is documented as a document. Some of them are listed, and Simon Laroche, who studies Tetris independently, introduces how Tetris has changed over the years.
The history of Tetris randomizers-Simon Laroche
https://simon.lc/the-history-of-tetris-randomizers
table of contents:
Tetris (1985)
Tetris / Nintendo (1989)
Tetris The Grandmaster / Arcade (1998)
◆ Tetris World / Game Boy Advance (2001)
Tetris The Grandmaster 3 -Terror Instinct- / Arcade (2005)
Tetris (1985)
The oldest original Tetris selected the next block to appear with pure randomness. In other words, the same block will continue many times, or a specific block will not come out at all.
In the program, each block is represented by the name ['I', 'J', 'L', 'O', 'S', 'T', 'Z']. The following image shows which block each represents.
Laroche says that programs designed only with pure randomness are unstable, and there is a possibility of invincible combos that only generate S blocks and Z blocks (PDF files) . Some games have actually reproduced invincible combos.
Tetris `` HATETRIS '' where the most unpleasant block constantly falls mercilessly-gigazine
The program used in Tetris in 1985 is as follows:
[code] function * random () {
const pieces = ['I', 'J', 'L', 'O', 'S', 'T', 'Z'];
while (true) {
yield pieces [Math.floor (Math.random () * pieces.length)];
}
} [/ code]
Tetris / Nintendo (1989)
First, select a block at random and check if the block is the same as the block that just appeared. If it is the same as the block that appeared immediately before, repeat the procedure of re-selecting the block at random again. This procedure reduces the possibility of the same block appearing twice in succession, but it cannot avoid the phenomenon that two types of blocks continue to appear alternately.
[code] The program used in Tetris in 1989 is as follows.
function * historyRandomizer () {
const pieces = ['I', 'J', 'L', 'O', 'S', 'T', 'Z'];
let history;
while (true) {
// First 'roll'
piece = pieces [Math.floor (Math.random () * pieces.length)];
// Roll is checked against the history
if (piece === history) {
piece = pieces [Math.floor (Math.random () * pieces.length)];
}
history = piece;
yield piece;
}
} [/ code]
Tetris The Grandmaster / Arcade (1998)
Based on the arcade version of Tetris developed by SEGA in 1988, Tetris the Grandmaster (TGM) has evolved its ability to check history compared to Nintendo's Tetris, which appeared in 1989.
Tetris in 1989 checked only one history, but TGM checks four histories. In other words, you have to spend at least 4 times to make the same block appear. With this program, the same block is less likely to appear in succession. However, Laroche says that it was far from a program that could provide all the blocks in a well-balanced manner.
The program used in TGM is as follows.
[code] function * historyRandomizer () {
const pieces = ['I', 'J', 'L', 'O', 'S', 'T', 'Z'];
// First piece special conditions
let piece = ['I', 'J', 'L', 'T'] [Math.floor (Math.random () * 4)];
yield piece;
let history = ['S', 'Z', 'S', piece];
while (true) {
for (let roll = 0; roll <4; ++ roll) {
piece = pieces [Math.floor (Math.random () * 7)];
if (history.includes (piece) === false) break;
}
history.shift ();
history.push (piece);
yield piece;
}
} [/ code]
◆ Tetris World / Game Boy Advance (2001)
Tetris World was released on Game Boy Advance, Nintendo GameCube, and Xbox. As of 2019, the Tetris World program is the system adopted by most Tetris created since 2001.
The program improvement by checking the history had the effect of preventing the same block from continuing, but it was not enough to prevent the situation where a specific block did not appear. Tetris World's program uses a system called 'bags' to improve the history check method.
In bags, a list with 7 sets of blocks is first created, and blocks are randomly selected until the list is empty. When the list is empty, the process of creating a new list of 7 different sets of blocks is repeated. In other words, seven blocks appear as one cycle, and the blocks that appear in one cycle are all different blocks.
As a disadvantage, the block appearance law is easy to understand, so the player can predict what block will come next. If you understand the law properly, you can continue playing Tetris forever, and the following article introduces techniques that actually apply this specification.
How to continue playing Tetris forever-gigazine
By Jared Cherup
The program used in Tetris World is as follows.
[code] function * randomGenerator () {
let bag = [];
while (true) {
if (bag.length === 0) {
bag = ['I', 'J', 'L', 'O', 'S', 'T', 'Z'];
bag = shuffle (bag);
}
yield bag.pop ();
}
} [/ code]
Tetris The Grandmaster 3 -Terror Instinct- / Arcade (2005)
Tetris The Grandmaster 3 -Terror Instinct- (TGM3) has evolved Tetris system by incorporating a unique system not found in previous Tetris.
Instead of history checks and bags, TGM3 uses a group of blocks called a “pool”. First, create a pool with a total of 35 blocks for 5 sets of 7 types of blocks, and randomly select blocks to appear. When the number of blocks in the pool is reduced, the smallest number of blocks in the pool is replenished. It is said that this system is an excellent program that solves the problems that the same blocks are not continuous and specific blocks do not appear, and it is difficult to predict the appearance of blocks. It is.
The program used in TGM3 is as follows.
[code] function * tgm3Randomizer () {
let pieces = ['I', 'J', 'L', 'O', 'S', 'T', 'Z'];
let order = [];
// Create 35 pool.
let pool = pieces.concat (pieces, pieces, pieces, pieces);
// First piece special conditions
const firstPiece = ['I', 'J', 'L', 'T'] [Math.floor (Math.random () * 4)];
yield firstPiece;
let history = ['S', 'Z', 'S', firstPiece];
while (true) {
let roll;
let i;
let piece;
// Roll For piece
for (roll = 0; roll <6; ++ roll) {
i = Math.floor (Math.random () * 35);
piece = pool [i];
if (history.includes (piece) === false || roll === 5) {
break;
}
if (order.length) pool [i] = order [0];
}
// Update piece order
if (order.includes (piece)) {
order.splice (order.indexOf (piece), 1);
}
order.push (piece);
pool [i] = order [0];
// Update history
history.shift ();
history [3] = piece;
yield piece;
}
} [/ code]
The program of TGM3 is excellent, but because Tetris can be enjoyed with a strategy even with specifications that can predict the next block like Tetris World, it is not that it is not good as a game just because there are drawbacks Says Laroche.
Related Posts: