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

Integrating keyboard input

With the creation of the new scripts and events, the player should be able to highlight a grid block and swap pieces that create sets of three. What if the player wants to do this with the keyboard though? Normally, such requests go ignored, but allowing a player to use multiple input devices is a great way to expand a game's player base. The following sections will go over some new events and updates to the current scripts and events to integrate keyboard input with the game.

Introducing keyboard functions, variables, and events

Keyboard input can be accessed through a variety of ways. Keyboard-specific events are divided into the following three, separate types:

  • Keyboard: This is an event triggered if the specified key ...

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