
Sprig console
hackclub/sprig
🍃 Learn to code by making games in a JavaScript web-based game editor.

A custom isometric game engine built from scratch in C++ for PocketGate — a handheld gaming console powered by the STM32H743 microcontroller.
Sprig Console PCB is an open-source printed circuit board by AntonSplavnik, from the AntonSplavnik/pocketgate-engine repository on GitHub. It is a 2-layer board of 139.7 × 64.8 mm with 36 parts on 43 nets, routed with 254 tracks and 19 vias.
It is built around the MAX98357AETE+T. Its parts include 9 switches, 4 resistors, 3 ICs, 3 diodes and 2 capacitors. It belongs with the RP2040 boards of this library.
A custom isometric game engine built from scratch in C++ for PocketGate — a handheld gaming console powered by the STM32H743 microcontroller.
PocketGate is an open-source handheld gaming console built around the STM32H743 ARM Cortex-M7 microcontroller. The engine drives a 4-inch 480x320 TFT display, rendering sprite-based isometric worlds at 60 FPS — all on a microcontroller with ~1 MB of RAM.
Think classic isometric games like Fallout 1 or GBA-era RPGs, running on custom hardware you can hold in your hand.
The project spans the full stack: from PCB design and bare-metal drivers to a double-buffered rendering pipeline with fixed-point math, isometric coordinate systems, and an asset conversion toolchain.
Rendering
Engine
Platform Support
Tooling
| Component | Part |
|---|---|
| MCU | STM32H743VIT6 (Cortex-M7, 480 MHz) |
| Display | 4.0" ST7796S TFT, 480x320, SPI |
| Touch | FT6336U capacitive (I2C) |
| Audio | PCM5100A I2S DAC + NS4150B Class D amp |
| External RAM | PSRAM64H 8 MB (QSPI) |
| WiFi | ESP8266 D1 Mini (UART) |
| Power | SW6106 USB-C PD 18W BMS |
| Battery | 2x 18650 Li-ion, 4000 mAh (1S2P) |
A custom PCB is currently in development using KiCad — the next step after the breadboard prototype is validated.
PocketGate Engine
├── engine/ Core engine (platform-independent)
│ ├── graphics/ Double-buffered framebuffer, sprite blitting
│ ├── isometric/ World/screen coordinate conversion, camera
│ └── math/ Q16.16 fixed-point arithmetic
│
├── platforms/
│ ├── stm32/ STM32H743 drivers (ST7796S, FT6336U, DMA)
│ └── desktop/ GLFW/OpenGL development build
│
├── game/ Game logic (entity system, WIP)
├── assets/ Sprites, tilesets, asset packs
└── tools/ Asset conversion pipelineThe engine core is fully platform-independent. The same framebuffer.cpp and rendering code runs identically on the STM32 and the desktop build — only the display output layer differs.
World Space (Fixed_q16) Screen Space (pixels) Display
│ │ │
Isometric projection ──► Camera offset applied ──► Framebuffer ──► SPI/DMA (STM32)
world_to_screen() back buffer render swap() or
glTexImage2D (Desktop)Internal (~1 MB) External
├── DTCM 128 KB → Stack ├── PSRAM 8 MB → 2x framebuffers
├── AXI 512 KB → Working buffers └── QSPI Flash → Assets
├── SRAM 288 KB → DMA buffers
└── SRAM4 64 KB → Low-powerThe desktop build lets you develop and test the engine without hardware. It renders the framebuffer to a GLFW window using OpenGL.
macOS:
brew install glfwLinux:
sudo apt install libglfw3-dev libgl1-mesa-dev# Clone the repository
git clone https://github.com/AntonSplavnik/pocketgate-engine.git
cd pocketgate-engine
# Build
make -f platforms/desktop/Makefile.desktop
# Build and run
make -f platforms/desktop/Makefile.desktop run| Key | Action |
|---|---|
| W | Move up |
| A | Move left |
| S | Move down |
| D | Move right |
| ESC | Quit |
The engine includes tools for converting standard image files into optimized sprite data:
# Convert PNG to binary sprite (RGB565 + transparency)
./tools/png_to_sprite/png_to_sprite_alpha character.png
# Generate C++ header for Flash embedding
python tools/sprite_to_cpp/sprite_to_cpp_alpha.py character.sprite
# Inspect sprite file
./tools/inspecter/inspect_sprite character.spriteSprite format: 4-byte header (width + height as uint16_t) followed by raw RGB565 pixel data. Magenta (0xF81F) is used as the transparency key.
This project evolved through several hardware iterations — starting with a Raspberry Pi Pico and a small 128x160 ST7735 display, then migrating to the STM32H743 with a larger 480x320 screen as the scope and ambitions grew. The engine was restructured for multi-platform support along the way, and the Pico platform code remains in the repository.
The engine software is open source under the MIT License.
Hardware designs (KiCad schematics, PCB layouts) are proprietary and not covered by the software license.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 8 | , , , , , , , | ||
| 2 | 1k | Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_Horizontal | R3, R4 |
| 2 | 1uF | Capacitor_THT:C_Disc_D4.3mm_W1.9mm_P5.00mm | C1, C4 |
| 1 | 100k | Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_Horizontal | R2 |
| 1 | 1020_battery_holder | local:1022 | J1 |
| 1 | 1M | Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_Horizontal | R1 |
| 1 | 1N5819 | Diode_THT:D_DO-35_SOD27_P7.62mm_Horizontal | D3 |
| 1 | A | Button_Switch_THT:SW_PUSH-12mm_Wuerth-430476085716 | SW2 |
| 1 | Adafruit_TFT_ST7735 | Library:Generic_1.8Inch_TFT_120x160 | U1 |
| 1 | Conn_PinHeader_2x03_P2.54mm_Vertical_SMD | Connector_PinHeader_2.54mm:PinHeader_2x03_P2.54mm_Vertical | J2 |
| 1 | D | Button_Switch_THT:SW_PUSH-12mm_Wuerth-430476085716 | SW4 |
| 1 | I | Button_Switch_THT:SW_PUSH-12mm_Wuerth-430476085716 | SW5 |
| 1 | J | Button_Switch_THT:SW_PUSH-12mm_Wuerth-430476085716 | SW6 |
| 1 | K | Button_Switch_THT:SW_PUSH-12mm_Wuerth-430476085716 | SW7 |
| 1 | L | Button_Switch_THT:SW_PUSH-12mm_Wuerth-430476085716 | SW8 |
| 1 | LOGO | LOGO | G*** |
| 1 | LOGO | graphics:spriglogo | G*** |
| 1 | LOGO | graphics:oshlogo | G*** |
| 1 | LOGO | graphics:hcflag | G*** |
| 1 | L_LED | PCM_4ms_LED:LED_3mm_C1A2_Polarity_Indicator | D2 |
| 1 | MAX98357AETE+ | Library:Max98357A_ClassD_I2S_Mono_Amp_BreakoutBoard | U2 |
| 1 | Pico | fab:RPi_Pico_SMD_TH_mod | U5 |
| 1 | R_LED | PCM_4ms_LED:LED_3mm_C1A2_Polarity_Indicator | D1 |
| 1 | S | Button_Switch_THT:SW_PUSH-12mm_Wuerth-430476085716 | SW3 |
| 1 | Slideswitch | Button_Switch_THT:SW_Slide-03_Wuerth-WS-SLTV_10x2.5x6.4_P2.54mm | SW9 |
| 1 | Speaker | Library:1W_8Ohm_Speaker | LS1 |
| 1 | W | Button_Switch_THT:SW_PUSH-12mm_Wuerth-430476085716 | SW1 |
It measures 139.7 × 64.8 mm and has 2 copper layers, 1.6 mm thick.
36 parts, built around the MAX98357AETE+T. 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.
From the AntonSplavnik/pocketgate-engine repository on GitHub, at the commit this page was made from: the board is Docs/pico/kicad/Sprig Console PCB.kicad_pcb and its schematic Docs/KiCad/PocketGate-backups/PocketGate-2026-02-24_212718/PocketGate.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask AntonSplavnik before reusing the design.

hackclub/sprig
🍃 Learn to code by making games in a JavaScript web-based game editor.

jamro/tiny-engineer
A small desktop robot that brings an AI coding assistant to life, physically acting out when it reads files, thinks, writes code, and finishes work.

jackw01/pi-tin
Open source raspberry pi handheld retro gaming console

atomic14/esp32-tv-hardware
This is Work In Progress - I'm still working on this.

DhamuVkl/ESP32S3-AI-Voice-Assistant
This project is a complete DIY AI voice assistant built around the ESP32-S3 microcontroller. It combines custom PCB design, advanced audio processing, and cloud-based AI to create a device that rivals commercial smart…

Guilleloma/Furby-GPT
This project transforms a 1998 Furby into an interactive and advanced desktop assistant using a Raspberry Pi W. It incorporates OpenAI and Whisper for natural language processing, primarily relying on Google Cloud Text…

jobitjoseph/ESP32-AI-SmartGlass
The ESP32 AI Smartglass is an innovative wearable device that blends the power of artificial intelligence with the convenience of home automation.

ProrokWielki/HomeAssistantSpeaker
It is a small, 3D printable rhasspy satellite. It uses INMP441 microphone, MAX98357A audio amplifier paired with 8 Ohm 0.5 W broadband speaker, NeoPixel led strip and ESP32. It is powered from 5V USB.