# Moonlit Kingdom — Idle RPG Built by AI Agents (Godot, iOS)

> Moonlit Kingdom (月光王国) — an idle RPG about rebuilding a village with heroes and slimes, built by AI agent teams in Godot and heading to iOS. Economy, chapters, expeditions, and honest status.

Source: https://toolpantry.app/gamedev/moonlit-kingdom

## About

An idle RPG about relighting a dark world, one village at a time. Start by tapping an expedition button; end by managing forty routes, sixteen relics, and a production line of slimes — on a phone, in landscape, built by agent teams in Godot.

## Quick answer

What is it? A click-to-automate idle RPG. Every expedition returns courage instantly; slimes and inns convert that loop into per-second production. Eight chapters, prestige resets that permanently raise your rate, and an expedition system that pauses your economy while your units are away.

## The core loop, with actual formulas

Idle games live or die on their math being legible. Moonlit Kingdom publishes its own: courage income per second is (0.60 × slimes + 2.5 × inns) × chapter bonus × (1 + 0.15 × starfire). The prestige currency (starfire) scales as max(1, floor(sqrt(run earnings ÷ chapter goal))) — the square root keeps early resets meaningful without letting late ones trivialize the curve.

The rhythm: tap expeditions for instant courage → buy slimes (cheap, slow) → save for inns (expensive, 4× rate) → hit the chapter goal → choose a permanent blessing. *Oath of Dawn* boosts manual play by 25%; *Oath of the Hearth* boosts automation by 25%. That single choice decides what kind of next chapter you'll play.

## Chapter progression

| # | Area | Goal courage | Efficiency |
|---|---|---|---|
| 1 | Sparkfire Village | 250 | 1.00× |
| 2 | Windbell Forest | 650 | 1.15× |
| 3 | Star River Canyon | 1,600 | 1.35× |
| 4 | Old Tower Outer Wall | 3,800 | 1.60× |

Chapter five's tower core is an optional side line — the campaign keeps going through eight chapters to the star-core finale, where a final boss and an ending choice close the run.

## Expeditions: the anti-idle system

Every six expeditions triggers a journey encounter — escort a caravan for instant courage, or follow a star beast for a temporary production boost. Later, the expedition board opens up: forty routes and sixteen relics. Dispatch uses one active slot, **pauses the production of the units you send**, and rewards must be claimed at the guild — a deliberate friction that makes "leave it running" a real decision instead of a default. The second relic slot unlocks in chapter four, and old saves migrate cleanly into it.

Bosses mutate. The bestiary and boss-mutation systems give repeated fights variation, so the idle grind never becomes a single solved equation.

## What the agents actually did

- **Touch-first UI under safe-area constraints:** every layout verified at 780×360, 844×390, and 932×430 — including notch and home-indicator safe areas — with same-state before/after evidence for each fix.
- **Save-state continuity:** mid-expedition restarts, offline progression, and reward state all verified by independent process restarts, not just in-memory tests.
- **iOS delivery pipeline:** a source-bound Xcode project with manifest hashes — the build you test is provably the source you reviewed.
- **Real-time recordings:** each accepted feature ships with a runtime video of the actual build — the QA approach from the [pipeline guide](https://toolpantry.app/how-we-build-games-with-ai-agents.html).

## Honest status board

| Area | State |
|---|---|
| Core idle loop & 8 chapters | Playable, running builds |
| Expeditions, relics, blessings | Implemented & runtime-verified |
| iOS Xcode project | Source-bound delivery complete (unsigned) |
| Signing, TestFlight, store | Not started |
| Human play-feel acceptance | Ongoing — the honest bottleneck of idle design |

## Notes

Godot 4.6 · iPhone landscape · anti-pillars are explicit: no high-precision combat, no forced ads, no paid acceleration.

## FAQ

**When does it come out?**

The playable build runs today; iOS signing and TestFlight are the next milestones. No release date is announced — this lab posts progress, not promises.

**Why landscape on a phone?**

Idle games are dashboards: production rates, dispatch timers, and cost curves want width. Every layout was designed and tested for one-hand landscape play at real device sizes.

**Can I see the math?**

Yes — the formulas in this article are the shipping ones. Idle players reverse-engineer spreadsheets anyway, so the design publishes its curve honestly.
