|
The lessons within XNA Drum Game have a lot to do with controlling how the game will work with timing, one of the most critical aspects of music. We show you how to convert XNA's native timing method (ticks and cycles) into sustainable music notes derived from tempo and real music notation! Throughout the videos, you'll actually see three separate projects, the first two of which are key systems that will drive the third project, the Drum Game itself.
The first project covers how to build a sound engine using XNA. Naturally with a music-based game, this will be an absolute necessity. However, to give you a greater amount of flexibility in your own projects, we create two separate versions of the sound engine using separate libraries, allowing users to pick the one that's best for their project. The first of these engines makes use of the Cross-Platform Audio Creation Tool (XACT), which is ideal for development on either the Xbox 360 or a Windows PC. The second version of the sound engine uses only DirectSound, which is limited only to PC development, but offers users a faster response.
Once the sound engine is complete, we move on to the second project, the creation of a music engine. Through modular implementation of the sound engine, we can utilize either of the sound engine versions created previously. This music engine is what converts the program cycles of the computer into a note-based time format, in which each type of note derives from the quarter note. Using this calculation, we are able to create notes ranging from whole notes all the way down to 32nd notes, and further if the programmer so desired.
One of the critical aspects of the music engine is the implementation of musical time signature. The system which handles time signature in our music engine is designed such that it could be used with any type of signature based off common (2/4, 3/4, or 4/4 time) or compound time (6/8 time).
Both of these sub-projects are brought together in the creation of the Drum Game itself, which is the third and final project in the series. The game makes use of everything learned up to this point, with the addition of many systems to turn it into a playable game.
Among the many individual topics covered throughout the development of the game, you'll see how to create a screen management system to handle a stack of screens within the game. This allows the programmer to control how the progression of screens will take place, such as the main screen, the song selection screen, and the game screen itself. Viewers also get to see how each one of the notes is drawn on the screen based off the underlying musical timing system, and how input strikes can be compared against the location of these notes on the timeline to produce a hit or miss event. Drum Game is designed with two separate rendering systems, allowing the game to be played either horizontally or vertically.
Drum Game also includes a variety of different play modes. These include:
- - The player simply plays notes as they come across the screen to perform a song
- - Two players both attempt to play the same song to see whose score is more accurate
- - Play the drums however you like, and record your creations into a new song to be played later in either single or multiplayer modes!
- - Edit an existing song to adjust the timing, or take something you created in Freeplay and modify it to turn it into a drumming masterpieces for use in the other game modes!
|