Skip to the content
2 layers118 × 100 mmDuelTank, the printed circuit board in 3D

Duel Tanks is a real-time two-player artillery game built completely from scratch on the MSPM0G3507 microcontroller.

Size
118 × 100 mm
Copper layers
2
Thickness
1.6 mm
Parts
72
Nets
64
Pads
215
Tracks, vias
449, 84
Pours
4
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
6 Apr 2026
Updated
25 Apr 2026

Overview

DuelTank is an open-source printed circuit board by SathvikY3533, from the SathvikY3533/DuelTanks repository on GitHub. It is a 2-layer board of 118 × 100 mm with 72 parts on 64 nets, routed with 449 tracks and 84 vias.

It is built around the ULN2003BD. Its parts include 21 resistors, 7 capacitors, 7 diodes, 7 connectors and 4 switches.

Main components

1

README

README.md

Duel Tanks

Two-player real-time tank battle — ECE319H Spring 2026

Check out more of my work at sathvikyechuri.com


Demo

📺 Video coming soon


Screenshots

Splash ScreenTank SelectGameplay
coming sooncoming sooncoming soon

Overview

Duel Tanks is a real-time two-player artillery game built completely from scratch on the MSPM0G3507 microcontroller. Two players face off on separate boards connected by a UART link — shells fired off one screen physically cross over to the opponent's screen, with full parabolic physics preserved across the wire.

Everything — the graphics engine, sprite system, physics engine, UART protocol, sound system, and game state machine — was written from scratch in C++. No game engine, no external libraries.

Placed 3rd in the ECE319H Spring 2026 in-class competition.


How It Works

Each board runs the same firmware with a PLAYER_ID flag determining which side the player starts on. Missiles exit one screen, get encoded into a 5-byte UART packet, and spawn on the opponent's screen with matching velocity — making it feel like a single continuous battlefield split across two displays.

text
Board 1 (left)          Board 2 (right)
┌──────────────┐        ┌──────────────┐
│   🎯   >>>   │──UART──│   >>> 💥     │
│  [Tank]      │        │       [Tank] │
└──────────────┘        └──────────────┘
     PA8 TX ──────────────► PA22 RX
     PA22 RX ◄────────────── PA8 TX
     GND ◄──────────────────► GND

Features

  • Parabolic missile physics — fixed-point arithmetic, gravity simulation, arc trajectory
  • Cross-screen projectiles — missiles exit your screen and appear on the opponent's via UART
  • City background — night skyline with building silhouettes and window lighting
  • Hilly terrain — multi-sine generated terrain profile, tanks ride the hills
  • 3 playable tanks with unique abilities:
    • 🔵 Brawler — Double Shot (fires two missiles spread ±5°)
    • 🟢 Phantom — Speed Boost (2× movement speed for 1.5 sec)
    • 🔴 Artillery — Ricochet (next shot bounces off terrain)
  • Full game flow — splash → language select → rules → tank select → battle ready handshake → countdown → gameplay → end screen
  • 2-minute match timer — compare lives at time's up for winner
  • English / Spanish language support
  • Sound effects — shoot, explosion, incoming warning, victory, defeat, and more

Hardware

ComponentDetails
MCUMSPM0G3507 LaunchPad
DisplayST7735R LCD (160×128, landscape)
Input4 tactile buttons + slide potentiometer
Audio5-bit R2R DAC → MCP34119P amplifier → speaker
SyncBattle Ready GPIO handshake (PA17 / PA31)
CommunicationUART at 115200 baud, board-to-board

Pin Map

SignalPin
LCD SPIPB6, PB7, PB8, PB9, PB15, PA13
Slide pot (ADC)PB18
5-bit DACPB0 – PB4
UART TXPA8 (UART1)
UART RXPA22 (UART2)
Battle Ready OutPA17 (P1) / PA31 (P2)
Battle Ready InPA31 (P1) / PA17 (P2)
Fire buttonPB17
Shield buttonPB12
Left buttonPB16
Right buttonPA27

Software Architecture

text
main5.cpp
└── Game_Update()          ← called every 33ms (30Hz)
    ├── Switch_Tick()      ← edge detection for all 4 buttons
    ├── State machine      ← SPLASH → LANGUAGE → RULES → TANK_SELECT
    │                         → WAITING → COUNTDOWN → GAMEPLAY → END
    ├── Physics engine     ← fixed-point parabolic missile simulation
    ├── Sprite renderer    ← transparent pixel-by-pixel draw, dirty-rect erase
    ├── GameUART           ← 5-byte packets with 0xAA 0x55 sync header
    └── Sound engine       ← SysTick ISR at 11025Hz → R2R DAC output

UART Packet Format

text
[ 0xAA ][ 0x55 ][ TYPE ][ DATA1 ][ DATA2 ]
  sync    sync    what    payload  payload

Controls

InputAction
Left / Right buttonsMove tank
Slide potAim angle (0° – 89°)
Hold FireCharge shot power
Release FireShoot
ShieldUse tank ability
Fire + Left + Right (hold)Force quit match

Building

Open in Code Composer Studio with the ECE319H Lab 9 starter project. Add all .cpp / .h files. Before flashing:

  1. Set #define PLAYER_ID 1 in Game.h for the left board
  2. Set #define PLAYER_ID 2 in Game.h for the right board
  3. Connect boards: PA8→PA22, PA22→PA8, GND→GND

License

Built for ECE319H at UT Austin. All game logic, physics, graphics, and UART protocol written from scratch.

Parts

72
QtyValueFootprintReferences
7300ECE319K:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalR1, R4, R5, R6, R21, R22, R23
50.1uFECE319K:C_Axial_200milC3, C4, C5, C6, C7
51.5kECE319K:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalR8, R9, R10, R11, R19
510kECE319K:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalR12, R13, R14, R15, R20
4M.3MountingHole:MountingHole_3.2mm_M3_Pad_TopBottomH1, H2, H3, H4
312kECE319K:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalR16, R17, R18
21053131105nanofit_1x5:CONN_SD-105313-100_05_MOLJ3, J5
2LOGOimages:arrowG***, G***
11uFECE319K:CP_Radial_Tantal200milC1
120kECE319K:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalR7
13.3VECE319K:Testpoint_1x02_P2.54mmTP1
14.7uFECE319K:CP_Radial_Tantal200milC2
1Conn_01x08Connector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_VerticalJ8
1DACOUTTestPoint:TestPoint_Pad_D2.0mmTP17
1DACOUTECE319K:Testpoint_1x02_P2.54mmJ7
1Divider1TestPoint:TestPoint_Pad_D2.0mmTP10
1Divider2TestPoint:TestPoint_Pad_D2.0mmTP11
1Divider3TestPoint:TestPoint_Pad_D2.0mmTP12
1Divider4TestPoint:TestPoint_Pad_D2.0mmTP13
1Divider5TestPoint:TestPoint_Pad_D2.0mmTP14
1FireECE319K:SW_PUSH_6mmSW2
1Fire_SWTestPoint:TestPoint_Pad_D2.0mmTP5
1GNDECE319K:Testpoint_1x02_P2.54mmJ6
1GREEN_LED1ECE319K:LED_D5.0mmD2
1GREEN_LED2ECE319K:LED_D5.0mmD3
1GREEN_LED3ECE319K:LED_D5.0mmD5
1GREEN_LED4ECE319K:LED_D5.0mmD10
1LOGOLOGOG***
1LOGOimages:shieldG***
1LOGOimages:fireG***
1LP-MSPM0G3507ECE319K:ti_LP_MSPM0G3507U2
1LeftECE319K:SW_PUSH_6mmSW3
1Left_SWTestPoint:TestPoint_Pad_D2.0mmTP2
1MCP34119PECE319K:DIP-8_W7.62mm_LongPadsU3
1PTA2043ECE319K:PTA2043potRV1
1PWR_REDECE319K:LED_D5.0mmD1
1PotECE319K:Testpoint_1x02_P2.54mmJ4
1RightECE319K:SW_PUSH_6mmSW4
1Right_SWTestPoint:TestPoint_Pad_D2.0mmTP4
1ShieldECE319K:SW_PUSH_6mmSW1
1Shield_SWTestPoint:TestPoint_Pad_D2.0mmTP3
1SlidePotTestPoint:TestPoint_Pad_D2.0mmTP16
1SpeakerECE319K:PinHeader_1x02_P2.54mm_VerticalJ2
1TExaSECE319K:PinHeader_1x03_P2.54mm_VerticalJP1
1ULN2003BECE319K:DIP-16_W7.62mmU5
1YellowLED_RXECE319K:LED_D5.0mmD9
1YellowLED_TXECE319K:LED_D5.0mmD8

Similar boards

  • 4 layers179.3 × 72.5 mmStarter, the printed circuit board in 3D

    Starter

    alicedimauro/Tilt

    59 parts1
  • 2 layers114.3 × 88.9 mmCrickHit PCB, the printed circuit board in 3D

    CrickHit PCB

    devanshjoshi08/CrickHit

    Real-time cricket batting game on the TI MSPM0G3507 (ARM Cortex-M0+) with triple-ISR architecture, custom KiCad PCB, 5-bit DAC audio, and 3D-printed enclosure. Built for ECE 319H at UT Austin.

    54 parts1
  • 2 layers132.5 × 83 mmAM96353, the printed circuit board in 3D

    AM96353

    ananth-abbaraju/319H_PCB

    44 parts
  • 2 layers114.3 × 88.9 mmKC47852, the printed circuit board in 3D

    KC47852

    KaitlynWChang/ECE-319H-PCB

    53 parts
  • 2 layers114.3 × 88.9 mmJc224364, the printed circuit board in 3D

    Jc224364

    se1yu/BlockBlast

    Using knowledge from ECE 319H at UT Austin (Intro to Embedded Systems) to build a custom video game console and to program Block Blast from scratch.

    54 parts
  • 2 layers114.3 × 88.9 mmMVM833, the printed circuit board in 3D

    MVM833

    SiddharthaG09/319KFinalProject

    For our final project, we recreated Space Invaders in C, using a custom-designed PCB and an MSPM0G3507 microcontroller.

    46 partsMIT
  • 2 layers140.8 × 66.4 mmM0+rixPCB, the printed circuit board in 3D

    M0+rixPCB

    SuryaUT/TheM0trix_Segfaulted

    ECE319H Game

    50 parts
  • 2 layers50 × 90 mmHackholidays, the printed circuit board in 3D

    Hackholidays

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    72 parts915

Questions

How big is the DuelTank PCB?

It measures 118 × 100 mm and has 2 copper layers, 1.6 mm thick.

What parts does the DuelTank use?

72 parts, built around the ULN2003BD. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the DuelTank KiCad files?

From the SathvikY3533/DuelTanks repository on GitHub, at the commit this page was made from: the board is DuelTank/DuelTank.kicad_pcb and its schematic DuelTank/DuelTank.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the DuelTank design in my own project?

Its repository states no licence, so its author keeps all rights: ask SathvikY3533 before reusing the design.