O'Reilly logo

GameMaker Game Programming with GML by Matthew DeLucas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Checking pieces

The board is now built with a random configuration; however, there may already be sets of matching pieces. Of course, just because a player can see a set, does not mean the game can.

To find matching sets of three or more pieces on the game board, the game will start at the upper-left corner of the screen. It will then check the pieces below and to the right of this initial piece. If there are three or more matching pieces in the same direction, they will be re-randomized. The board will then continue to be checked. If there are sets of matching pieces, the entire process is repeated. This is known as a recursive process due to its repetitive nature. It will continue to be executed until its goal of starting the player out with ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required