This project was built on a LPC1768 microcontroller (in C), which displayed the game on a peripheral LCD screen. The controller was running a real-time operating system.
Scroll To the bottom to see a video of the game in action!
Object of the game
This is a top-down zombie survival game, where the player tries to survive as long as possible.
The player uses a joystick to move his or her character displayed on the LCD screen.
Every so often, a zombie, which are programmed to move towards the player, will spawn. The player dies if one of these zombies manage to touch the player
Bombs that the player can pickup are randomly generated around the screen.
The player can detonate these bombs to kill all zombies in the immediate vicinity of the player
The longer the player survives, the faster the zombies spawn, and the faster the zombies become.
The player has one life. Score is based on the number of zombies the player has killed at the end of the game
How it works
The game is built on a real-time-operating system, and uses multiple threads to represent various components of the game. There are four main tasks, which are: the human task, the zombie task, the bomb pickup task, and the bomb detonation task.
Human Task
This task simply keeps track of player position, and reads the joystick information to move and redraw the player in an updated position.
Zombie Task
Each individual zombie is controlled by its own task, which is created as each zombie spawns.
A zombie will spawn in the corner farther from the player based on when a dynamic timer is reached (a timer which decreases as playtime increase, so zombie spawns are more frequent).
Each zombie is programmed to move in the direction of the player at all times.
The longer a zombie is alive, the faster it becomes over time. A zombies starting speed (how fast it is when it spawns) also increases the longer the player is alive.
Bomb Pickup Task
Bombs are represented as purple dos on the screen and will disappear when the player touches one (as long as the players bomb capacity is not full).
Bombs are randomly generatored to appear everywhere on the screen
The number of bombs the player currently has is represented by the LEDs, which are updated immediately upon each pickup and explosion.
Bomb Detonation Task
The player can detonate one of their bombs by pressing the button.
This button fires an interrupt which allows the bomb task to run.
The task animates an explosion centred on player, and will kill all zombies which are within a 50 pixel radius. (The player itself, however, will be unharmed!)
This action will decrement the number of bombs displayed appropriately.