Knights on a Board

An SDL3 framebuffer simulation of the Numberphile \u201cRed & Black Knights\u201d puzzle

Role

Designer & Developer

Platform

SDL3 / Native

Timeline

Aug 2026

Tools

C/C++ · Make

Overview

Visualizing a knight-movement puzzle in real time

After watching Numberphile's video on the "Red & Black Knights" problem, I built a native SDL3 framebuffer demo to watch the pattern emerge directly rather than just reason about it on paper.

The program renders a large canvas where multiple colored knight-like agents move according to evolving directional rules, redrawing the framebuffer every step. It's a small, focused systems-graphics project: no game engine, just a raw pixel buffer, SDL3, and a Makefile.

Approach

A raw framebuffer, driven by simple rules

Each agent on the board moves and changes direction based on conditions inspired by the original puzzle, and the resulting pattern is written out frame by frame.

Canvas init → agent movement rules → framebuffer redraw → image export to Output/

Building directly against SDL3 (rather than a higher-level framework) kept the project close to the metal — useful for understanding how pixel buffers, textures, and render loops fit together in a minimal native application.

SDL3

Rendering engine

C / C++

Implementation language

Multi-agent

Colored knight simulation

Numberphile

Mathematical inspiration

Timeline

Aug 2026

Role

Designer & Developer

Platform

Native desktop (SDL3 framebuffer)

Tools

SDL3, pkg-config, Make

Inspiration

Numberphile — "Red & Black Knights"