Johan Alphonso Braga
Typing test⌘J
AboutProjectsReadingStackCraftDesignStatusResume

Utilities

Ask anything Typing test

Elsewhere

GitHub

All projects

Games / 2026 / Live in the browser

Penumbra

Black Box, the deduction game, with a live count of every atom layout that still fits the rays you have fired. Each board is generated from a seed and proven to have exactly one answer.

Penumbra

01

The problem

In Black Box you fire rays into a hidden 8 by 8 grid and infer where the atoms are from where the light comes out. Players never know how much they actually know, so they either over-fire and pay for it or submit a guess they could have proven. Some layouts are also unsolvable, because an atom boxed in by four others cannot be seen by any ray.

02

How I approached it

A world counter enumerates every layout the tier allows, up to 7.6 million on five atoms, and keeps the ones whose rays match the player's. It runs in 12 ms slices between frames and stores survivors as packed 32-bit integers, six bits per atom, so each new ray only re-checks what is still possible. The same pass gives a lens: for every cell, the share of surviving layouts with an atom there. Ray tracing uses an allocation-free inner tracer, with hits checked first because they reject layouts soonest. The generator fires all 32 rays at each seeded candidate and keeps it only when the counter finds exactly one layout with that pattern.

03

The outcome

Four tiers, including Fog, where the atom count itself is hidden. A daily board per tier and shareable free-play codes. 20 tests with no dependencies cover every ray rule, path reversibility over 3,000 random layouts, the counter against brute force, and uniqueness of generated boards.

penumbra.johanthegoat.xyz Open in a new tab ↗
Next projectDownshift →