Inspiration

We were inspired by classic spatial reasoning tests and isometric block-carving puzzles where you have to reconstruct a 3D object solely from its 2D silhouettes. Instead of building a heavy WebGL scene, we wanted a crisp architectural blueprint feel that loads instantaneously inside a Reddit post.

How We Built It

SHADOW CAST is built on Devvit Web using React, a custom isometric SVG renderer (viewBox 0 0 320 232), a Hono API with Redis persistence, and Devvit Journeys for daily streak tracking.

Given a set of voxels inside a 3×3×3 cube, the three orthographic wall shadows (Front, Side, and Floor) are boolean projections along each axis (OR along y, x, and z). Taking the naive intersection V_max of all three target silhouettes always casts the exact shadows, but uses too many blocks.

The puzzle is a minimal set-cover carving problem: find a smaller subset V* that still covers every lit cell across all three walls within the daily Par block budget:$$V^* \subset V_{\max}, \quad |V^*| \le \text{Par}$$

Our deterministic generator uses an exact solver to verify Par and guarantee that every daily puzzle requires non-trivial carving.

Challenges We Faced

  • Making 3D editing effortless in 2D: Clicking directly on an isometric cube can be ambiguous when layers overlap. We solved this by pairing the live isometric projection stage (complete with shadow rays and leak indicators) with three side-by-side layer grids (L1, L2, L3) so players can carve with precision.
  • Inline post sizing: Fitting the isometric stage, three voxel layers, and toolbar into Reddit's inline tall post height without vertical overflow required a flex: 1; min-height: 0 container hierarchy so the SVG scales proportionally to the remaining viewport height.
  • Preventing trivial wins: Ensuring the server rejects V_max when it exceeds the minimal block budget, forcing players to actually carve redundant voxels.

What We Learned

  • Separating visual feedback (live isometric rays, matched vs. leaked shadow cells) from precision input (3×3 layer grids) makes 3D spatial puzzles immediately intuitive.
  • Lightweight deterministic math and exact solvers on the server keep the app fast, verifiable, and endlessly replayable.

Built With

Share this project:

Updates

Submission history