Build an AS3 Tetris Game From the Ground Up (ActionScript)

In this Active Premium tutorial we’ll be creating a variant of the classic Tetris game, explaining general game concepts as well as some specific to this genre.

Introduction

Let’s start with a short history lesson for those who are not familiar with this game (even though I doubt that it’s an unknown game to anyone).

Tetris is a puzzle video game from the 80s in which pieces made out of four square units (or cells) fall down in a grid (or matrix) and you have to move and rotate them until they land so that you obtain horizontal lines of units without gaps.

The pieces in the game are called tetrominoes and are geometrical shapes composed of four squares. There are five unique tetrominoes; however in the Tetris game we use two more which are reflections of two pieces from the first five.

The game was designed and programmed by Alexey Pajitnov and released in 1984 and still remains a popular game although many variations of the game were created (but using the same concept).

To read more on Tetris game, Tetrominoes, and associated topics, you can read their wiki pages: Tetris and Tetromino.

Prerequisites

For this tutorial I’ll be using FlashDevelop (see a guide to installing and using that here) but you can use whatever software you like (Flash CS3 +, Flash Builder, FDT ). If you don’t like or you can’t get FlashDevelop for whatever reason I strongly recommend that you use something other than Flash because of the weak code editor it has and because we will only be writing classes and you’ll like the features that you find in a strong code editor. But if you’ll only be copying and pasting, Flash will do just fine.

Download Build an AS3 Tetris Game From the Ground Up (ActionScript)

Leave a Reply

Your email address will not be published. Required fields are marked *