© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
L. Salin, R. MorrarGame Development with MonoGamehttps://doi.org/10.1007/978-1-4842-7771-3_7

7. Game State and Gamepad Input

Louis Salin1   and Rami Morrar2
(1)
Cedar Park, TX, USA
(2)
San Leandro, CA, USA
 

You have done what is necessary for the base of your game so now you need to build around it. You can’t just have the player start off in the middle of the game, and you want your player to play with more than just a keyboard. Let’s make a main menu and code in a gamepad controller. You’ll start with the gamepad input detection.

Gamepad Detection

MonoGame natively supports Xbox 360 controllers in the framework, so you’ll be using one to map out the input for ...

Get Game Development with MonoGame: Build a 2D Game Using Your Own Reusable and Performant Game Engine 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.