We will use the output of skeleton tracking on a simple game to show you how we can use this data to make the user a bigger part of the game than he was in old times. This pong-like game is the simplest game we could think of.
Also, in the How it works... section that follows, you can read information about almost every line of code.
The gameplay is fairly simple; we have a pong-like ball that can interact with a user's skeleton. It is not a great game, but it's still a game, and it is fun enough as a mini-game from a personal perspective.
If you'll take a look at the code (the main file is
OpenNI2Project.cpp), you can clearly see that we used two new
vector helps us to define arrays with dynamic-size behavior that we are going to use...