© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2024
W. Wang, T. WalcottProgramming for Game Designhttps://doi.org/10.1007/979-8-8688-0190-7_12

12. Getting Input from the User

Wallace Wang1   and Tonnetta Walcott2
(1)
San Diego, CA, USA
(2)
El Cajon, CA, USA
 

All programs, such as word processors, spreadsheets, and databases, must accept input from the user. In video games, players commonly control a game object through the keyboard, mouse, joystick, or touch screen. By defining how specific keys on the keyboard function, how different buttons on a mouse or joystick work, and how to detect different types of touch gestures, you can detect user input for your game’s particular needs.

Godot offers two ways to get input ...

Get Programming for Game Design: A Hands-On Guide with Godot now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.