Book Image

Libgdx Cross-platform Game Development Cookbook

Book Image

Libgdx Cross-platform Game Development Cookbook

Overview of this book

Table of Contents (20 chapters)
Libgdx Cross-platform Game Development Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Introducing the controllers API


Controllers play a big role in gaming as they are the kings of home consoles. Interestingly, they are also gaining followers among PC users, who had originally praised the mouse. Lots of people have a desktop connected to their living room television just to play from their couches using controllers. Not to mention that some games, such as sports titles, are simply better experienced with gamepads.

After diving into keyboard, mouse, and touch inputs, it is time to pay some attention to such an important icon of games. Libgdx provides a fully featured controllers API; however, it does not belong to the core framework. Instead, it is distributed as an extension, which means that you will not include it in your project unless you actually need it.

Throughout this recipe, we will cover the main aspects of the controllers API, which will be shown in the accompanying sample.

Note

The controllers extension is only supported on the desktop, Android (3.1 or greater), and...