© Jarred Capellman, Louis Salin 2020
J. Capellman, L. SalinMonoGame Masteryhttps://doi.org/10.1007/978-1-4842-6309-9_6

6. Input

Jarred Capellman1  and Louis Salin1
(1)
Cedar Park, TX, USA
 
It wouldn’t be a video game without the ability for players to manipulate the state of the game in some way. We are now ready to look into taking inputs from three different sources, namely, a keyboard, a mouse, or a gamepad, and mapping that input to actions that will change the state of the game, like moving the player around the screen and shooting bullets. When we are done with this chapter, you will have a game that looks like Figure 6-1. We promise the bullets look better when they move.
Figure 6-1

Final result

In this chapter, you will
  • Implement a scrolling background ...

Get MonoGame Mastery: Build a Multi-Platform 2D Game and Reusable 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.