DEV Community

Chad
Chad

Posted on

Tetris Development #1 - Setting Up

The first game that I would like to recreate is the game of Tetris. While it is a childhood game, it has also gained traction recently with the increase in popularity for the Puyopuyo-Tetris game in Japan.

Image description

This setup post has two areas to tackle: Game Specifications and Software.

Game Specification

Before diving into the implementation, the rules of the Tetris game must be clear. This is so that the implementation can be as efficient as possible, and does not obstruct future additions when implementing early features.

While there may be many versions of Tetris games online, I will go with the ruleset of one that I am familiar with.

  1. The Tetris game is played in a 20*10 (Height*Width) grid.

  2. There are 7 different Tetris blocks.

Image description

  1. At one time, one Tetris block will fall slowly from the top of the screen, and the player can move it left, move right, or rotate it clockwise, as well as drop the block immediately.

  2. The player can see the next 3 Tetris blocks coming up.

  3. The player has a "Store" slot, which is empty at the start of the game. They can store the current block (block A) into the "Store" slot anytime they want to. If there is a block (block B) in the slot already, that block (B) will be popped out, and replace block A at block A's location on the grid.

  4. When the player fill any row with 10 Tetris blocks, the row disappears and rows above it will drop down.

  5. Clearing one-row awards points.

  6. These actions award more points: Clearing more than one-row at once, Clearing rows in consecutive actions, Clearing 4 rows at once (a lot of points!), and possibly a T-spin (an advanced technique where the T block is spun as it falls so it goes into hard-to-reach spaces).

  7. Most modern Tetris games are multiplayer, and when one player does well and receives a certain amount of points, the other player will be punished by having rows added to the bottom of their screen. Since multiplayer games are a whole new can of worms, I will simulate this effect by adding rows to the bottom of the screen at random intervals.

  8. If the next Tetris cannot enter the screen, that is, the center of the screen reaches the full 20 rows height, the game is over.

  9. As time progresses, the Tetris blocks will fall faster to increase the difficulty and give the players less time to react.

These are the rules I can think of currently for the Tetris game.

Software

Moving on to the software used for development, I will need a simple lightweight 2D game development environment.

While I am proficient in Unreal Engine from a previous game, I feel that it is more suited for 3D games. I also have some brief experience making games in Unity, which is equally popular, but I am not as proficient in Unity.

Instead, I was recommended Godot by a fellow developer. It is an easy-to-pickup and beginner-friendly open-source engine, which I will use to develop the Tetris game.

In the next post, I will be starting my Tetris development in Godot, so stay tuned!

Top comments (0)