## What it does
Veiled Dominion (engine name: *Duet*) is a real-time, server-authoritative 2-player chess variant played over the web. The game introduces three original mechanics layered onto a standard board:
- **Radius of Ruin** — an OP piece called Rebirth has a permanent 1-square aura. Any piece ending its turn in that radius is "Veiled" — losing special abilities and moving only as a Pawn for one turn.
- **The Sanctuary** — the Death piece stabilizes the board; any allied piece within 1 square of Death is immune to Rebirth's Radius of Ruin.
- **Martyr's Boon / Soul Reservoir** — sacrificing an allied piece grants a Boon Token to temporarily suppress the aura; every three friendly pieces in the Graveyard unlocks the Rebirth Dash (movement through pieces as ghosts).
The game runs live: two real players, real-time socket communication, no AI opponent, no asynchronous turns.
---
## How we built it
Stack: Node/Express, Socket.io, plain HTML/JS/CSS — no game engine. Deployed on Google Cloud Run. The architecture is deliberately engine-agnostic to preserve the option of console distribution (Xbox's WebView/UWP path is the most viable near-term target) and to allow PWA packaging for Steam Deck and mobile without platform certification gatekeeping.
AT Protocol integration is live at Phase 1: match events are posted to a dedicated "the-rift" bot account on Bluesky via `atprotoPoster.js` using app-password auth. Phase 2 (OAuth + DPoP write-back to `actor.rpg.stats`) is the planned next step, which will supply stats-driven character progression for a future second product built on this engine's lore and brand.
The lore world is registered at `veileddominion.loptrlab.com` on lore.farm as a community canon layer — separate from the stats/gameplay layer.
---
## Challenges we ran into
- Keeping the server-authoritative model clean while supporting multiple input methods (mouse, keyboard, speech input via "Speak Move," and a planned gamepad layer using the browser Gamepad API) funneling through the same `#cmd` confirmation bar.
- Designing the Radius of Ruin mechanic to be non-trivial without making it feel arbitrary — the Sanctuary and Boon Token exist specifically to give players tools to work around it rather than be helpless to it.
- AT Protocol Phase 2 write-back requires OAuth with PKCE + DPoP (no server-side secret), and the merge-put into a shared `actor.rpg.stats` record carries data-corruption risk across unrelated game systems using the same lexicon — requiring a disposable test account before anything touches live data.
---
## Accomplishments that we're proud of
- A fully functional live 2-player engine with no game engine dependency — shipped and playable.
- An accessibility-first input design: speech, keyboard, click, and a forthcoming gamepad path all feed the same command bar.
- An AT Protocol integration architecture that treats gameplay stats as sovereign, portable player data rather than siloed platform data.
- A design evolution traceable from a pure-chess concept (April 2026) through a dice/card hybrid prototype, back down to a clean 4-player chess variant — with every pivot documented and preserved.
---
## What we learned
Engine independence is a design constraint as much as a technical one. Every architectural decision — from Cloud Run deployment to plain HTML/JS rendering to the AT Protocol integration — was made to keep the system distributable without depending on a third party's certification, gatekeeping, or business survival. That constraint shaped the product more than any single mechanic did.
---
## What's next for Veiled Dominion
1. Gamepad accessibility (browser Gamepad API, UI-layer only — top current priority)
2. AT Protocol Phase 2: OAuth + DPoP stats write-back to `actor.rpg.stats`
3. 4-player board expansion (teams or chaos mode)
4. Stats-driven playable characters as a second product (PWA/Canvas/WebGL, engine-independent, no console certification required)
5. Xbox distribution via UWP/WebView wrapper
Log in or sign up for Devpost to join the conversation.