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

Chapter 3. So How Do I Play? – Adding Player Interaction

In the previous chapter, a match-three game was started by laying pieces into a grid using a randomized fashion. A recursive function was then utilized so that the player would start with a board free of matching sets. This is nice, but the game is lacking the important element of player interaction.

In this chapter, player input will be focused on, particularly through mouse input and keyboard input. Using these input devices, the player will be given the ability to navigate the board as well as swap pieces to create matching sets. Knowing how to work with and implement multiple input sources can help expand a game's player base. Additional functionality will also be added to existing scripts ...

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