CHAPTER 6

image

Accepting User Input

There are a variety of ways that the player can interact with a game, and this chapter covers the various input devices in detail. In addition to retrieving information from the devices, we will also explore how to translate what the player does into meaningful events in the game. This is extremely important for any game—regardless of how good a game looks and sounds, it must also be easy to interact with.

Controlling the Game

On a typical home computer we can pretty much rely on there being a keyboard and mouse. This venerable setup is preferred by first-person shooter fans who like to control head movement (i.e., ...

Get Beginning Python Games Development : With Pygame, Second Edition 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.