Keil Board Space Invaders Game
I programmed a space invaders game in C, using a Keil Board MCU.
The game used three peripherals. A potentiometer to move the character laterally across the screen, a button to shoot bullets, and an IMU that would fire a special attack when shook.
​
The game was implemented with three threads running simultaneously in a main function. The first thread initialized the appropriate pins and the inputs of the peripherals. The seconed thread initialized the bitmap size and colour. The second thread also spawned bullets and enemy sprites if they were alive according to the third thread. The third thread was where most of the game logic was coded. Bullets were initialized, limited to seven per screen and setup with a specific fire rate. Enemies were also initialized and set to a random spawn on the screen. A video of the game and a version of the code can be seen on the right.