• 2D Platform Games Part 1: Collision Detection for Dummies

    IMPORTANT! All of the articles in this series require you to have either Visual Studio 2010 or the Visual C++ 2010 Redistributable Package (4.8MB) installed in order to be able to try the pre-compiled EXEs provided with the examples. The Redistributable Package can be freely bundled with your own applications. Try the demo! This article…

  • Cutting Your Teeth on FMOD Part 4: Frequency Analysis, Graphic Equalizer, Beat Detection and BPM Estimation

    In this article, we shall look at how to do a frequency analysis of a playing song in FMOD and learn how to use this as the basis for a variety of useful applications. What is frequency analysis? Note: The SimpleFMOD library contains all of the source code and pre-compiled executables for the examples in…

  • Cutting Your Teeth on FMOD Part 3: Embedding Sounds In Your Application as Resources

    Having all of your sounds and music as separate files in your application is messy, and makes abuse by mischievous souls slightly easier. To tidy things up, we can embed audio files directly into the compiled EXE file. FMOD provides the ability to load audio directly from memory, so the problem has two main steps:…

  • Cutting Your Teeth on FMOD Part 2: Channel Groups

    If you’ve been following Part 1 of this series you should now be able to play music and sound effects with FMOD in your applications, pause and unpause them and change their volumes. But what about when you have many sounds whose parameters – like volume and pause state – you want to be able…

  • Tetris Aside: Coding for T-Spins

    (the source code and EXE file for this update of SimpleTetris can be found at the end of the article) One of my Tetris-playing colleagues pointed out to me recently that T-spins do not work in my implementation of SimpleTetris. Although I hadn’t checked it explicitly, I was quite surprised by this as I knew…

  • Tetris Revisited: Adding 2D Animations and Other Graphical Tweaks

    It’s game coding time with SimpleTetris again and this time we’re going to look at how to add a variety of different animations and useful graphical tweaks which can equally be applied to any game or demo. We will create a simple animation class in C++ which takes care of tracking the position and timing…

  • Cutting Your Teeth on FMOD Part 1: Build environment, initialization and playing sounds

    FMOD by Firelight Technologies Pty Ltd. is a cross-platform audio API used in – among other things – many commercial games such as Crysis, Diablo 3, Guild Wars, Guitar Hero, League of Legends, Second Life, StarCraft II, Tomb Raider, World of Warcraft and many others. It is in many ways an indsutry-wide gold standard in…

  • C++11: Using std::unique_ptr as a class member: initialization, move semantics and custom deleters

    Updated 23rd February 2013: Fixed typos in the code, incorrect use of const, clarified the use of the terms “initialization” and “assignment” to be semantically correct, corrected/clarified references to “constructor” and “assignment operator”, added an explanation of the default copy assignment operator and unique_ptr’s private copy constructor and copy assignment operator. Updated 12th May 2013:…

  • Tutorial: Enabling Re-definable Controls in Windows games

    In this article we shall take a look at how to make the controls in your C++ game editable by the user. Once again we shall use SimpleTetris as the base example, and as with our implementation of the high score table, we will make use of Boost for serializing (saving) data into a file,…

  • C++11: About Lambda Functions

    One of my favourite inclusions in C++11 – the latest iteration of C++, formerly known as C++0x – is the ability to create lambda functions. Lambda functions are nothing more than unnamed, essentially anonymous functions that you can define in place of where you would usually use a function name, pointer or reference, and they…

Design a site like this with WordPress.com
Get started