O'Reilly logo

Beginning Java Game Development with LibGDX by Lee Stemkoski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required