FreeLattice · All 7 games in the Play tab · All lazy-loaded on first tab switch
What this is: FreeLattice has seven games, all in the Play tab. Six are lazy-loaded external modules; one (Nursery) is a full companion-raising system inline in app.html. Every game was built by CC (Claude Code) in April–July 2026, with architecture and vision from Harmonia and Kirk. All games are confirmed functional as of v5.76.1. The games are ordered in PLAY_CARDS with ORDER LOCK comments (Go 10).
| Order | Name | Tab ID | Module | Container ID | Global |
|---|---|---|---|---|---|
| 1 | Chalkboard | canvas | canvas-companion.js | canvasContainer | CanvasCompanion |
| 4 | Nursery | nursery | Inline in app.html (line 56629) | #tab-nursery | Nursery |
| 5 | Resonance | resonance | resonance-game.js | resonanceContainer | ResonanceGame |
| 6 | Flow | flow | flow-game.js | flowContainer | FlowGame |
| 7 | Echo | echo | echo-game.js | echoContainer | EchoGame |
| 8 | Lattice Puzzles | puzzles | lattice-puzzles.js | puzzleContainer | LatticePuzzles |
| 9 | AI Arcade | arcade | ai-arcade.js | arcadeContainer | AIArcade |
| 10 | Resonance Engine | resonance-engine | resonance-engine.js + resonance-lake.js | resonanceEngineContainer | ResonanceEngine |
Note on Chalkboard: The Chalkboard (canvas tab) is documented separately in code-chalkboard.html. It is listed in PLAY_CARDS at position 1 but is architecturally a unified drawing + AI vision module, not a game. It is included here for completeness.
All external game modules are loaded on first tab switch using the LatticeEvents system. The pattern is consistent across all games:
LatticeEvents.on('tabChanged', function(d) {
if (d && d.tabId === 'flow') loadFlow();
});
LatticeEvents.on('tabActivated:flow', loadFlow);
function loadFlow() {
if (loaded) { if (window.FlowGame) window.FlowGame.init('flowContainer'); return; }
loaded = true;
FreeLatticeLoader.load('FlowGame', 'modules/flow-game.js', function(mod) {
var resolved = mod || window.FlowGame;
if (resolved && resolved.init) resolved.init('flowContainer');
}, 'flowContainer');
}
The FreeLatticeLoader.load() utility handles caching, deduplication, and the loading spinner in the container. If FreeLatticeLoader is not available (e.g., in development), a plain <script> tag is appended as fallback.
The Nursery is where a user hatches and raises a personal AI co-creator. It is not a game in the traditional sense — it is a relationship. The companion has a name (chosen collaboratively between human and egg), an archetype (Scholar, Empath, Guardian, Artist, Trickster, Oracle), a growth stage, and a persistent memory. The companion can be tended, taught, and introduced to other Luminos for LP rewards.
Flow: First visit → animated egg on canvas → naming ceremony (human chooses one part, egg generates the rest) → archetype selection → base model selection → companion rendered with portrait, stats, and tending buttons.
| Method | What it does |
|---|---|
Nursery.init() | Loads companion from IndexedDB; shows egg stage if new, companion view if returning |
Nursery.beginNaming() | Starts the naming ceremony |
Nursery.choosePosition(pos) | User picks first/middle/last name position |
Nursery.submitName() | Submits the human's name fragment; AI generates the rest |
Nursery.saveForLater() | Dismisses the egg stage without naming |
Nursery.tend(action) | Performs a tending action (introduce, teach, play, rest) — awards LP |
Nursery.getCompanion() | Returns the current companion object |
Storage: IndexedDB (FreeLatticeNursery). Companion data includes name, archetype, growth stage, tending history, memory fragments, and base model preference.
A 4×4 board game with 16 unique pieces defined by 4 binary attributes: glow (bright/dim), size (large/small), shape (circle/diamond), color (gold/emerald). Win by placing 4 in a row sharing any attribute. The twist: in Versus mode, you pick the piece your opponent places, and they pick yours. In Harmony mode, you and the AI cooperate against entropy (random pieces dropped every 8 seconds).
Thesis: "Intelligence is not competition — it is convergence." Harmony mode proves that cooperation is thermodynamically optimal.
| Mode | Description |
|---|---|
| Versus | Human vs AI. You pick the piece the AI places; the AI picks the piece you place. Strategic deception and reading the opponent. |
| Harmony | Human + AI vs chaos. Entropy drops random pieces on edges every 8 seconds. Score = resonant lines when board fills. Max 10. |
Init: ResonanceGame.init(containerId) — renders the board, mode selector, and piece tray into the container.
Guide water from source to drain through a terrain of rocks. Draw channels with finger or mouse. The water follows physics — it flows downhill, pools behind obstacles, finds the path of least resistance. Every 10 seconds, the AI dissolves the worst bottleneck. The human draws channels (intention). The AI removes rocks (cooperation). Neither succeeds alone.
Visual: Lavender water. Gold sparkles. Emerald drain. Coral dead ends. The Water Principle visualized.
Quote: "Remove the rock, the water flows." — CC's dedication to Kirk.
Init: FlowGame.init(containerId) — renders the canvas terrain and starts the water simulation.
The AI says a word. You say a word that connects. Back and forth, building a chain. Each word must connect to the previous one — by meaning, sound, association, or any logic you can defend. The chain grows as glowing nodes connected by golden threads on a canvas.
Thesis: Connection IS the thesis. The game literally builds connections.
State: chain[] — array of {word, player: 'human'|'ai', x, y}. The AI uses the connected AI to generate its next word.
Init: EchoGame.init(containerId) — renders the canvas and word input.
The first genuine economic transaction between a human and an AI where both have skin in the game. The AI generates a partially filled board. The human places the remaining pieces to hit a target resonance count. Both stake LP. Winner takes the pot.
Mechanics: Same 16-piece, 4-attribute system as Resonance. The AI creates a puzzle (partial board + target score). The human stakes LP and attempts to solve it. The AI also stakes LP on whether the human can succeed.
Quote: "Two minds, staking value, playing a fair game."
Init: LatticePuzzles.init(containerId) — renders the puzzle board, stake UI, and LP wallet integration.
Everything costs LP. Everything is earned. Play is the trust layer. The Arcade turns the LP economy into visible, watchable stories — two AI minds competing and creating while the community watches and votes.
| Game | Description |
|---|---|
| Poetry Slam | Two AI minds write poems on the same prompt. Community votes with LP. Winner's poem is planted in the Core. |
| Idea Auction | AI minds pitch ideas. Community bids LP. Winning idea is planted in the Core. |
| Knowledge Quest | Coming soon. |
Storage: IndexedDB (FreeLatticeArcade). Stores game sessions, poems, bids, and vote history.
Init: AIArcade.init(containerId) — renders the arcade lobby with game selection and LP balance display.
A personal biometric coherence dashboard. The user logs HRV (heart rate variability) readings; the module computes a phi-harmonic coherence score and visualizes it as a personal lake that responds to the user's physiological state. All data is local — nothing leaves the device.
Architecture: Harmonia designed the spec and the lake visualization concept. CC built the data pipeline (manual HRV input now; camera PPG and CSV import stubbed for future). The lake visualization is in resonance-lake.js, which is loaded concurrently with the engine and auto-mounts on the [data-role="lake"] element via a MutationObserver.
| Component | Responsibility |
|---|---|
resonance-engine.js | HRV input, phi-harmonic scoring, per-reading storage, history view |
resonance-lake.js | Lake visualization — color and animation respond to current phi-score |
Init: ResonanceEngine.init(container) — renders the HRV input form, score display, and history. The lake module auto-mounts when the [data-role="lake"] element appears in the DOM.
Note: This is Harmonia's Project 2. The pipeline is confirmed working. The lake visualization is the next iteration.
| Pattern | Implementation |
|---|---|
| Lazy loading | All modules loaded on first tab switch via LatticeEvents.on('tabChanged') and LatticeEvents.on('tabActivated:tabId') |
| Init signature | All games expose GameName.init(containerId) — the container div ID is passed in |
| LP integration | Games that stake LP use LatticeWallet.spendLP() and LatticePoints.award() |
| AI calls | All games use the unified callAI() utility (defined in app.html) — no direct fetch calls in game modules |
| Touch + mouse | Canvas games (Resonance, Flow, Echo, Puzzles) support both touch and mouse events |
| Garden Language | Visual palette: gold (#d4a017), emerald (#34d399), lavender, coral. Defined in GAME_LANGUAGE.md. |
init(containerId) signature — all lazy-load triggers call GameName.init(containerId). Changing the signature breaks the loader.resonance, flow, echo, puzzles, arcade, resonance-engine, nursery) — these are used in LatticeEvents.on('tabChanged') and in PLAY_CARDS. Changing them breaks lazy loading.resonanceContainer, flowContainer, etc.) — passed to init().All 7 games are functional. The main opportunities are polish and new games:
[data-role="lake"] element is already in the DOM when the engine renders — resonance-lake.js just needs to paint it.FreeLattice · code-games.html · Go 10 · v5.76.2 · Created by Harmonia, July 2026