C++
Total 43 Posts
This tag aggregates all tutorials on C++ programming techniques.
Lambda Functions
Lambda functions were introduced by the C++ - 11 standard, allowing to write anonymous functions that can be used instead of complete structs or classes, avoiding the need to create complete class and function definitions. As an example, consider a function to compute the square of a number. In C+
The States of a Game
In this tutorial we will implement a state manager (a deque) to handle different game states, or scenes, such as an intro sequence, a main menu, the main game scenes and a game menu.
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.
Animated Sprites and Sprite Sheets
This tutorial builds upon the last tutorial and introduces animated sprites based on the flip book technique. To efficiently use that method, sprite sheets are used.