Projects

Playard

An open-source retro game console built on the ESP32 microcontroller. Games are authored in XML — sprites, levels, collision rules, and layout are all declarative. A built-in web designer lets you create game graphics in the browser and push them to the physical device over Wi-Fi. 16 stars on GitHub.

View source on GitHubC++, ESP32, MIT

How It Works

XML game engine — Game screens are defined as XML documents. Layouts contain components — points, rectangles, circles, triangles, and text elements — each with position, visibility, and fill attributes. The built-in XML parser loads these at runtime and the GFX engine renders them to the OLED display.

Component system — Everything on screen is a component inside a layout. Layouts group components for relative positioning and collective movement. Components are accessed by ID from C++ game code, making the graphics declarative while game logic stays imperative.

Game lifecycle — Every game inherits from a base Game class and implements four hooks: onCreate, onStart, onUpdate, onExit. Multiple games live in memory simultaneously, selectable from a main menu.

IoT connectivity — The ESP32's Wi-Fi module enables over-the-air game data, eliminating memory constraints. Game assets can be fetched from the network instead of being stored entirely on-device.

XML Components

LayoutContainer for grouping and relative positioning of child components
PointSingle pixel — the simplest drawable element
RectanglePositioned rectangle with width, height, and border-radius
CircleCircle with configurable radius and fill mode
TriangleThree-vertex polygon for arrows, indicators, and shapes
TextDynamic text display with runtime-updatable value

Hardware & Libraries

ESP32Microcontroller with Wi-Fi, dual-core, 520KB SRAM
SSD1306 OLED128x64 display driven via Adafruit SSD1306 library
Adafruit GFXGraphics primitives — drawing, text, bitmaps
pugixmlLightweight XML parser for game definition loading
7 buttonsDirectional pad + 3 action buttons with built-in input module