Skip to main content

Technology Stack

Project Structure

Key Components

SlotGrid

Renders the 5×3 slot machine grid with spinning animations.

PatternOverlay

Displays pattern match animations when patterns are detected.

Game Modals

  • MarketModal - Buy items with score
  • InventoryModal - View owned items
  • RelicModal - Equip relics
  • InfoModal - Game rules and info
  • PrizePoolModal - Current prize pool

Custom Hooks

useController

Manages Cartridge Controller connection:

useAbyssGame

Provides contract interaction functions and manages optimistic state:

State Management

Game state is managed with React hooks:

Contract Interaction Flow

Pattern Detection

Patterns are detected client-side for immediate feedback:
The client calculation matches the contract logic exactly, but the contract result is the source of truth for scoring.

Animation System

Uses Framer Motion for smooth animations:
  • Level Up - Celebration animation
  • Pattern Highlights - Box highlighting matched symbols
  • Score Popups - Floating score numbers
  • Relic Activation - Cinematic relic reveal
  • 666 Game Over - Dramatic game end

Sound System

Sounds: spin, win, jackpot, game-over, level-up