Misson Control Game

Overview

For my project, I create an mbed operating mission control game using a uLCD-144 board, pushbuttons, speaker connected with a MOSFET, and SD card reader. The program begins with a buzzer sound to indicate the game start. The player controls the figher jet with 2 pushbuttons that moves the jet left or right. Another pushbutton is used to fire missiles at incoming enemy missiles. The last pushbutton is used to pause the game. If the enemy missiles make contact with the jet, it will destroy the jet. The player begins with 3 lives and a score is kept depending on how many enemy missiles are destroyed. The player will lose once they run out of lives OR if the enemy missiles destroy all 4 of the buildings below the fighter jet. If the player is able to take out 10 enemy missiles, they advance to the next round and the enemy missiles descend faster. The sounds in the game are read through the SD card and played through the speakers. On my breadboard, the pushbuttons are ordered vertically where the bottom most or 4th pushbutton moves the jet left. The 3rd button fires missiles. The 2nd button moves the ship right. The 1st button pauses the game.

Here is a picture midway of the game (3 buildings have been destroyed by enemy missiles): /media/uploads/ajindia6/2015-10-20_13.04.06.jpg

Here is a video on the game:

Components

Pinouts

uLCD

/media/uploads/ajindia6/screen_shot_2015-10-20_at_2.44.29_pm.png

SD card file system

/media/uploads/ajindia6/screen_shot_2015-10-20_at_2.44.44_pm.png

Speaker

Pin 18 to Base of MOSFET /media/uploads/ajindia6/screen_shot_2015-10-20_at_2.47.34_pm.png

Pushbuttons

  • Move Left pushbutton => p23 in Mbed
  • Fire Missile pushbutton => p22 in Mbed
  • Move Right pushbutton => p21 in Mbed
  • Pause pushbutton => p24 in Mbed

Program

Import programMissile_Control_Game

Missile Control Game with uLCD


Please log in to post comments.