← Personal projects
Concept illustration of Stellar Slither snake game on a unicorn LED matrix with Qwiic gamepad

Stellar Slither

Stellar Slither is a neon snake game on a Pimoroni Stellar Unicorn LED matrix, played with an Adafruit Qwiic Gamepad — classic arcade logic in a tiny constellation of pixels.

Raspberry PiGame DevLED MatrixQwiic

Overview

Stellar Slither asks a simple question: what if Snake lived on a unicorn made of LEDs? The Pimoroni Stellar Unicorn is the screen — literally a grid of RGB pixels in a ridiculous, wonderful shape. An Adafruit Qwiic Gamepad is the controller. Together they make a desk toy that feels like a handheld from an alternate timeline.

The game is deliberately minimal: eat, grow, don’t hit yourself. But on a 16×16 matrix, every turn is visible and every mistake is instant. It’s the kind of project that exists because the hardware was fun, and the software had to catch up.

Hardware

Part Role
Pimoroni Stellar Unicorn HAT 16×16 RGB LED matrix in a unicorn-shaped board — the whole display
Adafruit Qwiic Gamepad Joystick and buttons over I²C; no GPIO spaghetti for controls
Raspberry Pi Runs the game loop, reads input, and drives the matrix
Qwiic cable Single connector between Pi and gamepad for power + data

Why these parts

  • Stellar Unicorn HAT — Pimoroni’s matrix HAT with a built-in unicorn aesthetic. It’s a display you don’t have to explain; the form factor is half the joke and half the charm.
  • Qwiic Gamepad — joystick plus buttons on a single I²C bus. Plug in, read registers, get on with game logic. Ideal for quick prototypes when you’d rather write collision code than solder button pulls.
  • Snake — the perfect game for the constraints: grid-native, no sprites, easy to read at a glance, and still addictive forty years later.

Build process

  1. 1

    Map the playfield

    The Stellar Unicorn gives a small grid, which is perfect for Snake — every pixel matters. The board coordinates become the game grid: snake segments, food spawn, and wall collisions all map directly to LED addresses.

  2. 2

    Wire up controls

    The Qwiic Gamepad plugs in over I²C, so direction input stays clean. The joystick maps to up/down/left/right; face buttons can restart or pause. No shift registers or matrix scanning on GPIO — just poll the gamepad and update velocity.

  3. 3

    Build the game loop

    A fixed tick drives movement: read input, advance the snake, check for food and collisions, then flush the frame to the matrix. Speed ramps slightly as the snake grows so runs feel tense on a display you can hold in one hand.

  4. 4

    Make it readable on LEDs

    Snake body uses a gradient along the tail; the head gets a brighter pixel so you always know which way you’re facing. Food blinks or shifts hue so it pops against the trail. Keep palettes high-contrast — what looks fine on a monitor can muddy on RGB LEDs.

  5. 5

    Playtest and tune

    Input lag and tick rate matter more on a 16×16 grid than on a phone screen. Tuning step interval, debounce, and wrap-vs-wall rules turns it from a tech demo into something people actually replay.

Gameplay details

The snake starts short in the center of the usable matrix area. Each food pellet adds a segment and bumps the score. Runs end on self-collision or wall impact — keep it strict; wrapping the edges makes a tiny board too easy.

High scores can persist to a small file on the Pi so the unicorn remembers your best run between reboots. A face button restarts instantly; another can pause if you need to answer the door mid-streak.

Challenges

  • Usable grid vs. unicorn shape — not every LED in the unicorn silhouette is a perfect rectangle; the playfield may clip to a subset of pixels.
  • Refresh rate — smooth animation without flicker means batching matrix updates and keeping the game tick independent of input polling.
  • I²C latency — reading the gamepad every frame is fine, but debouncing the joystick diagonals prevents accidental double-turns.
  • Power and heat — full-brightness RGB at high FPS draws attention and amps; dimming the palette extends play sessions and keeps the Pi happy.

Status & next steps

Stellar Slither is playable: joystick in, snake out, high scores on the line. Possible upgrades include a attract-mode demo when idle, a two-player variant if a second Qwiic controller shows up, or a tiny sound effect when you eat — because a unicorn that silently scores is only half as satisfying.

Add photos or a short clip to public/portfolio/personal-projects/stellar-slither/ when you capture the build in action.

© 2026 Charles Ahn