CHAPTER 5

image

Alternative Sources of User Input

In previous chapters, your games have been controlled with traditional desktop computer hardware: a keyboard and a mouse. In this chapter, you’ll explore two alternative sources of user input: gamepad controllers and touch-screen controls. If you do not have access to a gamepad with a USB connector (as discussed later in this chapter), you can still follow along; the code will still compile, and you’ll leave keyboard controls as a feedback (a good practice to consider in general for the convenience of your game’s players). Similarly, even if you don’t have access to device that’s touch-screen capable, ...

Get Beginning Java Game Development with LibGDX now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.