Tetris - Classic Tetris Game.

Tetris
Classic Tetris Game.


  • 7 classic pieces (I, O, T, S, Z, J, L)

  • Scoring and level system

  • Ghost effect showing where the piece will land

  • Full color customization for each piece type

  • You can use images for each block

  • Solid color or background image for the board; the image is applied to each cell.

  • Gesture detection:

    • Horizontal swipe: Move left/right

    • Vertical swipe down: Quick drop

    • Vertical swipe up: Rotate piece

    • Single tap: Rotate piece


Level and Scoring System

  • Starting Level: Begins at 1
  • Level Up: Every 10 lines cleared, you advance 1 level

Example:

  • 0-9 lines: Level 1
  • 10-19 lines: Level 2
  • 20-29 lines: Level 3
  • And so on

Falling Speed ​​by Level

  • Level 1: 470ms per move

  • Level 2: 440ms per move

  • Level 3: 410ms per move

  • Maximum Speed: 100ms (Level 14+)

Scoring Examples:

Standard Board

Lines Level 1 Level 2 Level 3 Level 4
1 line 40pts 80pts 120pts 160pts
2 lines 100 pts 200 pts 300 pts 400 pts
3 lines 300 pts 600 pts 900 pts 1200 pts
4 lines 1200 pts 2400 pts 3600 pts 4800 pts

InitializeGame

Start the game with the graphics container.

The board will occupy the entire height and width of the arrangement.


NextPieceBoard

Set the container for the next piece.

This is to visualize which block comes next.


NewGame

Start a new game.

component_method (10)


TogglePause

Pause/Resume the game.

component_method (11)


MoveLeft

Move piece to the left.

component_method (12)


MoveRight

Move piece to the right.

component_method (13)


Rotate

Rotate the block.

component_method (14)


Drop

Quick drop.

component_method (15)


BlockColor

Sets the color of a specific type of block.


BlockImage

Sets the image of a specific type of block.


GridBackgroundColor

Set the grid background to a solid color.


GridBackgroundImage

Set the grid background with an image.


IsInitialized

Indicates whether the game has been started correctly.

component_set_get (3)


GridLineColor

Sets the color of the grid lines.


PieceBorderColor

Set the border color of the pieces.


CurrentScore

Gets the current score.

component_set_get (4)


CurrentLevel

Gets the current level.

component_set_get (5)


IsGameRunning

It shows if the game is running.

component_set_get (6)


IsGamePaused

It is obtained if the game is paused.

component_set_get (7)


ExplosionEffectEnabled

Activate or deactivate the explosion effect when deleting lines.


ScoreChanged

It triggers when the score changes.

component_event (12)


LevelChanged

It triggers when the level changes.

component_event (14)


LinesCleared

It triggers when lines are being cleaned.

component_event (13)


GameOver

It fires when the game ends.

component_event (15)


v1.0 Mar 02, 2026.

Tetris.aia (119.2 KB)

joejsanz.joedevtetris.aix (38.0 KB)


JDK: 11
Minimum API Level: 21
Updated On: 2026-03-02T08:00:00Z

Built using: FAST-CLI v5.7.0-premium


Thanks.

6 Likes

Amazing!!!!

Couldn't imagine whether these kind of game can be made using extension..

Great effort. Welldone @Joejsanz

Here is another Tetris extension. It is discontinued.