Spring 2014 EE319K (Intro to Embedded Systems) Lab 10; 1st Place Game Design.
Bread Board Hero
developed by Kinan Hernandez and Jacob Murillo.
We replicated a simple version of the game Guitar Hero using two TI Launchpad micro-controllers, a Kentec display, and some simple external components. This ambitious project was completed in about two weeks.
One TI Launchpad handles control input and game-play graphics while the other is dedicated to audio, in a sense acting like a very basic mp3 player. They communicate via UART.
How the controls work:
The control system, or "Guitar", is comprised of 4 push switches (frets) and a slide potentiometer, which mimics strumming a guitar. These components are all glued to a National Instruments myDaq for structural support. To input a note from the controller, the player must hold down the corresponding push button and simultaneously slide the potentiometer up or down.
How gameplay works:
The main launchpad is programmed to guide the player through a song selection menu. When a song is selected, the game engine loads data from memory that tells it what "note" to display on screen and when to display it. The engine continuously refreshes the placement of notes on-screen as the song progresses. Inputting a correct note with the controls adds 20 points to the players score. Missing notes causes the bar on the "Danger Meter" to go down. If the player hits the bottom of the Danger Meter, the game stops and the player loses.
How the game engine (graphics and audio) works:
At the start of the song, a carefully timed transmission is sent to the secondary micro controller to start the music. The signal tells the micro controller which song to play. The audio data is saved on an external SD card in a raw WAV format. This most difficult aspect of the project was overcoming the space limitations of the Lauchpads. Without the SD card, we could only store about 30 seconds of music in the micro-controllers on-board memory.
The micro-controller does some simple mathematical manipulations to convert the WAV data so that it can be played through an external DAC and headphone jack.
It is very important that the video graphics and audio match up. The programming takes this into account and users built in timers to ensure the music lines up to the "notes" on screen. Given a specific tempo (in Beats Per Minute), the graphics engine algorithms can adjust to pull the notes down the screen faster or slower depending on the song selection.
This video shows a demo of:
1) The song "Get Lucky" played though fully. The "danger meter" never drops all the way down.
2) The song "Get Lucky" played without hitting any correct notes. When the danger meter hits the bottom of the red region, the game is over.
3) The song "Through the Fire and Flames" played through fully with the danger meter disabled.
In the middle of this song, there is a programmed "Note Overflow" where the controller plays a pure tone for a few seconds before "First of the Year" begins playing on the micro-controller.
The audio suffers in quality due to limitations of the components. We re-sampled the song at a lower bit-rate before loading it on the SD card and programmed the secondary micro-controller to compress the amplitude to be playable though our 6- bit DAC.
Song credit to:
Rakohus - "Daft Punk - Get Lucky (8-Bit NES Version)" & "Taylor Swift - Shake It Off (8-Bit NES Version)"
http://rakoh.us
NESsongsrus - "DragonForce - Through the Fire and Flames (8-Bit Remix)"
http://www.soundclick.com/nessongsrus
Skrillex - "First Of The Year (Equinox)"
http://alientalk.skrillex.com/
© WMG 2012
"Copyright Disclaimer Under Section 107 of the Copyright Act 1976, allowance is made for "fair use" for purposes such as criticism, comment, news reporting, teaching, scholarship, and research. Fair use is a use permitted by copyright statute that might otherwise be infringing. Non-profit, educational or personal use tips the balance in favor of fair use."