12
Beat Gunner: A Rhythm-Based Shooting Game by TungShen Chew, Stephanie Cheng and An Li 1 6.111 Final Project Presentation

Beat Gunner - MITweb.mit.edu/.../tshen2_Project_Design_Presentation.pdf · 2009-11-30 · audio source (iPod, CD player, etc.). The game detects music beats in real time and displays

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Beat Gunner - MITweb.mit.edu/.../tshen2_Project_Design_Presentation.pdf · 2009-11-30 · audio source (iPod, CD player, etc.). The game detects music beats in real time and displays

Beat Gunner: A Rhythm-Based Shooting Game

by TungShen Chew, Stephanie Cheng and An Li

16.111 Final Project Presentation

Page 2: Beat Gunner - MITweb.mit.edu/.../tshen2_Project_Design_Presentation.pdf · 2009-11-30 · audio source (iPod, CD player, etc.). The game detects music beats in real time and displays

Overview

The player fires at two moving targets on the screen using a ‘light gun’.

The background music is supplied by an analog audio source (iPod, CD player, etc.).

The game detects music beats in real time and displays them as scrolling lines on top of the screen.

You earn more points by scoring hits in time with the beat of the music!

6.111 Final Project Presentation 2

Page 3: Beat Gunner - MITweb.mit.edu/.../tshen2_Project_Design_Presentation.pdf · 2009-11-30 · audio source (iPod, CD player, etc.). The game detects music beats in real time and displays

Mockup of Game Screen

6.111 Final Project Presentation 3

600

800

800x600 pixel SVGA screen

Score 00051

Scrolling beat indicator bars

Targets

Score counter

Page 4: Beat Gunner - MITweb.mit.edu/.../tshen2_Project_Design_Presentation.pdf · 2009-11-30 · audio source (iPod, CD player, etc.). The game detects music beats in real time and displays

Game Mechanics: Hit Detection

When the player pulls the trigger:1. The game sets the whole screen to black

2. The observed light level of the gun is recorded

3. A white box is drawn at the location of a target

4. The game checks if the observed light level has increased

5. Steps 3 and 4 are repeated for each target

6.111 Final Project Presentation 4

Trigger hit! 1. Set to black 3. Draw white box Repeat per target

Page 5: Beat Gunner - MITweb.mit.edu/.../tshen2_Project_Design_Presentation.pdf · 2009-11-30 · audio source (iPod, CD player, etc.). The game detects music beats in real time and displays

Game Mechanics: Beat Detection

Proposed beat detection algorithm:1. Low-Pass Filter at 100Hz

2. Compare signal to a threshold at 90% of the highest observed peak within a moving window

3. If signal is higher than this threshold, set ‘beat detect’ to TRUE for 20ms

6.111 Final Project Presentation 5

Original Signal After Low Pass Filter Threshold and carry over

Page 6: Beat Gunner - MITweb.mit.edu/.../tshen2_Project_Design_Presentation.pdf · 2009-11-30 · audio source (iPod, CD player, etc.). The game detects music beats in real time and displays

Game Mechanics: Scoring

Player receives a much higher score for hitting a target during a beat.

If player does not hit the target during the beat, the score received depends on proximity to the nearest beat.

6.111 Final Project Presentation 6

Score depends on proximity to ‘now line’

Page 7: Beat Gunner - MITweb.mit.edu/.../tshen2_Project_Design_Presentation.pdf · 2009-11-30 · audio source (iPod, CD player, etc.). The game detects music beats in real time and displays

Block Diagram

6.111 Final Project Presentation 7

Page 8: Beat Gunner - MITweb.mit.edu/.../tshen2_Project_Design_Presentation.pdf · 2009-11-30 · audio source (iPod, CD player, etc.). The game detects music beats in real time and displays

Module Description: Music

Delays music playback by 3 seconds to display 3 seconds of incoming beats.

Stores 3 seconds of music at 12-bit, 24kHz.

Down-samples music to 200Hz sample rate before performing beat detection.

Stores 4 seconds of beat detection data in Shift Register module.

6.111 Final Project Presentation 8

3 seconds of beat data to allow player to anticipate beats 1 second post-beat data

Page 9: Beat Gunner - MITweb.mit.edu/.../tshen2_Project_Design_Presentation.pdf · 2009-11-30 · audio source (iPod, CD player, etc.). The game detects music beats in real time and displays

Module Description: Monster Logic

Keeps track of XY-position of each target

Calculates score based on beat data in Shift Register

Monsters change speed & direction on the beat

6.111 Final Project Presentation 9

Page 10: Beat Gunner - MITweb.mit.edu/.../tshen2_Project_Design_Presentation.pdf · 2009-11-30 · audio source (iPod, CD player, etc.). The game detects music beats in real time and displays

Module Description: Video

Displays SVGA video: 800x600 pixels, 60Hz

Performs hit detection and notifies Monster Logic module of hits and misses

Draws monster, beat lines and score counter

6.111 Final Project Presentation 10

Score 00051

Page 11: Beat Gunner - MITweb.mit.edu/.../tshen2_Project_Design_Presentation.pdf · 2009-11-30 · audio source (iPod, CD player, etc.). The game detects music beats in real time and displays

Module Description: Gun

Contains phototransistor inside the barrel to detect light levels of any object it is pointed at

Contains solenoid to simulate recoil

Long, reflective barrel allows phototransistor to be extremely directional

6.111 Final Project Presentation 11

Page 12: Beat Gunner - MITweb.mit.edu/.../tshen2_Project_Design_Presentation.pdf · 2009-11-30 · audio source (iPod, CD player, etc.). The game detects music beats in real time and displays

Timeline Week of Nov 16

◦ Beat Detection functional◦ Shift Register completed◦ Monster physics completed◦ Video display functional

Week of Nov 23◦ Playback delay completed◦ Gun basic functionality completed◦ Monster beat behavior completed◦ System ready for integration◦ Hit detection functional

Week of Nov 30◦ Score calculation and display completed◦ Gun additional features completed◦ Upgraded sprites

Week of Dec 7◦ Report Writeup

6.111 Final Project Presentation 12