Tron 1982: Battle Tanks

A custom C++ game engine, built from scratch — then used to ship a game.

C++ CMake SDL2 School Project
💻 GitHub

The Assignment

The brief for Programming 4 was to take a bare framework called Minigin and turn it into a real, component-based game engine — then prove it works by shipping a game with it. I was given the Tank Battle level from the 1982 Tron arcade game. Three game modes, three levels, AI enemies, full controller support.

The point wasn't the game. The game was just evidence that the engine worked.

What I built

Modeled after systems in Robert Nystrom's Game Programming Patterns. Beyond just meeting the course requirements,this project was an exercise in understanding engine architecture deeply—figuring out exactly when to use a pattern and where it breaks down.

The Patterns
  • Component: Flat GameObject composition — no deep inheritance, no fragile base classes. Adding behavior means attaching a component, not rewriting a hierarchy.
  • Observer: UI and achievement systems are fully decoupled from game logic. The game doesn't know the scoreboard exists.
  • Command: Input is abstracted into command objects — remapping keyboard to controller or replaying inputs for testing is trivial.
  • Service Locator: Sound and logging services are globally accessible without tight coupling. Swap the audio backend and nothing else changes.
  • Custom allocators Using an object pool for tank bullets and particles
The Engine
  • Component-based GameObject system
  • Resource manager for texture and font loading
  • Thread-safe sound and logging
  • Fixed and variable timestep game loop
  • State machine AI for enemy tanks and recognizers

The Game

Three recreated maze levels from the 1982 arcade original, with proper tile-based collision and movement. Three modes:

  • Single Player — score attack against AI waves
  • Co-op — dual controller, two players vs enemies
  • PvP — tank vs tank, settle it properly
Tron Main Menu

What I took away

Before this project I was writing engines the way most people start — deep inheritance trees, monolithic game objects, logic tangled into everything. Moving to a flat component structure was genuinely uncomfortable at first. It felt like giving up control.

By the end, having multiple projectiles and AI agents running without the frame tanking made it obvious why data-oriented thinking matters. The engine isn't special — it's a student project — but understanding why these patterns exist is something I still use.

Moving forward, I am expanding this architecture into a 3D framework by integrating a custom Vulkan / DirectX 12 backend alongside a dedicated editor environment.