Space Invaders Game based on Embedded Systems using STM32NUCLEO-L476RG

Published:

Task:
Unit 4 is the final step in the module and is an individual mini-project that will run over a period of 8 weeks (including the Easter Holiday). You will be able to apply your enhanced C++ skills to create an embedded systems-based game that, as a minimum requirement, must use the ST Nucleo-L476RG development board, joystick and LCD. However, you may extend the range of peripheral devices you use by adding devices like switches, LEDs, etc., or you might even be more ambitious and use I2C or SPI-based modules such as an accelerometer. Please note that if you choose to use peripheral devices that are not supported in the labs, you will have to purchase them yourself, as there is no budget allocated for the mini-project. Additionally, you will be responsible for coding and porting any required drivers onto the ST development board - lab tutors will have very limited time to provide assistance with this, other than to provide guidance. Furthermore, you can use ‘CoolTerm’ or the built-in serial communications monitor in Mbed Studio as an input/output i.e. a terminal to enable further interaction with your game through a PC/laptop keyboard/monitor.

Apart from the need to utilise the ST development board, joystick, and LCD, the game specification is open and driven by your area of interest and your skill level. In the past, students have created basic Arcade games such as Snake, Asteroids, Breakout, and Copter, which were built on the Pong game engine (example code provided). Some went even further and developed complex 3D games such as dungeon crawlers and a Star Wars-inspired X-Wing missing game, which is still one of the most impressive games submitted in the module.

My Project:
My project aims to recreate the classic Space Invaders arcade game using an embedded systems approach, specifically utilizing the ST Nucleo-L476RG development board. The game is designed to mimic the traditional gameplay of Space Invaders, complete with shooting mechanics, dodging enemy projectiles, and eliminating alien invaders. A key aspect of my project is the incorporation of multiple levels to increase difficulty and engage players with varying enemy formations.

To enhance the user experience, my project employs a joystick for player controls, allowing horizontal movement and shooting in the game. An LCD display acts as the game screen, showcasing the player’s spaceship, the alien invaders, projectiles, and scoring details. The game experience is further enriched with sound effects and background music, adding an auditory dimension to the gameplay. While the game aims to track high scores, it’s important to note that due to the limitations of the ST Nucleo-L476RG board, which lacks permanent memory storage, the high score record will only persist as long as the power remains on.

The motivation for my project is twofold: firstly, to apply and showcase enhanced C++ programming skills in a practical and engaging format, and secondly, to revisit and modernize a nostalgic and classic game. My project not only demonstrates proficiency in using specific hardware like the ST Nucleo-L476RG board, joystick, and LCD display but also highlights an understanding of game design and embedded system development. The end goal is to create a Space Invaders game that is both enjoyable and challenging, offering a blend of classic arcade feel with modern embedded systems technology.

Here’s my recording!

Leave a Comment