Mbed Star Wars game

Where Role Language used
University of Leeds Individual C++


As part of the second year Embedded System module (ELEC 2645), we were tasked to create a game. I decided, that I want to create a 3D game, to push the limits what the platform can do and to challenge myself by doing something outside of what’s expected.

The platform an NXP FRDM-K64F with a custom made gamepad attached (more here). Further more it has:

  • N5110 LCD screen
  • Analogue Joystick
  • 4 primary buttons (A/B/X/Y)
  • 2 secondary buttons (Start/Stop)
  • 2 horizontal buttons (L/R)
  • Variable resistor

Code and .bin file further down.

Here are the results of the game:


To create a 3D game, I had to build a sizeable engine. Most of the challenges during this project were centred around memory management.

Here are a few things needed for the engine:

  • Implemented bare minimum Matrix library, with most necessary operations for the engine
  • Pinhole projection camera, based on the Computer Vision book by Richard Szeliski (available for free here) and this great summary here
  • Rendering engine, with pixel data for each pixel. The data includes the pixel value and depth, so objects can render on top of each other. Also facilitates rendering the Skybox (drawing at the render limit) and the UI (rendering at the render minimum)
  • Rectangular 3D faces, with black and white texture rendering (including transparent option)
  • Hardware interface wrapper
  • Sound management priority queue to handle multiple sound effects, both continuous and one shot.
  • Life system tracking player health and displaying it on the LEDs
  • Empire object, implementing basic AI agents controlling various enemy ships
  • Game agent, calling sub-parts, and running various modes, the main menu and the pause menu.




All together I’ve created a project that I’m really proud of! Academic results are still pending, but it has received praise from both my peers and academic staff.

Project code is on github

Play the game on your controller: github

Behind the scenes

I like seeing behind the scene things on videos, projects, etc, so here is a snippet of how the video was filmed. It’s a borrowed GoPro Hero session, taped to my desk lamp.