<< Chapter < Page Chapter >> Page >

Motivation

Video games are a common pastime for many people. For example, Bioshock Infinite, a relatively popular game, has sold over 4 million copies to date. However, one problem which many video games suffer from is a lack of replay value. After the player has beaten the game, there is little point in replaying it because any twists are already known, and any puzzles have already been solved. One way to avoid this stagnation is by randomizing some aspects of the game. This way, the game will be different each time it is played and will retain playability value much longer.

The goal of our project was to build a framework which would allow the user to load in any song file and have it generate events to alter gameplay. The game we chose to affect was Tetris. An overview of tetris can be found here .

Implementation

Tetris was chosen for a couple of reasons:

  1. It is a relatively simple game to implement. This allowed for more time to be spent on the signal analysis section of the program, and less on the game implementation.
  2. Despite its simplicity, Tetris has a surprising number of variables which can be altered to affect game play. This gave some freedom in how to implement the events generated by the song.

We chose to affect the game in three primary ways. The first of these is the fall speed of the pieces, which was correlated with the volume of the sound file. This makes it so that louder sections of the song cause the pieces to fall faster. The second aspect we chose to affect was which piece the player would get next, which is correlated with the dominant frequency of the music at that particular time. Finally, we added a visualizer to the game, which pulses any time a strong beat occurs in the music.

These variables were chosen because they are clearly visible to the player of the game, making it simple to verify that the signal analysis is working correctly.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Tetris sound: using music to affect gameplay. OpenStax CNX. Dec 20, 2013 Download for free at http://cnx.org/content/col11609/1.2
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Tetris sound: using music to affect gameplay' conversation and receive update notifications?

Ask