Snake
Overview
We made the classic game of Snake for the mbed. It displays to a monitor using a uVGA II board from 4D systems. The player controls the snake using a Analog Thumb Joystick on a breakout board made by Sparkfun. The game starts off on a splash screen. The player presses the joystick in any direction to start the game. To control the snake the player presses the joystick in the direction he/she wants the snake to go in. When the game is over the player can press the joystick to return to the splash screen.
Components
Circuit
uVGA II pin | mbed pin |
---|---|
tx | p28 |
rx | p27 |
reset | p23 |
5V | 5V |
GND | GND |
Joystick pin | mbed pin |
---|---|
horz | p18 |
vert | p19 |
pb | p17 |
3.3V | 3.3V |
GND | GND |
Problems encountered
- Finding the correct uVGA library
- Finding/creating a connector for the uVGA controller
- Getting the correct game logic for snake
Future Work
- Push button to pause the game
- Multiple/select-able game speed
- High scores table (potentially interfacing with MicroSD or USB storage device)
- Add sound effects
Program
Import programsnake
The classic game of snake. Control using a joystick and displayed on a VGA screen
Please log in to post comments.