Inspiration
Many early-learning games place a worksheet inside a colorful interface: the child answers a question, receives a score, and moves on. We wanted to explore a different idea—what if learning was the action that changed the world?
Sproutforge was inspired by the way young children naturally learn through play, repetition, observation, and repair. Counting should fill a picnic basket. Comparing size and weight should help rebuild a bridge. Testing materials should keep a workshop dry. A mistake should create a visible, recoverable consequence instead of a red X or a shame-filled failure screen.
That led us to Mosslight Valley, a small, cozy world where every learning action helps friendly creatures prepare for a lantern festival.
What it does
Sproutforge is a local-first, installable crafting and exploration game designed for children around ages four to five. The playable vertical slice follows one complete five-quest chapter:
- Gather exactly five berries for Pip's basket.
- Compare plank lengths and weights to repair a wobbling bridge.
- Discover the sequence of light, water, and soil that helps a moonflower grow.
- Test materials to build a rain-resistant workshop roof.
- Reuse earlier ideas to complete patterns and preparations for the Lantern Hill Festival.
Learning is embedded directly in play. When a child makes an imperfect choice, the world responds with an understandable consequence—an overflowing basket, a gapped plank, a leaning plant, a puddle, or a flickering lantern pattern—and lets the child try again. A three-level hint system moves from a gentle prompt to a demonstrated first action without completing the challenge for them.
The game includes persistent world repairs, local save and resume, captions, narration, ambient sound, calm mode, keyboard and touch support, and an adult-gated caregiver view. The caregiver summary reports only evidence recorded during play and clearly treats mastery as an approximate gameplay estimate, not a diagnosis or formal assessment.
After the authored chapter, a Tiny Encore selects a concept worth revisiting from the child's local play history. GPT-5.6 can remix the short fantasy story surrounding that activity, while deterministic game rules retain control of the concept, action, quantity, available items, progression, and correctness. The entire experience also works offline and without an API key through authored local templates.
How we built it
Sproutforge combines a Next.js, React, and TypeScript application shell with a Phaser 3 world. Phaser handles movement, animation, and the living valley, while semantic React controls power the precise quest interactions and accessible alternatives. Deterministic domain modules manage quest rules, concept evidence, approximate mastery, review scheduling, and the adaptive encore. Progress is stored locally in IndexedDB, and a service worker makes the authored chapter available after the first online visit.
We designed the GPT-5.6 integration around a deliberately narrow trust boundary. Before any model request, the local engine fixes every rule-bearing field: concept, objective type, target quantity, allowed materials, NPC scope, and difficulty. GPT-5.6 uses Structured Outputs to produce only short story lines and narrative context. The response then passes through Zod parsing, global allowlists, child-safety checks, word limits, and an exact comparison against the original contract. Any refusal, network error, invalid output, or attempted rule change falls back to one of 15 deterministic local story templates.
Codex accelerated the project from product brief to tested vertical slice. We used it to shape the architecture, implement the five connected quests and original visuals, build the persistence and PWA layers, establish the AI safety boundary, and consult current OpenAI documentation while integrating the Responses API. Codex also created the deterministic test coverage and repeatedly exercised the full child journey across desktop, tablet, and phone layouts. Those implementation-and-inspection loops helped us make decisions while the experience was running, rather than treating code generation as the finish line.
Challenges we ran into
The hardest product challenge was making mistakes meaningful without making them discouraging. Every wrong choice needed to produce a consequence a preschooler could understand, remain visually calm, and preserve a clear path to recovery. That required treating consequences as part of the learning design rather than as decorative error states.
Combining a canvas-based Phaser world with accessible React interactions created another challenge. We needed the world to feel playful while still supporting pointer, touch, keyboard, tap/click alternatives, stable focus behavior, captions, and responsive layouts. Small visual effects also affected usability: an early hint pulse physically moved interactive objects, causing their hit targets to shift. We replaced it with a stable brightness and shadow treatment.
Reliable state transitions took several iterations. At one point, completing a quest advanced the global quest index while its success overlay was still visible. We pinned an open quest to its initial index until the player returned to the valley. IndexedDB could also remain pending in an isolated browser context, so startup now falls back to a fresh session instead of blocking the game.
Offline verification exposed a tooling issue as well. Testing against the hot-reload development server produced transient asset names, so we moved PWA testing to the stable production build. The biggest AI challenge was not generating more content; it was proving that generated language could never silently change the learning rules. That led to the independent contract validator and deterministic fallback architecture.
Accomplishments that we're proud of
We are proud that Sproutforge is a complete, coherent chapter rather than a collection of disconnected prototypes. All five quests build toward one festival, the valley visibly remembers the child's repairs, and earlier concepts return in a final transfer activity.
We are also proud of the recovery-first interaction model. There are no scores, advertisements, purchases, child profiles, failure labels, or manipulative streaks. Children can inspect what happened, ask for progressively stronger help, and try again.
The GPT-5.6 integration is visible in the experience without being authoritative over it. Structured generation adds freshness, but deterministic code owns correctness and safety. With no network or API key, the same complete gameplay path remains available through local templates.
Finally, we built verification into the project rather than leaving it for the end. Sproutforge has 20 deterministic domain and security tests plus a production Playwright journey covering onboarding, all five quests, recoverable mistakes, hints, persistence, the caregiver gate, multiple viewport sizes, and offline reload. Several of the most important fixes came from inspecting rendered gameplay, not merely from seeing a green compiler.
What we learned
We learned that educational design becomes stronger when the concept, action, and consequence are the same interaction. A child does not need to leave the story to demonstrate understanding if the world itself provides clear feedback.
We also learned that a smaller AI surface can create a better product. GPT-5.6 is most useful here as a bounded creative collaborator, not as the judge of a child's answer. Fixing the pedagogical contract before generation made the experience easier to test, safer to run, and fully functional offline.
Codex was most valuable when used as an engineering partner across the entire loop: turning an ambiguous brief into explicit decisions, implementing those decisions, testing the result, inspecting failures, and revising the product. The combination of fast construction and disciplined verification let us spend more time on the details that determine whether a young child can actually use the game.
What's next for Sproutforge
The next step is guided usability research with children, caregivers, early-years educators, and accessibility specialists. Their observations would shape pacing, language, interaction sizing, hints, and the caregiver evidence model before expanding the curriculum.
From there, we would add new regions and connected story chapters, localization, professional narration and music, and content-authoring tools that preserve the same deterministic learning contracts. Production deployment would also include broader real-device testing, formal accessibility, security, and child-privacy review, durable narration caching, edge-enforced rate limits, and API spend controls.
The long-term vision is a growing world where curiosity leaves a visible mark: children learn by helping, repaired places stay repaired, and every new adventure builds on something they have already discovered.
Built With
- gpt-5.6
- indexeddb
- next.js
- openai-codex
- openai-responses-api
- phaser-3
- pwa
- react
- structured-outputs
- typescript
- vitest
- zod
Log in or sign up for Devpost to join the conversation.