Archery Game

Embedded game built on the AK Embedded Base Kit (STM32L151) — a hands-on project to learn event-driven programming through game design.

Archery Game Menu

Overview

   
Platform AK Embedded Base Kit — STM32L151CBT6
Display 1.54” OLED LCD
Input 3 push buttons
Audio 1 buzzer
Flash 128 KB (8 KB bootloader + 116 KB app)
RAM 16 KB
Source github.com/QuocBuu/archery_game

Hardware

AK Embedded Base Kit v3
AK Embedded Base Kit — STM32L151 v3.0


Board Top + Bottom
Board view — Top & Bottom

Gameplay

Objective: Control the Archery (bow) to shoot Arrows and destroy incoming Meteoroids before they hit the Border.

Button Action
[Up] Move archery up
[Down] Move archery down
[Mode] Shoot arrow

Scoring: +10 points per Meteoroid destroyed. Speed increases every 200 points.

Game objects
Gameplay screen and objects


Game Over screen
Game Over screen — rating from the Mafia Dolphin

Architecture

The game is built on an event-driven kernel (AK Framework) using Tasks, Signals, Timers, and State-machines. UML is used to design each game object's behavior before implementation.

Game sequence logic
Basic game sequence logic


Archery game programming view
Programming view


What I Learned

  • Designing game objects with UML (sequence diagrams, state machines)
  • Event-driven programming on a resource-constrained MCU (16 KB RAM)
  • Bitmap rendering on an OLED over I2C
  • EEPROM storage for persistent scores and settings
  • Bootloader + application flash partition layout