Studio › Manual › Studio kit

Gamepads and players

The kit reads every pad GameMaker sees, as it connects and disconnects.

  • Players: a pad becomes the next unused player on its first press (Pads join on first press), or input_player_set_pad(player, slot) sets it. The keyboard, mouse and touch belong to player 1 unless input_player_keyboard(p) says otherwise.
  • Families: Xbox, PlayStation, Switch (Pro and Joy-Con), Apple MFi (SteelSeries Nimbus and others) and generic pads are told apart by name and vendor, for button names and prompts.
  • Odd pads: an SDL mappings file (gamecontrollerdb.txt lines, as an included file) fixes pads whose buttons come out wrong.
  • Rumble: input_rumble(player, left, right, steps); players can turn it off (input_rumble_enabled(false), the controls screen's toggle).
  • Calibration: input_calibrate(player) takes the sticks' resting place as their middle.
  • Guards against what pads really do: a trigger or button that reads held before it is touched (the SteelSeries Nimbus's right trigger) counts only after it has been let go; sticks count once seen near the middle; one pad seen in two slots uses the first; players keep their pad when slot numbers change and get it back when it reconnects.

Keys are shown as on the Mac: ⌘ Command, ⌥ Option, ⌃ Control, ⇧ Shift. Studio for Windows shows its own keys beside each menu item.