← All posts

Aava: A Godot 4 Game for My Children, Made with Claude

Aava is a 3D exploration-and-building game I am writing for my children, in GDScript on Godot 4.7, with an Android build as the first target. It is unfinished and has one developer, and I mark the claims I cannot yet support with a measurement, such as long-session battery life. The code is public at github.com/kabartay/aava under AGPL-3.0, while the name and the art are reserved (see NOTICE.md). There is no store listing.

The post follows four threads, marked in the headings: Design, Godot, Android and Building with Claude. If you do not make games, two parts transfer: the seeded world, a pure function that needs no saving or syncing, and the workflow section, where every assertion in a headless check file records a past bug and status files give a fresh session its context. Where an engine fact matters, I cite the "latest" pages of the Godot documentation.

In short

  • Aava is at v0.8.0 and plays on a real tablet, and local multiplayer has been verified across three phones on Wi-Fi, but long-session frame time, thermals and battery have not been measured.
  • One scene and one height function, a pure function of (x, z) and the seed, produce the whole world, so nothing about the ground is saved or sent over the network.
  • The Android build is one command with Godot's prebuilt template, JDK 17 and a debug key; there is no release keystore yet.
  • Written from a terminal with Claude Code, the project leans on a screenshot tool that prints scene statistics, a headless check file that records past bugs, and LESSONS.md and STATUS.md as the context a fresh session starts from.

Design: what the game is for

The design document starts from a problem. The first player is a child who already plays Minecraft, and anything one developer authors by hand is used up quickly, so the content has to come from the child. The loop in docs/DESIGN.md is: walk, discover, gather, build, the world wakes up, and further. The last step must always close: whatever the world gives back has to lead to more building. Plant three saplings close together and, once all three are full trees, the place counts as a grove and birds arrive. A bed in a house lets the child sleep through the night, which ends the day. So "comes alive as you build" means a built thing triggers a consequence, and the consequence gives back a material or a reason to build again.

The design also lists what it leaves out:

  • no combat, because nothing in the brief needs it;
  • no competition between players, who compete with the family's own record instead;
  • no losing: time and mistakes cost a slower day, never a failure screen;
  • no hand-authored quest chains as the main content.

A stray tap destroys nothing: spending, selling, deleting, resetting and leaving are held (a ring fills while the finger stays) or are an answered question. And the controls a toddler is likely to reach are 9 mm or larger. src/dev/toddler_fuzz.gd boots the real game, taps at random like a toddler for a few thousand frames, and asserts that nothing was lost to a tap that was not a completed hold or an answered question.

Design: the Kabardian language

The interface speaks English, French and Russian, and a fourth language, Circassian (Adyghe and Kabardian, which I treat as one language written the same way on either side of a border), is being written. The endonym shown to a child is "Адыгэбзэ". docs/KABARDIAN.md is a table of every string with the Kabardian column blank.

A missing Circassian string falls back to Russian, not English, because Russian is the language everyone in that region also reads, and nothing is guessed: a string arrives when someone who speaks the language writes it. The language is therefore unfinished: several keys, from the map to the café menu, still lack Kabardian (ROADMAP.md), and the checks require only English, French and Russian to be complete (FINISHED_LANGUAGES).

const FINISHED_LANGUAGES: Array[StringName] = [EN, FR, RU]

# Circassian falls back to Russian and everything else to English
if _language == AD and not entry.has(AD):
    return entry.get(RU, entry[EN])
return entry.get(_language, entry[EN])

src/i18n/text.gd, excerpted, with one comment shortened.

Design: privacy for a children's game

docs/PRIVACY.md says the game has no account, sign-in, email address, advertising, analytics, crash reporting, telemetry or server, and saves stay in the app's private storage. Backup is allowed on purpose so a valley survives a new phone; if it is on, Android may copy the storage to the owner's Google account, which the game neither sends nor sees. Voice is push-to-talk: the microphone is stopped between presses, the permission is requested on the first press, nothing is written to disk, speech reaches only devices in the same local session, and it can be switched off in the menu.

Building with Claude: the workflow

I write Aava with Claude Code, from the terminal and without the Godot editor. This section describes only what the repository records.

  1. Build everything in code. With no editor there is no hand-placed scene content: main.tscn holds one node, and the world is generated from a seed.
  2. Look at the world through a tool. dev/capture.tscn builds the real world, writes a PNG from a chosen camera position, time of day and seed, and prints scene statistics: chunks, triangles, plants, pickups and where the camera ended up. A picture cannot tell a camera pointing the wrong way from geometry that was never built; the printed counts (361 chunks, 241,664 triangles, camera aimed correctly) showed the terrain existed and was wound the wrong way.
  3. Run the checks before every commit. src/dev/ci_check.gd runs headless with godot --headless --fixed-fps 60 --path . --script src/dev/ci_check.gd, and CI runs it on every push. It is one GDScript file of 37,672 lines (ROADMAP.md gives an older figure of about 33,600), and every assertion in it corresponds to a bug that happened.
  4. Write each costly bug into docs/LESSONS.md. An entry gives the symptom the bug presented as and what now guards against it, with "nothing" where it can still recur.
  5. Keep STATUS.md and ROADMAP.md current. STATUS.md says what exists, in Done, Partial and Stub states. ROADMAP.md says what to build next, and DESIGN.md holds the reasons.
  6. Start a fresh session from those files. A new Claude Code session has no memory of earlier ones, so those four files are the context it reads before it edits.

Some entries in LESSONS.md are about editing. A text replacement matched twice, once inside a lambda, and turned a connect() into a parse error two hundred lines from the edit; the recorded rule is to replace by line range and read the result back. CI sat red for two days because nobody was watching: a red pipeline nobody looks at is a lint nobody is running. LESSONS.md does not record who made each mistake, so I do not attribute them.

Godot: architecture

There is one scene. main.tscn is a single Node3D named Main with src/main.gd attached, and project.godot declares no autoloads. Everything else is built in code, because the world is generated. main.gd is the only place that knows about both the world and the game, and ROADMAP.md lists it, with hud.gd, under known debt.

Main owns World, Player, Structures, Hud and Session; the height field is the shared source of ground height Main (main.gd) World Player Structures BuildMode Hud Session Voice, Visitors HeightField.height_at(x, z) pure function of (x, z) and the seed
Figure 1. Main wires the parts together; the world, the player and building all ask one height function where the ground is. Based on the Layers and The one rule sections of ARCHITECTURE.md.

The rule that shapes the code is that the height field is the single source of truth for where the ground is. The terrain mesh, collision, trees, pickups, the minimap and build placement all call it. The football pitch levels the ground under itself from within height_at, so the mesh, the collision and the planting agree without knowing football exists:

var pitch := Pitch.influence(x, z)
if pitch > 0.0:
    floor_height = lerpf(floor_height, PITCH_LEVEL, pitch)

src/world/height_field.gd, excerpted.

Because the valley is a pure function of one integer, nothing about the ground is saved or sent. Placement within a tile derives from a hash of the seed and the tile. What is saved is what a child changed, as readable JSON. Two devices generate the same valley from the same seed and send only positions and the few events that change the world.

SystemScriptsNote
Ground and streamingheight_field.gd, terrain.gd, terrain_chunk.gd64 m chunks, detail rings out to a 576 m radius
Plantsvegetation.gd, vegetation_tile.gdOne MultiMesh per plant kind per tile
Buildingbuild_mode.gd, structures.gd, house_parts.gdGhost preview, snapping, one overlap rule
Ridespark.gd, roller_coaster.gd, ride_sync.gdBars come down before a ride moves
Multiplayersession.gd, visitors.gd, voice.gdENet on a fixed port, local network only
Saves and profilessave_game.gd, profiles.gdPrevious save kept; numbered copy on restart
Texttext.gdKeys, not English text; Russian fallback for Circassian

Godot: multiplayer on a family network

The multiplayer layer is small. Session uses Godot's high-level multiplayer with ENetMultiplayerPeer on a fixed port, and is host-light: a guest places its piece immediately and reports it, because a child whose wall is refused by latency has been told the game is broken. There is no lobby, relay or server, and the join code is the last number of the address, entered on a keypad.

One lesson is specific to Godot. It numbers rpcs by the sorted names of a build's methods, so two builds with different methods call each other's wrong methods. The fix is a plain packet, not an rpc, sent first and carrying a protocol number:

var packet := HELLO_MAGIC.to_ascii_buffer()
packet.append(PROTOCOL)
scene.send_bytes(packet, id,
    MultiplayerPeer.TRANSFER_MODE_RELIABLE, 0)

src/net/session.gd, excerpted: the original is one line of send_bytes, wrapped here. PROTOCOL is 3 in this version.

Godot: engine lessons

Every entry in docs/LESSONS.md cost real time and is now guarded by a check or a lint, or says "nothing" where a bug can still recur. A selection, by symptom:

  • Inverted triangle winding. The terrain was invisible from above, which looks exactly like generation having failed. The screenshot tool's printed report separated the two.
  • Cyclic class_name dependencies. The import never finishes and gives no error. Shared constants go in a leaf script.
  • Resources built in _ready. It cost four bugs, and later the Hud and Atmosphere turned out to have the same fault. The Godot documentation says _ready is called once a node and its children have entered the scene tree. The project convention is to build in _init and keep only tree-dependent work in _ready.
  • Frame time with vsync on. A confident 8.34 ms mean was the 120 Hz refresh rate. Uncapped, the same scene had a median frame of 2.51 ms.

A recurring theme is checks that share the code's mistake. The trampoline compared heights from the wrong origin, so it never bounced anyone, and its check shared the assumption and passed. The recorded fix is a check that includes a case the wrong model cannot pass, or that reads the result through the node's transform.

Android: building and running

The preset is committed, so an export is one command. It uses Godot's prebuilt template, not a Gradle build, so only the Android SDK and a JDK are needed. The Godot export page says Gradle builds are for custom changes and Play Store uploads, and recommends JDK 17. ANDROID.md says JDK 17 too, not 21 or 26.

godot --headless --path . --export-debug "Android" \
    build/aava.apk
adb install -r build/aava.apk
TopicDesktopAndroid
MoveW A S D, Shift to runOn-screen stick; past three quarters is a run
Look and zoomDrag, mouse wheelDrag anywhere, pinch
Kick, throw, shootHold E, no aiming slideHold the button and slide the thumb to aim
BackNoneCloses the top panel; quits only with none open
RendererForward+Mobile
SigningNot applicableDebug key only

The table comes from CONTROLS.md and project.godot, which declares Forward+ with an override for mobile:

renderer/rendering_method="forward_plus"
renderer/rendering_method.mobile="mobile"
rendering_device/fallback_to_opengl3=true

project.godot. A comment there notes that the second key is what the Android exporter reads to choose Vulkan. The Godot renderer page describes Mobile as the default on mobile platforms, with fewer features than Forward+.

Other settings: arm64-v8a only, landscape, immersive mode, and ETC2/ASTC import switched on, because the export aborts otherwise. The permissions are RECORD_AUDIO, INTERNET, ACCESS_NETWORK_STATE and ACCESS_WIFI_STATE; CI fails if INTERNET is missing, because hosting failed silently on a phone when it was.

Touch input

Two project settings carry most of the input lesson. emulate_touch_from_mouse is on so one code path serves a finger and a mouse. emulate_mouse_from_touch is off, because it defaults to true and fires a synthetic click before the real touch, so every tap arrived twice. The movement stick is Godot 4.7's native VirtualJoystick. The game uses its dynamic mode:

_stick = VirtualJoystick.new()
_stick.joystick_mode = VirtualJoystick.JOYSTICK_DYNAMIC
_stick.action_left = InputActions.MOVE_LEFT
_stick.action_right = InputActions.MOVE_RIGHT

src/ui/hud.gd, excerpted: the original also sets the stick size, tip size and dead zone. The same file records a limit: a finger lifted while the game is not looking never delivers its release, and the stock stick then refuses new fingers, so the game rebuilds the stick when it must let go.

Performance, and what is not measured

The measured numbers come from an M3 Max with the Mobile renderer and vsync off: coarsening the outermost level-of-detail ring from step 4 to step 16 moved the median frame from 2.51 ms to 1.50 ms and removed 18,432 triangles per frame. These are not tablet numbers. ANDROID.md scales these to a tablet with an assumed 8 to 15 times speed ratio and calls the result "an estimate from a ratio and nothing more"; the real figure needs a measurement on a device.

A tablet runs out of draw calls, not triangles. The terrain costs one call per chunk, and radius 9 is 361 calls before anything else, so a check fails the build above 400. Vegetation is 5,875 plants in about 49 MultiMeshInstance3D tiles. I have installed and played the game on a real tablet repeatedly, but I have not logged frame times, thermals or battery over a long session, and touch-target sizes and the stick under a small thumb are still to check. Local multiplayer has been verified across three phones on Wi-Fi, although an older line in ANDROID.md still lists real-network testing as open.

The target is both a phone and a tablet: ANDROID.md names a OnePlus 12 (Android 14 or 15, arm64) "and tablets like it". I have profiled neither class over a long session.

Signing

Builds are debug-signed. A Play release needs --export-release with a release keystore, which the project does not have yet.

Status

STATUS.md is dated 2026-11-04 and describes code as of v0.8.0, the latest of 15 tags. The repository has 323 commits, the first on 2026-09-03. Done: terrain, mountains, river, two lakes, a day and night cycle, building, animals, a shop, riding, a fairground, local multiplayer with push-to-talk, and saves. Not started: a road leading off the map, collision on floors and stairs (so a second storey cannot yet be stood on), and a long on-device session for frame time, thermals and battery.

Open items include a release keystore, no left-handed layout, and a ride sync that has met only a scripted pair of processes. The Kabardian strings remain to be written by someone who speaks the language.

Sources