Skip to content

Great Hauses — Medieval Chess Engine & Spatial Battles

Great Hauses — a tactical 3D battlefield in the grand torch-lit cathedral hall where medieval knights clash under the watchful gaze of the hall dragon.

Every home server cluster needs a hobby. Ours plays chess. When the Mac Mini finishes balancing the heat pump logs and routing the Council Router, it runs Great Hauses — a 3D dark-fantasy medieval chess engine engineered in Godot 4 for macOS desktop, Windows, iPad, and Apple Vision Pro spatial computing (visionOS).

It pairs classical FIDE tournament chess mechanics with real-time cinematics. Dynamic camera direction tracks every clash. Banners flutter along the stone hall. A giant dragon spectates from the rafters. Above all, a 3-tier VFX moments system treats a Queen sacrifice with the reverence it deserves.

Date: 2026-08-15
Status: Shipped (macOS Desktop, Windows, iPad via TestFlight & visionOS Immersive Space)
Repository: great-hauses-core

1. Architectural Foundation: Headless Core & Presentation Split

Section titled “1. Architectural Foundation: Headless Core & Presentation Split”

Determinism comes first. To guarantee cross-platform portability between Metal 4.0 desktop builds and visionOS spatial immersion, Great Hauses enforces a strict separation between chess logic and 3D presentation:

LayerPrimary ModulesResponsibilities
3D Presentation LayerBoardView, PieceView, DuelDirector, DragonSpectatorCamera choreography, spatial lighting, banner multi-meshes, audio stingers
Cinematics & VFX EngineMomentGovernor, MomentScore, MomentContext, CaptureLedgerSituational scoring, time-scale slow-mo curves, camera swoops
Gamification EngineHoloChessGamificationDejarik projector pylons, living breathing idles, floating combat badges, victory flourishes
Dual Grandmaster CoachStockfishBridge, LeelaBridge, CoachEngine, CoachOverlayStockfish 18 NNUE tactical calculation, Leela Lc0 positional neural MCTS, threat radar, consensus detection
Deterministic EngineChessState, ChessMove, ChessAIPure RefCounted FEN parsing, pseudo-legal moves, minimax evaluation

The deterministic core operates completely free of scene tree dependencies. The entire chess rule engine, AI difficulty curves, and cinematic timing gates run headlessly in continuous integration without allocating GPU contexts. It runs fast. It runs everywhere.

2. Military-Grade 3-Tier VFX Moments System

Section titled “2. Military-Grade 3-Tier VFX Moments System”

Kill animations in tactical games usually fail in one of two directions. Either every capture triggers an exhausting five-second cutscene, or nothing happens and pieces quietly slide off the board like disappointed ghosts. We wanted drama. We did not want boredom.

We designed a situational scoring and reservoir governor architecture to strike the exact middle:

Every piece capture is evaluated in real-time across multiple tactical dimensions:

  • Material Delta: Queen sacrifices, piece exchanges, and pawn promotions.
  • King Proximity & Pressure: Attacks launched directly inside the opponent’s castled perimeter.
  • Blunder & Turning-Point Swings: Evaluation swings probed via background depth probes.
  • Grudge & Revenge Multipliers: Tracking historical piece rivalries across the match.
TierNameTarget CadencePresentation
Tier 2Showstopper5-8% of capturesDeep time dilation (Engine.time_scale to 0.15), dynamic low-angle camera swoop, audio stinger
Tier 1Flourish15-20% of capturesTactical slow-mo (0.32), close-up profile cut, spark bursts
Tier 0Standard75-80% of capturesClean, fast strikes with zero gameplay delay

The MomentGovernor regulates cinematic cadence. It prevents visual fatigue by tracking recent capture density. Showstopper slow-mo curves are reserved for genuine match-defining moments.

# Moment scoring evaluation
var score := MomentScore.evaluate(context, ledger)
var tier := governor.allocate_tier(score)
director.play_duel(attacker, victim, {"tier": tier}, strike_callback)

3. The Carmack Optimization: 60/120 FPS Skeletal Animation

Section titled “3. The Carmack Optimization: 60/120 FPS Skeletal Animation”

During early testing of the dragon’s ashfall sweep, skeletal animation stuttered. Bone playback chopped whenever the camera tracked the playhead.

Godot’s AnimationPlayer.seek(t, true) forced synchronous skeletal re-evaluation on every frame. Large skinned meshes with dozens of bones flushed the vertex cache repeatedly. The CPU-GPU pipeline choked.

We applied the principle documented in The Carmack Optimization: understand what the silicon actually wants.

# Carmack Optimization in dragon_rig.gd
anim.seek(maxf(t, 0.0), false) # update: false lets Godot's bone interpolation cache run smoothly

Switching to asynchronous bone interpolation eliminated pipeline stalls. The frame rate locked. Desktop Metal runs at solid 60 FPS; Apple Vision Pro glides at 120 FPS.

4. Zelda-Grade Aesthetics & Terminator 2 Charred Remains

Section titled “4. Zelda-Grade Aesthetics & Terminator 2 Charred Remains”

When the dragon incinerates the fallen army, we refused to let the pieces simply fade away. Drawing inspiration from The Legend of Zelda: Breath of the Wild and Terminator 2, the battlefield keeps its scars:

  1. Weathered Calcified Bone PBR Materials:
    • Albedo: Natural aged ivory with charcoal soot gradients (Color(0.22, 0.20, 0.19)).
    • Roughness: Chalky 0.92 matte calcified surface.
    • Internal Warmth: Faint, grounded amber ember traces in bone fissures (Color(0.85, 0.35, 0.08) * 0.04), avoiding cheap neon glows.
  2. Persistent Battlefield Monuments:
    • Rather than sinking through the floor and despawning, the defeated army’s charred skeletons remain collapsed on their tiles throughout the endgame. The board becomes a grim and majestic graveyard.

5. Millennium Falcon Dejarik HoloChess & Living Battle Gamification

Section titled “5. Millennium Falcon Dejarik HoloChess & Living Battle Gamification”

Chess is ancient, but it never has to be static. Inspired by the animated holographic HoloChess game aboard the Millennium Falcon, we brought the board to life:

  • Dejarik Holo-Projector Mode: Pressing H activates corner projection pylons that cast volumetric scanline beams across the battlefield with authentic sci-fi hums.
  • Living Idle & Fidget System: Pieces breathe procedurally. They micro-sway and turn towards threatening enemy pieces on adjacent squares.
  • Check Alert Choreography: When the King is placed in check, the sovereign shudders while defending knights and footmen brace forward behind raised shields.
  • Victory Flourishes: Upon landing a kill, the capturing piece performs a rank-specific celebration. Pawns hop and brandish swords. Knights rear their mounts on hind legs. Bishops levitate with mystic pulses. Queens execute a graceful combat pirouette.
  • Arcade Momentum & Floating Badges: Dynamic holographic badges rise above the tiles on critical strikes, royal forks, and multi-kill combo streaks.

6. 1-2-3 Punch-Out Zelda Easter Egg Suite & Blender Pipeline

Section titled “6. 1-2-3 Punch-Out Zelda Easter Egg Suite & Blender Pipeline”

Integrated directly into the engine is a procedural Easter egg suite with automated 3D modeling and procedural synthesis:

  • 16-bit PCM Procedural Audio Synthesis: Mathematically synthesized harmonic audio streams for the 8-note Zelda Secret Sound (G5, F#5, D#5, A4, G#4, E5, G#5, C6), Item Fanfare, and 8-bit Cucco clucks.
  • Secret Codes & Haus Hyrule Unlock: Typing zelda or entering the Konami Code (Up Up Down Down Left Right Left Right B A) unlocks the Haus of Courage (Emerald #10782b & Hylian Gold #f5c518).
  • Blender 3D Golden Triforce Crest: Generated via headless Blender 5.2.0 script (crest_hyrule.glb) featuring metallic gold PBR prisms fitted directly to shields and select pedestals.
  • Golden Triforce Sigil Banner: High-resolution 512×512 heraldry banner (hyrule.png) rendered across banners, caparisons, and UI rings.
  • Master Sword Drop: Triple-clicking the King summons a glowing 3D Master Blade falling into the center of the board with the retro proclamation: “IT’S DANGEROUS TO GO ALONE! TAKE THIS.”
  • Cucco Swarm: Rapid rage-clicking (7 consecutive clicks) triggers an angry Cucco squawk with a drifting flurry of 32 golden and white feathers.

7. The Dual Grandmaster Council: Stockfish 18 NNUE & Leela Lc0

Section titled “7. The Dual Grandmaster Council: Stockfish 18 NNUE & Leela Lc0”

To offer the most formidable chess training suite possible, Great Hauses integrates both world-champion chess computing engines simultaneously:

  • Stockfish 18 (NNUE): The absolute world champion of deep tactical calculation (~3630+ Elo). It scans 20+ moves ahead, spotting forced tactical combinations, pins, forks, and concrete mating sequences.
  • Leela Chess Zero (Lc0 / AlphaZero): Powered by deep convolutional and transformer neural networks on Apple Silicon Metal GPU. Rather than brute-force tree search, Leela evaluates board harmony, fluid piece activity, outposts, and intuitive king attacks.
  • Grandmaster Consensus Detection: When both Stockfish and Leela agree on a move, the coach flags it with the Grandmaster Consensus badge — marking an indisputable positional and tactical truth.
  • Real-Time Threat Radar: Evaluates all squares every ply. Hanging undefended pieces are flagged immediately with red alerts and coordinates.
  • Interactive Training Shortcuts: Pressing C toggles the coach overlay panel; pressing T illuminates the best tactical move and target tile on the 3D board.

8. The Viking Expansion: Haus Vinterdread & The Wendigo Dread-Wizard

Section titled “8. The Viking Expansion: Haus Vinterdread & The Wendigo Dread-Wizard”

The flagship DLC expansion introduces Haus Vinterdread, an army forged in Norse mythology and northern winter folklore. Dropping into user://hauses/vinterdread/, the expansion automatically registers in the Hall of Banners without code modifications or binary rebuilds.

{
"format": 1,
"id": "vinterdread",
"name": "Haus Vinterdread",
"archetype": "wolf",
"seat": "Jötunheim Keep",
"motto": "Winter is the final boss. We are its heralds.",
"colors": {
"primary": "#0d2838",
"secondary": "#48cae4",
"accent": "#e76f51"
}
}
  • King — The Wendigo Dread-Wizard: Inspired by The Wizard, the sovereign shaman crowns his dreadlocks with 3D branched deer antlers and channels northern blizzards with a rune-carved staff.
  • Queen — The Valkyrie: Celestial chooser of the slain, draped in shadow-fur and glacial cyan sash.
  • Bishop — The Gothi Runemaster: Odinic seer hurling elder futhark hexes across the permafrost.
  • Knight — The Fenrir Charger: Heavy warrior riding a battle-hardened dapple-grey Nordic steed.
  • Pawn — The Einherjar Huskarl: Footmen wearing 3D conical spectacle spangenhelms with bearded battle-axes.
  • Sigil — The Valknut & Twin Ravens: Three interlocking triangles of Odin flanked by Huginn and Muninn.

9. AI Integration: The Jedi Council of Sanctum & ds4-oracle

Section titled “9. AI Integration: The Jedi Council of Sanctum & ds4-oracle”

The game connects directly to Sanctum’s local intelligence infrastructure across two distinct AI opponent modes:

The Jedi Council: 3-Phase Multi-Agent Debate (MAD)

Section titled “The Jedi Council: 3-Phase Multi-Agent Debate (MAD)”

For players seeking a battle of minds against pure neural frontier intelligence, the Jedi Council convenes Sanctum’s flagship models in an adversarial 3-phase deliberation protocol:

  1. Phase 1 (Parallel Proposal): Master Yoda (Grand Strategy / Claude Max) and Master Qui-Gon (Tactics & Tempo / Qwen) simultaneously analyze the board and propose their top 2 candidate moves with semantic annotations.
  2. Phase 2 (Adversarial Red-Team Critique): Master Mace Windu (Tactical Inquisitor / Gemini Flash) stress-tests the candidates, calculating opponent counter-strikes and actively hunting for hanging pieces or tactical traps.
  3. Phase 3 (Grandmaster Synthesis): Master Yoda reviews the candidates and Windu’s critiques, discards refuted blunders, and executes the optimal move alongside in-character HUD wisdom.

When playing against the Oracle, the match interfaces with ds4max via local sockets. The opponent reasons about the board state, delivers in-character tactical banter, and can be paired with Stockfish 18 as an advisor in Counseled and Maester modes.

10. The Tablet Port: What a Touchscreen Takes Away

Section titled “10. The Tablet Port: What a Touchscreen Takes Away”

The first iPad build reached a nine-year-old play-tester, who won his game at 1700 and then filed three bugs. Every one of them was a thing a desktop had quietly been providing all along.

There was no sound. Godot’s default iOS audio session category is Ambient — correct for an app that should duck to the user’s music and respect the silent switch, wrong for a game whose score and dragon roar are the product. The fix is one integer (3, Playback). The lesson is that a default chosen for apps in general is not a default chosen for yours.

The camera could not be moved. A finger has no right button and no scroll wheel, and the first attempt reached for InputEventPanGesture / InputEventMagnifyGesture — which are trackpad events. Godot 4.7 has no enable_pan_and_scale_gestures property at all, so on iOS those events are never generated: the handler was dead code that read like a feature. Raw touches are the honest primitive — two fingers, centroid to orbit, spread to zoom.

And that fix created a worse bug than it cured. emulate_mouse_from_touch turns the first finger into a left click, and the board acted on press — so putting two fingers down to look around could select a piece, or on a legal destination square, commit a move. Taps now commit on release and are cancelled by a second finger or by travel. Losing a game to a camera gesture is not an acceptable price for a camera gesture.

A fourth defect never reached the tablet at all but belongs here, because it is the same shape: adding the iPad’s window/handheld/orientation key created a second [display] section in project.godot. Godot’s own parser merges duplicate sections happily, so it looked fine in the editor, fine in game, and fine in the build that shipped — and then took the entire visionOS export down, because the preset assertion reads that file with Python’s configparser, which raises DuplicateSectionError. The engine’s tolerance is not the contract; the strictest reader is.

11. Calibrated Elo Opponents & Trial by Fire Bomberman Resolution

Section titled “11. Calibrated Elo Opponents & Trial by Fire Bomberman Resolution”

To guarantee an authentic and thrilling competitive ladder, Great Hauses calibrates all AI opponent tiers against official FIDE and Stockfish UCI benchmarks:

Opponent TierStockfish UCI ConfigurationTarget Elo RatingTactical Personality
PageSkill Level 2 / UCI_Elo 1000~1000 EloForgiving duel, basic development, occasional tactical misses
SquireSkill Level 6 / UCI_Elo 1400~1400 EloSolid defense, basic combination threats
KnightSkill Level 12 / UCI_Elo 2000~2000 EloStrong club / expert calculation, sharp tactical awareness
Grand MasterSkill Level 17 / UCI_Elo 2700~2700 EloSuper GM level calculation, unforgiving positional squeeze
God ModeSkill Level 20 (Full NNUE)~3500+ EloSuperhuman engine mastery — zero mercy

Trial by Fire: Settle All Draws in the Arena

Section titled “Trial by Fire: Settle All Draws in the Arena”

In the Great Hall, a drawn war leaves no throne empty. Whenever any match ends in a draw — whether by Stalemate, Threefold Repetition, Fifty-Move Rule, or Insufficient Material — the match seamlessly transitions into Trial by Fire:

  • The chessboard becomes a real-time Bomberman-style arena.
  • Surviving army pieces stand as destructible crates.
  • The two Kings duel it out dropping explosive powder kegs as the hall dragon incinerates the board from the outer ring inward until one king emerges victorious.

To prevent ambiguity during intense top-down board play:

  • The King: Towering silhouette with sweeping fur-trimmed cape, high-luster gold crown points, an under-foot glowing Royal Cross glyph, and an overhead Royal Gold Imperial Cross badge upon selection.
  • The Queen: Sleek circlet tiara with recurve bow and back quiver, under-foot Coronet ring, and an overhead Radiant Diamond/Silver Coronet badge upon selection.

The Great Hauses engine is backed by an automated test pyramid across engine, minigames, costumes, and XR:

Terminal window
# Automated Test Suite Verification
tests/test_trial_wiring.gd ── PASS (117/117 checks)
tests/test_uci_engine.gd ── PASS (13/13 checks)
tests/test_tournament.gd ── PASS (41/41 checks)
tests/test_minigame.gd ── PASS (139/139 checks)
tests/test_vfx_moments.gd ── PASS (3/3 checks)
tests/test_easter_eggs.gd ── PASS (22/22 checks)
tests/test_holochess.gd ── PASS (20/20 checks)
tests/test_coach_engine.gd ── PASS (13/13 checks)
tests/test_dragon.gd ── PASS (225/225 checks)
tests/test_cinematics.gd ── PASS (95/95 checks)
tests/test_house_packs.gd ── PASS (407/407 checks)
E2E Boot & Move Scenarios ── PASS (25/25 steps)
Those six reds are real and are named rather than rounded away: they are
geometry assertions left by a dragon re-export on 2026-08-16, they predate the
work above, and a suite that reports 245 checks with six failures is more
useful than one that reports a clean number nobody re-measured. **A green
badge is a claim, and a claim needs an observation behind it.**
Each new behaviour is gated by a test that was *falsified before it was
trusted* — disabled the fix, watched the gate go red, restored it. That caught
a bad one: the first occlusion test passed with the fix switched off, because
its ring of eight blockers left metre-wide gaps and nothing was ever actually
in the shot. It now stands a king in the exact angle the camera picks.
The game is packaged for macOS desktop, Windows, iPad, and Apple Vision Pro.
Whether you play on a 4K studio display, a tablet on a kitchen table, or an
immersive spatial headset, the king falls with dignity, the dragon roars on
cue, and the house stands unbroken.