Tection!: A Tetris-Style Game Written in Action!

Tection! screen: an empty playfield on the left, score and next piece on the right, and the key list P right, O left, L down, Z rotate

In mid-November 2023 pedgarcia (credited on screen as PauLowRes) released Tection!, a falling-blocks puzzle game in the Tetris mould, written entirely in OSS Action!, the structured compiled language that was popular with Atari programmers in the 1980s. The game was renamed shortly after its announcement. Forum regulars pointed out that its first name was close to ACTris, an older Tetris clone that was also written in Action!, and the author changed it to avoid confusion.

What you get

Tection! is not trying to be flashy. The playfield is drawn with plain text-mode characters and there are no colour effects. The core game is all there, though: seven tetromino shapes chosen at random, a next-piece preview, line clearing and a running score. Everything is played on the keyboard:

Key Action
O move left
P move right
L drop faster
Z rotate

Q quits. The author has said that the main goal was to implement the game logic in Action!, and after seeing more polished Atari versions described it as more of a programming exercise than a full game.

Known issues

The first release had some rough edges. The GitHub page lists an unfinished intro screen and a stray block sometimes drawn in random places, and testers found that reaching Game Over crashed the game rather than returning to a title screen. The author said fixes and a nicer intro were planned for the holidays.

Why it matters

New games written in Action! that come with their full source are not common. The repository's TECTION.ACT is a compact (about 450-line) and practical example of the language: procedures for drawing the playfield, rotating and expanding tetromino shapes, polling the keyboard through the OS CH location at $02FC, and writing straight to screen memory found through the display list. Anyone learning Action! can read it, change it and recompile it. The thread also pointed to other Tetris versions worth studying, including Tetryx, whose source is available. The source of the classic Warsaw Tetris is believed lost.

Getting it

github.com/pedgarcia/tection has the Action! source TECTION.ACT, the compiled TECTION.COM and a screenshot, under the MIT licence. Load the COM file from DOS on a real machine or in an emulator. To modify the game, you need the Action! cartridge (or its image) and its runtime library SYS.ACT, which the source includes from drive 2.

Credits