Astra game development: Circuit Shift

Updated 2026-09-05

An Astra-configured Codex task produced a three-room native Godot prototype with working collisions, relay puzzles, win and loss states, and saved progress. Here is the path from brief to tested game, including the repair that gameplay checks initially missed.

The result: a complete three-room gameplay loop

Circuit Shift is a small top-down puzzle game built and tested in Godot 4.5.1 on macOS. You guide courier CS-07 through three relay-station rooms, collect three energy cells in each room, open numbered gates, avoid moving sentries, and reach the exit. The final automated native run completed all three rooms, exercised loss and restart, and saved campaign progress and best times. A separate process successfully reopened that save.

The useful takeaway for an AI-assisted game project is the combination of a bounded brief, engine-driven gameplay checks, and visual inspection. Asking for a complete small loop made it possible to test more than movement: the exit had to stay sealed before collection, room completion had to unlock the next sector, and settings had to survive a relaunch. The downloadable project lets you inspect those behaviors yourself.

Circuit Shift sector one with the mint courier, three yellow cells, a numbered relay, a closed red gate, a moving hazard, and the sealed exit.
Actual 1280 x 960 Godot framebuffer capture from the final native run, at the start of sector one.

The initial brief made completion concrete

The task specified an original game named Circuit Shift, three short levels, engine physics, switches and gates, collectible cells, win/loss/restart, a start menu, settings, and saved progress. It also required authentic screenshots, a real-engine gameplay miniflow, and a saved-state reopen. Godot 4.5.1 was already installed and was reused; development started in a new game directory with a separate temporary HOME.

The snippet below is an excerpt from the actual initial brief, with line breaks added for readability and its original wording preserved. The complete initial-prompt.txt is included in the source ZIP. For your own brief, the most transferable part is the observable completion criteria: specify what the player can do and what must still work after closing the game.

Task: build an original polished small 2D Godot game called Circuit Shift.
Three short levels; controllable character, enginephysics/collisions,
switches and gates, collectible cells, exit, win/loss/restart,
start menu, smallsettings and savedprogress.

From prompt to files, engine feedback, and working rooms

The agent authored room data, GDScript, menus, settings, local saves, and a gameplay harness, then repeatedly ran the engine and inspected the results. Movement uses CharacterBody2D.move_and_slide; walls and gates use StaticBody2D; cells, hazards, and exits use Area2D triggers. These engine contracts connect the visible room to collision and state changes that the harness can observe.

The record contains 13 game-engine runs across import, gameplay, regression checks, native capture, reopening, packaging, and pixel inspection. The sequence included an initial scene-presence failure before implementation, headless gameplay, native screenshots, a focused visual repair, and final artifact checks. Game-specific artwork was drawn procedurally with Godot CanvasItem code, and five PCM sound effects were synthesized locally. The observed work consisted of agent-authored patches, local commands, native-execution permission requests, and screenshot inspection; no further human task steering or human code repair was observed.

Circuit Shift sector three with two activated numbered relays, two open gates, two collected cells, and the courier beside relay two.
Actual 1280 x 960 native capture of sector three during the final run, showing both independent relay circuits open.

The real defect: keyboard focus made a button hard to read

The first native gameplay run passed its assertions, but screenshot inspection exposed low-contrast text on a focused primary button. That mattered because the station menu also supports keyboard navigation: a working start action did not guarantee a readable start control. A targeted regression check then failed with a contrast ratio of approximately 1.36:1.

The repair explicitly set font_focus_color to the primary button's dark foreground. The next check measured approximately 10.57:1, and the final native run retained the passing contrast assertion. The raw failed and successful outputs remain in the evidence directory. This is a concrete reason to pair gameplay tests with inspection of focused and selected UI states: state transitions can be correct while the controls that expose them still need work.

StageObserved resultEvidence record
Targeted regressionFocused-button contrast 1.36:1; failed05-focus-regression
Explicit focus-color fixFocused-button contrast 10.57:1; passed06-focus-fixed
Final native runContrast assertion and gameplay passed together09-native-final

What the native tests actually exercised

The final gameplay miniflow drove normal Godot Input actions and native Control signals; one mapping check submitted an InputEventKey. The courier moved through the engine's physics. The harness checked wall collision, closed-gate blocking, relay opening and closing, the all-cell exit requirement, three room wins, hazard loss, restart, pause, settings, and sound-generation/playback triggers. It did not teleport the player, award cells directly, or assign a win state.

The counts below are assertions within these flows, including waypoints and captures, rather than independent benchmark tasks. All three final native runs exited successfully with empty stderr. The source gameplay campaign is the broadest test; the PCK run establishes pack loading and saved-state continuation, not a second full campaign through the packaged game.

Recorded runPassed checksObserved outcome
09-native-final62Full three-room native campaign plus failure, restart, pause, settings, and audio-trigger checks
10-native-reopen-compact6Separate process loaded progress and settings, then continued into sector three
12-native-pck6Pack launched outside the source directory, reopened the save, and entered sector three

Reopening tested persistence and the compact layout

A fresh native process loaded unlocked=3, completed=true, three positive best times, volume=0.35, and reduced_motion=true. Continue entered sector three. This separates persistence from a value that merely stays in memory while a game is running. The game saves progress on room completion, so the intended resume point is a room rather than the courier's last position.

The compact run also supplied a second layout check: the room, HUD, timer, and controls remained fully framed at 720 x 540. The desktop captures are 1280 x 960. Across the final source and pack runs, twelve native captures passed nonblank pixel sampling, and visual inspection checked framing and readability. These are genuine native viewport captures; the smaller image demonstrates a compact desktop window.

Circuit Shift sector three at 720 by 540 with the entire room, cell counter, timer, restart and pause controls, and station-power status visible.
Actual 720 x 540 native capture after a separate process reopened saved progress and continued into sector three.

Timing and configuration: how to read the run record

The requested start was September 5, 2026 at 05:35:51 UTC; completion was recorded at 06:00:11.007 UTC. That is 1,460.007 seconds, about 24 minutes 20 seconds of elapsed wall time. It spans implementation, tool execution, tests, repairs, capture, and packaging with an existing engine available. It is not model response latency or a forecast for another game's development time. One initial task brief led to multiple implementation and tool iterations.

This is an Astra-configured Codex run: the coordinator recorded spawn_agent.model=gpt-6-astra with reasoning_effort=xhigh. That establishes requested configuration only. API response model identity, token usage, cost, and model/API-call counts were not exposed and remain null in run-summary.json; no direct APIsRouter request or billing was observed. The September 5 public-catalog check also found no Astra listing on APIsRouter. Official model documentation and this local configuration do not establish gateway access.

Download and run Circuit Shift in Godot

Download the source ZIP to inspect the implementation, complete brief, controls, test harness, and preserved evidence. Extract it, import game/project.godot in Godot 4.5.1, and run the project. Move with WASD or the arrow keys, operate a nearby relay with E or Space, restart with R, and pause with Escape. Collect every cell to activate the exit; contact with a sentry ends the attempt.

For the packed version, download circuit-shift.pck and launch it with a compatible Godot runtime using the command below. The PCK requires Godot and is not a standalone executable. ZIP integrity, critical archived-file equality, source equality against the final native run, and copied-asset SHA-256 equality were verified. The PCK was launched from a temporary directory outside the source project. Download links for both artifacts, run-summary.json, and the SHA-256 manifest are listed below.

godot --main-pack circuit-shift.pck

What this prototype is ready for next

The next useful step is a human playtest of the three-room loop: can a new player understand the relay numbering, notice why the exit is sealed, and recover from a loss? No human playtest, listening test, or real-user usage data was collected in this case. Automated completion and generated audio buffers establish functional paths; they do not establish enjoyment, difficulty balance, sound quality, retention, or broad usability.

Windows, browser, Steam, touch, and gamepad remain untested; browser export templates were unavailable locally. Accelerated headless runs still emitted macOS certificate diagnostics and audio-resource shutdown warnings, although the final native logs had empty stderr. Before choosing a release target, address the relevant runtime issues and run that target's own input, save, packaging, and performance checks. The practical result here is an inspectable native prototype and a repeatable verification workflow that can guide that next round of development.

FAQ

What kind of game did the task produce?

Circuit Shift is an original three-room top-down Godot prototype. Each room combines collectible cells, numbered relay switches, physical gates, moving hazards, and an exit. It includes a station menu, win/loss/restart, pause, settings, and saved progress.

How do I play the downloaded PCK?

Use a compatible Godot runtime; the case used Godot 4.5.1. From the folder containing circuit-shift.pck, run godot --main-pack circuit-shift.pck. To inspect or edit the game instead, extract the source ZIP and open game/project.godot.

Which controls should I use?

Move with WASD or arrow keys. Press E or Space near a relay, R to restart the room, and Escape to pause or resume. The menu supports mouse, Tab, and Enter. Every cell must be collected before the exit activates.

What progress survives a restart?

Room completion saves unlocked sectors, campaign completion, and best times. Volume and reduced-motion settings also persist. A separate process verified these saved values and continued into sector three; the game does not save every movement within a room.

Where did the artwork and sound effects come from?

Game-specific visuals were authored procedurally in Godot CanvasItem drawing code. Five PCM sound effects are synthesized locally at runtime. Godot supplies its built-in font through the separately installed engine.

What should I reuse from this workflow?

Start with a small complete loop and observable acceptance criteria. Drive real engine input through collection, gates, win, loss, and restart; inspect screenshots for visual defects; reopen saved state in another process; then test the artifact outside its source directory. Preserve failures so each repair has a traceable reason.