# Porthole

A round handheld game console built around a Waveshare ESP32-S3 touchscreen board.

[![Beta](https://img.shields.io/github/v/release/dreamiurg/porthole?include_prereleases&filter=porthole-v*&label=beta)](https://github.com/dreamiurg/porthole/releases)
[![Stable](https://img.shields.io/github/v/release/dreamiurg/porthole?filter=porthole-v*&label=stable)](https://github.com/dreamiurg/porthole/releases/latest)

I wrote the firmware and designed a 3D-printable case and two steering wheels. My kids have been playing the games, and it’s been fun building this for them. I wanted to share it here.

You can [play the games in your browser](https://porthole.games/#play). If you’d like to build one, the [hardware guide](https://porthole.games/hardware/) has the parts list and assembly instructions. You can [flash the firmware over USB](https://porthole.games/#install).

I write about this and other projects on my [blog](https://dreamiurg.net/).

<p align="center"><img src="site/images/puck.webp" width="420" alt="The board in its 3D-printed case, with its orange pinstripe and the Porthole menu"></p>

## Games

All of them run in one firmware. Each kid gets a profile, up to four per board. No game punishes a kid who is
away: nothing dies, and no progress is lost.

| | | | |
| :---: | :---: | :---: | :---: |
| <img src="docs/games/pets-club.png" width="150" alt="Pets Club"><br>**Pets Club**<br>a pixel puppy that grows over real days | <img src="docs/games/biscuit.png" width="150" alt="Biscuit"><br>**Biscuit**<br>read stories with a pup, find 96 discoveries | <img src="docs/games/marble-kick.png" width="150" alt="Marble Kick"><br>**Marble Kick**<br>tilt a marble through 12 mazes | <img src="docs/games/tilt-fc.png" width="150" alt="Tilt FC"><br>**Tilt FC**<br>street football: tilt to run, tap to pass |
| <img src="docs/games/pumpkin-hide-seek.png" width="150" alt="Pumpkin Hide & Seek"><br>**Pumpkin Hide & Seek**<br>grab three candies before Grandma finds you | <img src="docs/games/radar.png" width="150" alt="Radar"><br>**Radar**<br>live planes over your home | <img src="docs/games/starfighter.png" width="150" alt="Starfighter"><br>**Starfighter**<br>bank to fly, tap to fire | <img src="docs/games/kingdom.png" width="150" alt="Kingdom"><br>**Kingdom**<br>a 40-scene story where choices matter |
| <img src="docs/games/toy-town.png" width="150" alt="Toy Town"><br>**Toy Town**<br>a doll town: school, café, park | <img src="docs/games/rally.png" width="150" alt="Rally"><br>**Rally**<br>hold it like a wheel and race | <img src="docs/games/sand-jar.png" width="150" alt="Sand Jar"><br>**Sand Jar**<br>tilt sand, water and stars | <img src="docs/games/times-cards.png" width="150" alt="Times Cards"><br>**Times Cards**<br>times tables, a few minutes a day |

More about each game: [apps/porthole/README.md](apps/porthole/README.md).

## Software

The firmware is C++ on Arduino and PlatformIO. A host simulator and a browser emulator run the same code on a
computer, so you can build and test a game without the board.

- **Put it on a board:** plug the board into a computer over USB-C, open
  [porthole.games](https://porthole.games/#install) in Chrome or Edge and press **Install**.
  You do this once: after that the board updates itself over Wi-Fi. Details and the manual way:
  [docs/install.md](docs/install.md).
- **Build from source:** `make check`, then `make flash APP=porthole`. Setup:
  [docs/development.md](docs/development.md).
- **Make your own game:** point Claude Code or Codex at the repo and describe what you want.
  [AGENTS.md](AGENTS.md) holds the rules it follows, and [docs/new-app.md](docs/new-app.md) the app contract.

Every merge ships a beta, and a beta becomes stable after three quiet days ([docs/releases.md](docs/releases.md)).

## Hardware

**The board** is the [Waveshare ESP32-S3-Touch-LCD-2.1](https://www.waveshare.com/esp32-s3-touch-lcd-2.1.htm):
a 2.1-inch round 480x480 touchscreen with an ESP32-S3, a motion sensor, a clock, a buzzer and a battery plug.
About $35 from Waveshare or $45 on [Amazon](https://www.amazon.com/dp/B0DDPQSKJD). Get the flat 2.1-inch
model; the other sizes and the curved 2.1B are not supported. Specs and pins: [docs/hardware.md](docs/hardware.md).

**The puck case** holds the board and a protected 3.7 V LiPo behind four printed pieces. Its blue bezel carries a thin orange ring and `porthole.games` engraved above the side screw opposite the player. The orange lid locks into the wheel with a 40° clockwise turn. The P025 middle plate adds six short battery stops and leaves room at the sides for the lead. Choose a pouch that fits the 36.2 × 57.0 × 10.6 mm pocket and check the polarity of its 1.25 mm plug against the board.

**Case fasteners** are four M2 × 4 mm countersunk board screws, three M2 × 6 mm flat-underside self-tappers for the bezel, and three M3 × 8 mm countersunk lid screws with three M3 brass heat-set inserts (3 mm long, Ø4.50 mm knurl, Ø3.90 mm pilot).

[Download the complete case on one H2D plate](https://github.com/dreamiurg/porthole/raw/refs/heads/main/hardware/puck/P026-P025-P024-H2D.3mf) · [Parts, screws and illustrated assembly](https://porthole.games/hardware/) · [Individual print files](hardware/puck/source/)

## Accessories

### Steering wheels for Rally

Both steering wheels fit the same Porthole and have `porthole.games` engraved inside the puck socket. Set the puck in the centre and twist it clockwise until it clicks. For younger children up to about age 10, start with the kids’ wheel. From around age 10, either size can work, depending on hand size and thumb reach.

| Kids’ steering wheel · 172 mm | Adult steering wheel · 215 mm |
| :---: | :---: |
| <img src="site/images/wheel-kid-p027-mounted.webp" width="380" alt="Kids’ steering wheel in midnight blue and orange, with the puck mounted for Rally"> | <img src="site/images/wheel-adult-p028-mounted.webp" width="380" alt="Wider adult steering wheel in midnight blue with neon lime grip panels, with the puck mounted for Rally"> |
| **Plate 1.** Print the kids’ wheel upright in one piece. Remove the brim and tree supports from the grips and socket. | **Plate 2.** Print the adult front, back and four pins in midnight blue. The pictured neon lime grip panels are an optional colour treatment you can paint in the slicer. |

[Download both wheel sizes in one H2D project](https://github.com/dreamiurg/porthole/raw/refs/heads/main/hardware/steering-wheel/Porthole-Steering-Wheel-H2D.3mf) and select the plate for your size. For the adult wheel, dry-fit the halves on the pins and check the puck fits before gluing them together. [Wheel print guide and individual models](hardware/steering-wheel/)

## Contributing

Fixes, new stories and new games are welcome. [CONTRIBUTING.md](CONTRIBUTING.md) has the workflow.
