Home Store Project Ideas Project Guide Ask An Expert Blog Careers Teachers Parents Students

Playing Along with Video Games: Investigating the Role of Procedural Music

Difficulty
Time Required Long (2-4 weeks)
Prerequisites None
Material Availability Readily available
Cost Low ($20 - $50)
Safety No issues

Abstract

Have you ever wondered about the various types of music in a video game you've played? You may not have paid much attention to the music, but its job was to enhance your gaming experience. In fact, the wrong kind of music can detract from the atmosphere of the game. Can you imagine the music in Mario KartTM playing in Street Fighter®? In a game, music can indicate many different things, such as a special or new event, shift of mood, or the arrival of a character. This kind of music is called procedural music, and it changes according to what happens in the game. In this video and computer game, you will design a game that uses procedural music to enhance the player's gaming experience.

Objective

Use music to indicate a change of event, mood, or character presence in a video game.

Credits

Michelle Maranowski, PhD, Science Buddies

  • Mario Kart is a registered trademark of Nintendo.
  • Street Fighter is a registered trademark of Capcom U.S.A., Inc.
  • Pac-Man is a registered trademark of Namco Bandai Games Inc.

Cite This Page

MLA Style

Science Buddies Staff. "Playing Along with Video Games: Investigating the Role of Procedural Music" Science Buddies. Science Buddies, 24 Oct. 2014. Web. 22 Dec. 2014 <http://www.sciencebuddies.org/science-fair-projects/project_ideas/Games_p030.shtml>

APA Style

Science Buddies Staff. (2014, October 24). Playing Along with Video Games: Investigating the Role of Procedural Music. Retrieved December 22, 2014 from http://www.sciencebuddies.org/science-fair-projects/project_ideas/Games_p030.shtml

Share your story with Science Buddies!

I did this project I Did This Project! Please log in and let us know how things went.


Last edit date: 2014-10-24

Introduction

Music can make us feel a variety of emotions. For example, when you hear scary music in a movie, you know that something frightening may happen. As the tempo of the scary music increases, you start to feel more and more excited until finally something happens. A similar musical process can be used in video games, where music creates atmosphere. In addition, music can signal to the player a change in event or experience level, or the arrival of a new character. This type of music is called procedural music or procedural audio. Procedural music or audio occurs when certain events within the game cause the music to evolve in real time in some form. Unlike the synthesized music and sound effects in early video games like the original Pac-ManTM and Mario Bros.TM from the 1980s, the procedural music in games of the 21st century can switch from one tune to another, the tempo can vary, or different tunes can be layered on top of each other. This gives the player a dynamic experience, where the music will always fit the gaming atmosphere. An example of procedural music occurs in Super Mario Galaxy 2TM, when Mario grabs the grand star and special music signals this event, giving the player a sense of accomplishment.

Procedural music in video games is created algorithmically. This means that there are rules and logic that dictate how music is generated. The procedural music in video games can be divided into two categories: interactive and adaptive. Interactive music refers to music events that are directly triggered by the player or the input device, like footsteps when the player moves or shooting sounds when the player fires a gun. The player has control of the timing, although the game's program or engine controls how the music is played back. Adaptive music refers to musical events that are affected indirectly by the player. Adaptive music is cued or controlled by the game's engine and is usually not immediately repeatable.

Now that we know the different ways music can be triggered in a video game, the next question is how the programming in the game (the game's engine or brains) actually creates the music. Procedural music can be generated using either transformational algorithms or generative algorithms. Transformational algorithms don't affect the data size (the amount of storage space the music takes in memory), but they do affect the structure of the music. The pitch of certain notes can be varied, and instrumental parts can be added or dropped within a phrase of the overall song. (A musical phrase is a group of lines of music that has its own musical theme or logic.) Generative algorithms increase the data size because the music is created rather than just modified during game play.

In this video and computer games science project, you will create a video game with procedural music. How will you do this? The first step will be to learn GameMaker Language (or GML). With GML, you can write your own conditional statements and incorporate them into an already existing game or make a brand new game. In both cases, your goal is to use procedural music to indicate changes in your game and to enhance the player's experience.

Terms and Concepts

  • Tempo
  • Procedural music
  • Procedural audio
  • Algorithm
  • Interactive music
  • Adaptive music
  • Transformational algorithms
  • Generative algorithms
  • Musical phrase
  • Conditional statements
  • Flow chart

Questions

  • In a review of video games that you have played, how do the games use music or some type of audio to add to the atmosphere?
  • Can you find some examples of procedural music or audio in the video games that you play?
  • What is the difference between interactive and adaptive music?
  • How do transformative algorithms differ from generative algorithms?

Bibliography

The following website lists several interesting articles on procedural audio:

This YouTube video demonstrates procedural audio:

News Feed on This Topic

 
, ,
Reading level:
Note: A computerized matching algorithm suggests the above articles. It's not as smart as you are, and it may occasionally give humorous, ridiculous, or even annoying results! Learn more about the News Feed

Materials and Equipment

  • Computer with Internet connection
  • GameMaker 8.1 for PC or GameMaker for Mac. You can download the PC version from YoYo GameMaker 8.1 and the Mac version from YoYo GameMaker for Mac. Please note that at the time this project was written, GameMaker worked better on PCs than on Macs.
  • Optional: Audacity or other sound and audio recording software; you can download Audacity free of charge from audacity.sourceforge.net/download/

Share your story with Science Buddies!

I did this project I Did This Project! Please log in and let us know how things went.

Experimental Procedure

Note: This engineering project is best described by the engineering design process, as opposed to the scientific method. You might want to ask your teacher whether it's acceptable to follow the engineering design process for your project before you begin. You can learn more about the engineering design process in the Science Buddies Engineering Design Process Guide.

Planning Your Game in GameMaker

  1. In this video and computer games science project, you will create a simple game that uses procedural music to indicate changes happening during the game and to enhance the player's experience.
  2. First, purchase and download the GameMaker program from YoYo GameMaker for Mac or YoYo GameMaker for PC. Make sure that your computer's operating system fits the requirements for running GameMaker listed on the download page. You should choose to run GameMaker in the advanced mode.
  3. Before you start programming your game, work through all the beginner tutorials listed in the GameMaker User Guide. These tutorials, each only about 30 minutes long, will walk you through the steps of making a video game with GameMaker. Even if you've never programmed before, you will be ready to tackle this project after working through the tutorials.
  4. Once you have completed the tutorials and practiced with GameMaker, and when you feel comfortable with the programming environment, it is time to learn GameMaker Language (or GML).
    1. In the GameMaker wiki, navigate to the Tutorials section and click on the GameMaker Advanced link.
    2. Click the three bullet-pointed links in the GameMaker Language section.
    3. There are several links to information on GML under each link. GML for non-programmers is the introductory document to GML and gives a good overview of how to get started programming. The GML Functions Overview page organizes the GML functions according to type and is important to read through and digest. This page lists several help documents on sound and music.
  5. As noted at the beginning of this procedure, this project follows the Engineering Design Process. Remember, if you run into trouble making your game, or if you feel you want more practice before starting this project, the GameMaker User Guide contains links to many other tutorials as well as GameMaker help documents, and a forum you can turn to with specific questions.
  6. Define the problem. In this case, you will create a fun video game that uses procedural music to enhance the gaming experience for the player. Refer to the Science Buddies Define the Problem page to help you set the boundaries for the project.
  7. Do background research. Read the references in the bibliography to develop an understanding of procedural music. You should also study the YoYo Games tutorial What Is a Good Game? to start thinking about the goals of building a successful video game.
  8. Develop the project requirements. The project requirements are the characteristics that your video game must have to be a successful video game. Refer to the Science Buddies Specify Requirements section for tips on how to formulate your game's design requirements. Here are some ideas to consider when formulating the requirements:
    1. What kind of game do you want to play? If you find the idea of the game interesting, chances are other people will, too. Do you want the game to be a maze or a game where the player picks things up?
    2. How much time you can spend on writing the game. If you only have two weeks, you need to design a game that can be written in a week to leave time for testing it. Simple games can be fun to play, too.
    3. What kinds of sprites (that is, images or animation) will you use? Where will you get them?
    4. Where in the game should the music change? Will the music change as an indication of a reward, when the player does something right? For example, will there be a trumpet flourish when a goal is reached? Will the pace of the music change as the player advances through the game, getting louder and faster? Will the music change depending on the position of the object?
    5. How many rooms will your game have? Will the music change depending on the room that the player is in?
    6. What kinds of music will you use and where will you get the music? Do you plan to use the music from the GameMaker tutorials or will you put together your own music or sounds? If you plan to make your own sounds, you can use audio editing and recording software like Audacity. Download Audacity for free from the Internet.
    7. How long should the game be and how will it end?

Building Your Game in GameMaker

  1. Create and analyze solutions. Keeping your project requirements in mind, think about different ways that you could build your game. Take a look at the Science Buddies document Create Alternative Solutions to guide your efforts. Once you have developed a few solutions, analyze the solutions by making rough sketches and flow charts for each one. Refer to the Science Buddies Choose the Best Solution document to help you pick a working solution.
  2. Build and test a sample video game. Once you have created a set of requirements and a possible solution, it is time to open GameMaker and start working on building a sample video game. Build a sprite and an object and have them operate in a simple version of your game. Remember to review your requirements so that you keep yourself focused on the task. Review the Science Buddies Prototyping document.
  3. Program your video game. Keep testing the game as you work. When you have fulfilled a requirement or task, run the game and test it out.
  4. Break the programming for the game up into smaller tasks so that the project is not overwhelming.
    1. Test the game along the way so that you can fix small issues as they come up. This will prevent your having a long set of events at the end that don't work.
    2. Once you have finished your game, check to see that all of the project requirements are fulfilled.
  5. Test and redesign. Review the Science Buddies Test and Redesign document to help organize your work. Test your game out on your family, your friends, and yourself. Take notes on what your players enjoyed and didn't enjoy about the game. Use the feedback to improve your game.

The Final Product: Presenting Your Game

  1. When presenting your game at your science fair, try to bring in a computer. If you are not able to do so, take screenshots of your work, print them out, and mount them to a poster board. If you need help taking screenshots, ask a teacher or someone else familiar with the computer for help.
  2. You should include the following items in your presentation:
    1. A list of your project requirements that guided your building of the video game.
    2. The rough sketches or flow chart that describes how the game works.
    3. An explanation of what you learned from your research and from creating the video game and its procedural music.
  3. If you would like to publish your game for a wider audience to play, the Tips and Resources for Making Video and Computer Games page lists several places to do that.

Share your story with Science Buddies!

I did this project I Did This Project! Please log in and let us know how things went.


Variations

  • Build your game using a different software package, such as Scratch. Scratch is a free, easy-to-use programming language from MIT that you can use to make all sorts of animated stories, art, music, and even interactive games. Installing Scratch is simple. Download the software from scratch.mit.edu/. You can also refer to Science Buddies' Scratch User Guide to learn more.
  • Is procedural music really necessary? Test a game sound-free and a full version with music on a group of volunteers. Measure the players' satisfaction and interest in playing each game. Is there a difference? Because you will be testing on a group of volunteers, make sure to get permission from their parents or guardians if they are minors.

    Working with Human Test Subjects

    There are special considerations when designing an experiment involving human subjects. Fairs affiliated with Intel International Science and Engineering Fair (ISEF) often require an Informed Consent Form (permission sheet) for every participant who is questioned. Consult the rules and regulations of the science fair that you are entering, prior to performing experiments or surveys. Please refer to the Science Buddies documents Projects Involving Human Subjects and Scientific Review Committee for additional important requirements. If you are working with minors, you must get advance permission from the children's parents or guardians (and teachers if you are performing the test while they are in school) to make sure that it is all right for the children to participate in the science fair project. Here are suggested guidelines for obtaining permission for working with minors:

    1. Write a clear description of your science fair project, what you are studying, and what you hope to learn. Include how the child will be tested. Include a paragraph where you get a parent's or guardian's and/or teacher's signature.
    2. Print out as many copies as you need for each child you will be surveying.
    3. Pass out the permission sheet to the children or to the teachers of the children to give to the parents. You must have permission for all the children in order to be able to use them as test subjects.

Share your story with Science Buddies!

I did this project I Did This Project! Please log in and let us know how things went.

Ask an Expert

The Ask an Expert Forum is intended to be a place where students can go to find answers to science questions that they have been unable to find using other resources. If you have specific questions about your science fair project or science fair, our team of volunteer scientists can help. Our Experts won't do the work for you, but they will make suggestions, offer guidance, and help you troubleshoot.

Ask an Expert

Related Links

If you like this project, you might enjoy exploring these related careers:

artist drawing at computer

Multimedia Artist or Animator

If you've ever watched a cartoon, played a video game, or seen an animated movie, you've seen the work of multimedia artists and animators. People in these careers use computers to create the series of pictures that form the animated images or special effects seen in movies, television programs, and computer games. Read more
NASA flight software engineer

Computer Software Engineer

Are you interested in developing cool video game software for computers? Would you like to learn how to make software run faster and more reliably on different kinds of computers and operating systems? Do you like to apply your computer science skills to solve problems? If so, then you might be interested in the career of a computer software engineer. Read more
Computer programmer typing on a keyboard

Computer Programmer

Computers are essential tools in the modern world, handling everything from traffic control, car welding, movie animation, shipping, aircraft design, and social networking to book publishing, business management, music mixing, health care, agriculture, and online shopping. Computer programmers are the people who write the instructions that tell computers what to do. Read more

News Feed on This Topic

 
, ,
Reading level:
Note: A computerized matching algorithm suggests the above articles. It's not as smart as you are, and it may occasionally give humorous, ridiculous, or even annoying results! Learn more about the News Feed

Looking for more science fun?

Try one of our science activities for quick, anytime science explorations. The perfect thing to liven up a rainy day, school vacation, or moment of boredom.

Find an Activity