The fundamental thing that makes a game a game is the interaction with the player. This is achieved by a variety of means, with the keyboard and mouse on computers and through touch and tilting on mobile devices. The standard way of doing this in GameMaker is to put actions in mouse or keyboard events, but sometimes you need more control, especially when creating something for mobile devices or HTML5. For that you can use the mouse and keyboard functions to get which buttons have been pressed or released as well as retrieve the touches on a screen using the gesture functions, and there are a couple of specific functions relating to the tilt controls that most mobile devices have too.

The following sections deal with the main user input devices for developing games with GameMaker Studio 2:

  1. Keyboard Input
  2. Mouse Input
  3. Device Input
  4. Gesture Input
  5. GamePad Input
  6. Virtual Keys And Virtual Keyboards