Game Design - Puzzle Games Part 1: Tile-based Puzzles
Games that make your brain hurt
Puzzle games are one of GamePyong's favourite genre of games. We've played a lot of them, from Tetris to Candy Crush Saga. We've also made a few such as Ints, Firewords, Monkory and Quicket. There are many different types of puzzle games and in this series of posts, we'll be taking a look at some of them to see what we can learn. The first type that we'll focus on is tile-based puzzle games.
These are games where you need to manipulate tiles to produce some result. It might be trying to get the tiles to form horizontal lines, matching three or more tiles of the same colour or some other type of tile manipulation. The oldest and arguably greatest tile-based game is, of course, Tetris. Created by Alexey Pajitnov in 1984, the game exploded into popularity and is widely regarded as one of the best puzzle games ever designed. It has also spawned a number of derivatives.
Another type of tile-based puzzle game is "match-n" games where players need to match tiles of the same colour or shape to remove them from the board. Games such as Puyo Puyo, Tetris Attack, Dr. Mario, Super Puzzle Fighter and Candy Crush use this mechanic to great effect. Usually, matching and removing tiles causes something to happen such as messing up your opponent's board, spawning bonuses or creating combos. For our own tile-based game, Quicket, we mapped tile matching to cricket actions like hitting a six or getting out.
The engine behind most tile-based puzzles is fairly simple. Usually an array is used to represent the board and each element of the array holds a tile. Moving tiles around the board alters the array. The complex part is detecting when matches (or complete lines for tetris) occur and filling the holes created by removing the matched tiles. The concept of tile neighbours comes into play where whenever a tile is moved, its vertical and horizontal neighbours are checked to determine whether there is a match. If a match occurs, the matched tiles' neighbours are also checked for a match and so on until no more matches can be found. Finally, tweening can be added to fluidly remove tiles and drop new random tiles to take their place.