Monogame Input Tutorials

Below is a collection of tutorials about getting input from the player in many different ways, including a keyboard, a mouse, and an Xbox controller. These tutorials are designed in such a way that you should be able to go through them at any time, even if you haven't completed the 2D or 3D tutorials or even before you've started on any of them. A few of the tutorials will use stuff in other tutorials to display what the user is currently doing, but in these cases, there is a link back to the tutorial that discusses this, although it shouldn't be too hard to just ignore that stuff if you don't want to go back to another tutorial.

Also, you don't need to go through these tutorials in order. If you are looking for a tutorial about Xbox controller input, jump down to those tutorials.


1 - Keyboard Input

This tutorial will cover one of the simplest and most powerful ways of getting input from a user: the keyboard.
Keyboard Input


2 - Mouse Input

Often a mouse is the simplest way for a user to interact with a game. This tutorial covers the basics of getting input from a mouse in a MonoGame game.
Mouse Input


3 - Picking

This is a slightly more advanced tutorial, and it would be useful to have gone through most of the 3D tutorials before going through this one. Picking is where a user is able to use a mouse to select objects in a 3D scene. This tutorial covers a simple but fairly accurate method for performing picking in MonoGame.


4 - Xbox Controller Input

MonoGame games are often used on a console with a gamepad controller, instead of the normal mouse and keyboard. This tutorial covers getting input from an Xbox controller. Also, for your information, Xbox controllers also work on a PC, so even if you aren't planning on making a game that works on a console, you might still be interested in getting input from a controller anyway.
Xbox Controller Input


5 - Xbox Controller Vibration

Now that you have an understanding of how to get input from an Xbox controller, you might be interested in knowing how to make the Xbox controller vibrate. It's actually pretty simple to do.
Xbox Controller Vibration