Input

Total 8 Posts
This tag aggregates all tutorials on handling user input.

Programming Patterns: An Event-Queue

In this tutorial we will learn how to use an event queue to unify all interactions between game characters, such as the player and NPCs, and application components, such as user input and audio.

XInput and Gamepads

In this tutorial we will look at how to add support for gamepads to our application using the XInput API. XInput replaces DirectInput from previous DirectX versions and greatly simplifies the task of working with game controllers, as long as they are XInput-compatible, i.e. X-Box-like controllers.

Polling Joysticks with DirectInput

This tutorial explains how to use DirectInput in DirectX 11 to acquire user input from joystick-like devices.
C++

Marshalling Game Commands

In this brief tutorial we will learn how to use serialization, or marshalling, to store game objects into files on the hard drive and how to restore those objects, using deserialization, or unmarshalling.

Chasing the Mouse

This brief tutorial shows how to handle input from mouse devices. Native Windows functions are used to track the mouse position as well as the state of the mouse buttons.

Banging on the Keyboard

During this tutorial an efficient, event-based and highly configurable input handler is implemented and a robust system to acquire and update keyboard states is added to the input handler.

User Input

This tutorial briefly explains the idea of an event-based input system.