Chasing the Dynasty

โ† Back to Projects

Aether
Dynasty

46,656 Ways - A Cascading Slot Built with Next.js & Vibe Coding, Wrapped in Neon Antiquity

Aether Dynasty - Neon Antiquity slot game cover
Role
Developer
Vibe Coder
Type
Web Slot Game
iGaming
Stack
Next.js ยท React
TypeScript
Build
Turbopack
Netlify
Approach
Vibe-Coded
AI-Assisted

Aether Dynasty is a fully playable browser slot with a cascading expanding board - seven Greek-mythology symbols, a Golden Frame that transforms into a Wild, board growth from 4,096 to a maximum 46,656 ways, Free Games with a rising multiplier, and a maximum payout of Rs 10,000,000. The whole engine runs client-side with no backend. The aesthetic is "Neon Antiquity" - an ancient torchlit temple carved in stone, electrified by holographic scanlines and a counter-rotating astrolabe rune-ring. Built entirely through vibe coding.

01 --The Challenge

The Build Challenge

A cascading expanding-board slot is one of the most complex game mechanics in iGaming. Unlike a fixed-reel slot, every spin triggers a chain: winning cells are eliminated, new symbols drop, the board dynamically grows as cascades land, and the entire win evaluation re-runs after each step. Wild symbols have survival counters that must decrement correctly. Golden Frames transform into Wilds only on elimination. Free Games trigger only when the board hits its maximum size. All of this had to run synchronously, be replayed smoothly in the UI, and produce statistically fair outcomes - with no server to verify any of it. The added constraint: it was all built through vibe coding.

"A cascading slot isn't just one game per spin - it's an unbounded chain of game states, each depending on the one before it. You have to resolve the whole chain before showing the player anything."

๐Ÿ›๏ธ

Design Problem

Build a "Neon Antiquity" slot - a credible blend of an ancient Greek stone temple (Orbitron displays, Marcellus SC inscriptions, torchlit stone) with holographic neon grids and a rotating astrolabe rune-ring - that feels cohesive, not kitsch.

โš™๏ธ

Technical Problem

Implement a cascading board that expands reel-by-reel through consecutive wins, from 4,096 starting ways up to 46,656 maximum - resolving the full cascade chain in one engine pass, then replaying it step-by-step in the UI.

๐Ÿค–

The Constraint

Describe each sub-system to an AI and iterate - which demands a precise mental model of cascade order, Wild counter logic, board height tracking, and Free Game trigger conditions, or the generated code silently breaks.

02 --Tech Stack

Tech Stack & Approach

The game is a single Next.js (App Router) application in TypeScript, bundled with Turbopack and deployed to Netlify. The key architectural decision is its imperative controller pattern - the React component renders the full game markup once on mount and never re-renders. All subsequent state changes are DOM mutations driven by controller.ts. The game engine (engine.ts) resolves the entire cascade chain synchronously and returns it as a data structure; the controller then replays it visually, step by step.

Simple Slot vs. How Aether Dynasty Is Engineered

โœ• The Simple Slot
  • Pick one random symbol per reel cell - no cascade, no board growth
  • Fixed grid (6ร—4 forever) with static pay-line evaluation
  • React state drives every frame โ†’ stale closure bugs + unnecessary re-renders
โœ“ The Aether Dynasty Approach
  • Cascade engine resolves the full chain (eliminate โ†’ drop โ†’ refill โ†’ expand) in one pass
  • Board heights tracked per-reel; ways = product of all heights (max 6โถ = 46,656)
  • Imperative controller mutates DOM by ID - no React state, no re-render overhead

Stack at a Glance

โ–ฒ
Framework
Next.js ยท TypeScript ยท Turbopack
App RouterStatic ExportNetlify

"Single Next.js app - no database, no server. The cascade engine lives entirely in the browser."

๐ŸŽฐ
Game Engine
engine.ts ยท symbols.ts ยท rules.ts
Cascade ChainWays-PaysBoard Expansion

"The full cascade chain is resolved in a single synchronous engine call and returned as a replay-able data structure."

๐ŸŽจ
Presentation
controller.ts ยท CSS Animations ยท SVG
Imperative DOMPNG SymbolsRuntime SVG

"Symbol art in PNG; astrolabe rune-ring, torches and pillars generated as SVG at runtime. No sprite sheets."

Core Modules

Responsibility
Key Challenge
How It's Solved
โš™๏ธ engine.ts
Resolve full cascade chain per spin.
Correct order: eliminate โ†’ transform โ†’ decrement โ†’ gravity โ†’ refill โ†’ expand.
Single synchronous pass returns array of CascadeStep[] for UI replay.
๐Ÿ•น๏ธ controller.ts
Animate cascade replay + manage UI state.
Play each cascade step at the right speed without React state.
DOM mutation by ID; sequenced with async/await per step.
๐Ÿ“‹ rules.ts
Define pay-table, Wild rules, Free Game trigger.
Ways-pays math: payout = multiplier ร— ways ร— bet.
Per-way multipliers defined per symbol; total ways computed as height product.
03 --Architecture

Architecture & Game Loop

The Cascade Loop

Every spin resolves in two phases. First, the engine computes the entire cascade chain synchronously - the result is an array of steps. Then the controller replays each step visually with timed delays. This separation means the outcome is always known before the first animation frame plays, which makes turbo mode trivial (skip the animation) and keeps the controller decoupled from the engine entirely.

โšก
Spin
๐Ÿ’ฅ
Eliminate
โฌ‡๏ธ
Drop
๐Ÿ“
Expand
๐Ÿ”
Re-evaluate
๐Ÿ’ก

The cascade chain has no fixed length - it continues until no new winning combinations form. In the best case, the board expands every cascade and reaches 46,656 ways, triggering Free Games. The engine handles all of this in a single synchronous call before the first animation frame begins.

The Imperative Controller Pattern

Game.tsx renders the complete game markup once - the board cells, HUD, modals, reels. It never re-renders. On mount, useEffect calls boot() from the controller, which attaches all event listeners and begins the game loop. After that, every visual update is a direct DOM mutation by element ID. This makes it behave more like a game engine than a typical React app - and avoids the stale closure and reconciliation overhead that would come from tracking a cascading board in React state.

๐Ÿ“

engine.ts

Pure logic. Takes the current board + heights + bet, resolves the full cascade chain, returns SpinResult with cascades, totalWin, finalHeights, and a Free Game trigger flag.

๐ŸŽฎ

controller.ts

Boots from useEffect via boot(). Calls the engine on each spin, then replays the cascade steps frame-by-frame through DOM mutations. Owns turbo, auto-spin, and sound.

๐Ÿช™

symbols.ts

Registers 7 symbols + Wild. Each symbol has a weight (frequency on reels) and a per-way multiplier table for 3/4/5/6 matches. PNG asset paths are listed here.

๐Ÿ“‹

rules.ts

Defines paytable values, Wild counter logic, Golden Frame columns (reels 2-5), free-game multiplier progression, Golden Treasure trigger conditions, and the Rs 10M payout cap.

04 --Game Logic

Game Systems & Visual Identity

The board starts at 4 rows ร— 6 reels = 4,096 ways. Each cascade that produces a win expands one participating reel by one row (randomly selected from touched columns), slowly growing the board toward 46,656 ways (6โถ). Ways are always the product of active row heights across all six reels - waysOf(heights) multiplies them together. Reaching the maximum triggers Free Games.

// engine.ts - cascade resolved in one pass, replayed in UI spin(board, heights, bet): SpinResult { cascades: CascadeStep[] // every eliminate โ†’ drop โ†’ refill step totalWin: number // ฮฃ(ways ร— multiplier ร— bet) across all cascades finalHeights: number[] // [h0..h5] after last board expansion maxReached: boolean // 6^6 = 46,656 โ†’ triggers Free Games } // One cascade step (applyCascade) 1. Eliminate winning cells // remove matched symbols 2. Transform Golden Frame โ†’ Wild // counter randomly set 1-3 3. Decrement Wild counters // remove Wild if counter hits 0 4. Apply gravity: survivors fall, gaps rise 5. Refill from top with new symbols 6. expandCols: one touched reel += 1 row // until height === MAX_ROWS (6)

Symbols - The Seven Faces of the Dynasty

Seven symbols populate the reels, weighted so the premium Greek gods appear rarely and the card suits fill frequently. All pays are per-way - the win multiplier is applied once for every matching combination the ways engine finds.

โšก
ZEUS ยท ATHENA ยท APHRODITE
Premium Gods - Low Frequency
Zeus: 0.50ร— / 6Athena: 0.32ร—Aphrodite: 0.24ร—

"High multipliers, low weight. A Zeus cluster on a full-board cascade is the pivotal moment the game is designed around."

โ™ 
โ™ฅ โ™  โ—† โ™ฃ
Card Suits - High Frequency
Heart: 0.20ร—Spade: 0.16ร—Diamond: 0.13ร—Club: 0.10ร—

"Common fillers that keep cascades ticking. Their frequency drives board expansion even when gods don't land."

๐Ÿ†
WILD - Golden Chalice
Survival Counter ยท Substitutes All
Counter: 1-3Golden Frame โ†’ WildReels 2-5 only

"Never placed randomly - only born from a Golden Frame when it's eliminated. Persists through multiple cascades if the counter stays above zero."

Special Features

๐ŸŒŸ Free Games
  • Triggered when the board hits 46,656 ways (all reels at max height)
  • 6 starting games; each elimination that creates a Wild can grant +1 extra (up to 24 total)
  • Rising multiplier - increments every winning spin, capped at 3ร—
โœจ Golden Treasure
  • Triggers when the board hits 46,656 ways inside a Free Games session
  • Randomly picks one symbol type, converts the entire board to it, and resolves continuously
  • Maximum payout: Rs 10,000,000 - the absolute hard cap
Spectral
LightRegularItalicMediumSemi BoldBold
Colour - Neon Antiquity Palette

Deep warm blacks from ancient stone, ink-parchment for text, neon cyan for the holographic layer, gold for divine symbols, and plasma purple for the mystical atmosphere. The tension between stone warmth and neon cold defines the aesthetic.

bg-0
bg-1
stone-d
stone-2
stone-1
ink
neon
neon-2
gold-2
gold-3
plasma
orange

In-Game Screens

The game across its key states - main board, the board expanding through a cascade, a win result, auto-spin and sound configuration, and the transaction history. Click any screen to open it full-size.

05 --The Build

The Vibe-Coding Build Process

Vibe-coding a cascading slot works only if you own the game logic before you open a prompt. I designed the cascade sequence, board expansion rules, symbol weights, per-way multipliers, and Free Game trigger conditions entirely on paper first. Only then did I start prompting - describing one sub-system at a time and verifying each against the spec before layering the next. The AI accelerated every implementation step; the spec made the output trustworthy.

๐Ÿ“

1 ยท Design the Math

Specified the cascade sequence (eliminate โ†’ transform โ†’ decrement โ†’ gravity โ†’ refill โ†’ expand), symbol weights and per-way multipliers, board height rules, and Free Game trigger condition - all verified on paper before a single prompt.

โš™๏ธ

2 ยท Build the Engine

Implemented engine.ts first - the pure cascade resolver that takes a board state and returns the complete chain as CascadeStep[]. Validated payouts manually against known board states before moving on.

๐ŸŽฎ

3 ยท Imperative Controller

Built controller.ts as the only piece that touches the DOM. The boot() pattern keeps React out of the game loop entirely - no state, no re-renders, no stale closures mid-cascade.

๐Ÿ›๏ธ

4 ยท Neon Antiquity Skin

Translated the three-font system (Orbitron / Marcellus SC / Spectral), the stone-and-neon colour palette, the astrolabe rune-ring SVG, and the torch/pillar decorative layer into the CSS and runtime SVG generation layer.

๐Ÿš€

5 ยท Polish & Ship

Added turbo spin (skips animation, shows result instantly), configurable auto-spin, two-channel audio (Music / Effects with individual sliders), transaction history modal, and deployed the static export to Netlify.

06 --Results & Reflection

Outcome & Impact

Key Outcomes

0
Maximum board ways - cascading from 4,096 through board expansion
0
A complete iGaming slot engine running entirely client-side on Netlify

"From 4,096 to 46,656 ways through cascades - seven symbols, a Golden Chalice Wild, Free Games, Golden Treasure, and a Rs 10M payout ceiling - built end-to-end through vibe coding."

๐Ÿ“ˆ Outcome

A shipped, playable browser slot: cascading board expansion (4,096 โ†’ 46,656 ways), 7 weighted symbols, Golden Frame โ†’ Wild transformation, survival-counter Wilds, Free Games with rising multiplier, Golden Treasure feature, configurable auto-spin, and two-channel audio - all client-side.

๐Ÿง— Challenge

Cascade logic has a strict ordering constraint - get eliminate/transform/decrement/gravity/refill/expand wrong and wins are miscounted or Wilds vanish too early. Getting this right through vibe coding required writing the spec before writing a single prompt.

๐Ÿ’ก What I Learned

The imperative controller pattern is the right architecture for a complex game on React - no state, no reconciliation overhead. The AI generated it correctly only after I specified the pattern explicitly. Design-first vibe coding is the only vibe coding that works at this complexity level.

๐Ÿš€ Next Steps

Add a provably-fair seed system so players can verify spin outcomes, implement a progressive jackpot tier above the Golden Treasure feature, and build a leaderboard backed by a lightweight serverless function.