High Level Design

We chose this project due to personal interest in the game itself, as well as aspects of the implementation including the flexibility/creativity of features, and the ability to play the game throughout development and as the final product. Designing our own assets allowed us to take creative liberties with respect to the original game. We appreciated the balance of having a starting point to implement game functionality of the original, but being able to change features as we choose. Furthermore, we liked that a game design project was different enough from the labs completed previously in the course that we would face new challenges and learn from being forced to apply concepts we learned throughout the class in different ways. Ultimately, we enjoyed playing the game throughout development. It was fun to watch the demo level develop as we designed assets and implemented new features. Of course it was also satisfying to play the final result and invite friends to play the game we had built.

Background Information for Direct Digital Synthesis

For part of our project, we wanted a continuous looping background music track, so we used Direct Digital Synthesis (DDS) to synthesize this audio. DDS is based on the comparison between a phasor of a complete circle and the overflow of an unsigned “accumulator” variable: as a phasor overflows from 2π to 0, a 32-bit variable overflows from 2^32 - 1 to 0 in the same way. As such, we can reference elements of a lookup table in the same way we would reference the phase of a single period of a particular sound wave. Therefore, if we want to produce a sound at a certain frequency F_out, and we have configured an interrupt to update our accumulator at a frequency F_s, the amount at which we increment this accumulator is directly proportional to F_out and inversely proportional to F_s:

DDS Equation

We have selected a lookup table of 256 elements, so only the 8 most-significant bits of our 32-bit accumulator variable matter. Every time we reference the lookup table, we simply right-shift our accumulator by 24 bits.

Since we are not transmitting anything wirelessly, we do not need to account for or apply any IEEE or likewise standards.