Dropping Block Game

This is a Dr. Mario and Tetris style video game that can be created on the MBED. There are special blocks on the display that the player must eliminate. To eliminate a row of blocks, the player must place an entire row of the same color. The player wins when all of the special tiles are eliminated, and loses if the falling blocks reach the top of the board.

This project requires a Joystick for user input, a uLCD-144-G2 for displaying the game, and a MOSFET driver to power a motor for haptic feedback.

Joystick instructions: /media/uploads/jdixon37/300xnxtacbb.jpg.pagespeed.ic.uslqqjxplj.jpg

The 5-way joystick can be connected to the digital pins of the MBED. Each direction on the joystick requires one digital-in pin on the MBED. Here is a wiring table used for the joystick:

MbedJoystick
P14U
p15D
p16L
p17R
p19C
VOUT+
GND-

More information on the 5-way Joystick can be found here: https://developer.mbed.org/users/4180_1/notebook/using-a-navigation-switch-digital-joystick/

uLCD instructions: /media/uploads/jdixon37/mosfet.jpg

The uLCD requires a serial connection to control the display. It also requires a 5V supply [VU] (not the 3.3V). Here is the wiring table for the uLCD:

uLCDMbed
VU5V
GNDGND
p9RX
p10TX
p11Reset

MOSFET instructions: /media/uploads/jdixon37/lcd.png

The mosfet requires a PwmOut pin. Here is the wiring table:

MbedMOSFET driver
P21C
GNDsystem -
MOSFET drivermotor
device++
device--
external powerMbed
+VU
-GND

A demo of this game in action:

Here is the code:

Import program4180_LAB4

Falling block game


Please log in to post comments.