Résumé
← projects

Sunlight Diorama

A work-in-progress 3D puzzle game in Godot about restoring a desert town by routing sunlight through tracking mirrors, as the moving sun changes which routes work.

/ godot · gdscript · blender · game · 3d

An in-engine capture of The Dry Courtyard at 15:30: a cut block of desert town on a plinth, where a tracking mirror sends a shaft of sunlight across long shadows to the sun pump, above the game's daylight timeline

Overview

A small 3D puzzle game about bringing a desert town back to life with sunlight. You place tracking mirrors, set their height, and choose the machine each one feeds. As the sun moves, towers and walls change which routes work. A layout succeeds only if every machine stays supplied through its whole working day.

The game has no final name. This page uses the name in the project file.

How It Works

  1. Place: put a mirror on a sundial, choose a pedestal height, and aim it at a machine.
  2. Scrub: drag through the day. The timeline shows when each machine has power, and when one stops, the game shows why.
  3. Repair: move a mirror, change its height or target, or undo. Each edit re-evaluates the whole day at once.
  4. Run the day: a layout that holds plays the town’s restoration. Water runs, machines wake, residents appear, and lamps light at dusk.

Three places make up the first slice:

  • The Dry Courtyard: one mirror and a short tutorial
  • The Long Shadow: a potters’ square where a bell tower’s shadow decides the day
  • The Upper Terrace: a hill garden where two mirrors hand a conservatory from one to the other

Technical Details

  • Engine: Godot 4.7.2 with typed GDScript and Forward+ rendering, developed on Linux
  • Rules: a deterministic light evaluator, separate from rendering, with 5-minute ticks, a sample grid on each mirror, and box occluders
  • Solver: a brute-force solver proves each level against its design notes, including at least a 15% power margin, survival when the service window widens by 30 minutes, and noon traps that fail for a named reason
  • Art: seeded Blender scripts read the level data, so art fills each gameplay occluder by construction, and rebuilds come out byte-identical
  • Sound: numpy models of materials, contacts, scrapes, bubbles, and a cast bell, placed in a synthesized courtyard
  • Provenance: scripts in the repository make every model, texture, and sound; nothing is downloaded, bought, or generated by a model
  • Checks: 89 logic tests, game and flow checks driven by real input events, and a release build run outside the repository

Design Decisions

One sun. The sun on screen and the sun in the rules are the same. Every overlay and result comes from the evaluator, never from a shadow map or a pixel.

No credit for noon. Each machine must have power at every tick of its service window. A large surplus at noon cannot cover an outage at three.

Mirrors track on their own. You choose where a mirror stands, how high, and what it feeds. Its mount follows the sun, so the puzzle stays about space, height, and time, not hand aiming.

Decoration cannot change the puzzle. A headless check treats every plant and prop as a solid box and proves no legal layout’s day changes.

Crisp over soft. Round four’s art came out “too blobby and a bit sloppy”. Round five kept the solarpunk idea and rebuilt the kit as desert high-tech: rammed earth, white composite, steel, machined brass, and rectilinear lattice screens. The mirrors dropped to two-by-two facets because a four-by-four grid read as a solar panel.

Status

Work in progress. All three places are playable from a town screen, with autosave, settings, and a tutorial. Round five has rebuilt the 3D art and the interface, and that work is still under review. The playtest milestone is still ahead. The name and release platforms remain open.

The image above is a capture from the current build, rendered by the game on an RTX 3080 Ti.

How I Built This

Coding agents wrote the code, the Blender scripts, and the sound models, round by round, working from handoff prompts. I set the direction, played the builds, and judged the art and sound.