ECE 4180: Dodging Asteroids

Overview

This is a a space game where the objective is to dodge asteroids. The space craft is controlled using an IMU unit's accelerometer. When the game loads, asteroids of random size, position, and velocity are generated and start veering towards the space craft. Every asteroid that the space craft successfully avoids is added to the score. The game ends when the space craft collides with an asteroid, and the final splash screen gives indicates the final score.

/media/uploads/dylanslack/asteroid-game.png

Demo

This demo shows the splash screen and then a brief game of dodging asteroids. From the demo, you can see that tilting the breadboard navigates the space craft and when it collides with an asteroid, the game ends with the indicated score shown.

Configuration

This game utilizes various components: an IMU unit, SD card reader, LCD screen, and analog speaker.

/media/uploads/dylanslack/img_1212.jpg

Components

SD Card Reader

SD Card ReaderMBED
VCCVCC
GNDGND
CD--
DOp6
SCKp7
DIp5
CSp8

IMU Breakout

IMUMBED
VCCVCC
GNDGND
SDAp9
SCLp10

uLCD Screen

SD Card ReaderMBED
5V+Vu
GNDGND
TXp27
RXp28
RESp30
DIp5
CSp8

Analog Speaker

The analog speaker requires a driver and uses MBED's p18.

/media/uploads/dylanslack/asteroid-speaker.png

Program

Import programDodgingAsteroids

Dodging asteroids game.


Please log in to post comments.