Todo List

A comprehensive checklist to track the implementation of CROSS from the database and server architecture to Godot client rendering and Twitch integration.


๐Ÿ—๏ธ Phase 1: Infrastructure & Authentication

  • Keycloak Configuration
    • Set up a new realm for CROSS in the existing Keycloak instance.
    • Configure Twitch OAuth as an external Identity Provider (IdP).
    • Define client scopes for streamers and viewers.
  • Master Server Setup
    • Initialize server repository (C# / .NET 8 / ASP.NET Core Web API).
    • Create shared C# Class Library (CROSS.Shared) for shared models, packets, and combat/mitigation math formulas.
    • Set up Keycloak JWT Bearer authentication middleware.
    • Set up SignalR Hubs for real-time WebSocket overlay and spectator channel communication.
  • Database Setup
    • Spin up PostgreSQL instance.
    • Design and run migration scripts for initial database schemas (see Architecture):
      • users (Twitch ID, username, linkage to Keycloak)
      • characters (level, class, subclass, gold, total_xp, user_id, stamina, str, agi, int, vit, unused_stat_points)
      • inventories (character_id, item_id, quantity, equipped, quality, is_hacked)
      • streamer_rooms (streamer_id, room_type, upgrade_level, resources_contributed)
      • artifacts (id, item_id, serial_number, owner_id)

๐ŸŽฎ Phase 2: Core Game Loop (Server-Authoritative Math)

  • State Machine & Session Manager
    • Implement room damage & health systems.
    • Implement session manager (tracking active stream sessions, spawned waves, and current mob health pools).
    • Implement server-side character state tracking (representing current toggle states: Combat, Support, Navigate, Defend).
  • Combat Calculations
    • Implement enemy wave spawning logic (difficulty scaling based on chat activity/viewer count).
    • Write server-authoritative combat math formulas (damage rolls, critical hits, blocks, and heals calculated on the server per client action request).
    • Implement proximity-based path interception logic (client collision trigger drawing enemy aggro).
  • Anti-Cheat & Economy Sinks
    • Write server-side timing validation for client click streams (macro/autoclicker detection) and silent is_hacked flagging.
    • Implement probability-based item shattering (Brittle Break Sinks) during combat calculations (deleting item entries and destroying hacked gear).
    • Write passive-reward caps and AFK auto-sleep checks (15 minutes of chat/extension inactivity).

๐ŸŒ Phase 3: Twitch Integration & Communication

  • Twitch Chat (IRC) Bot
    • Set up Twitch IRC connection to listen to streamer chats.
    • Implement command parser for state-based viewer actions:
      • !join [race] [class] (e.g., goblin warrior, elf healer)
      • !attack [target] (toggles attack state)
      • !support <username> (toggles support/heal state)
      • !goto <position> (toggles navigate state)
      • !defend (toggles defensive stand state)
    • Hook chat commands into the Master Server session manager.
  • Asset Processing
    • Implement Dynamic Spritesheet Compiler on the Master Server to stitch streamer-uploaded art into single files.
  • Twitch Extension API (MVP Critical)
    • Configure Twitch Developer Console for the CROSS overlay extension.
    • Implement HTTPS endpoint on Master Server to verify Twitch-signed JWTs.
    • Build a lightweight Web client for the extension overlay (Inventory/Skills/Shop UI).

๐ŸŽจ Phase 4: Godot Client (Overlay & Standalone Spectator)

  • Project Initialization
    • Create Godot 4 2D project directory structure.
    • Configure project settings for transparent backgrounds and window stretching.
  • WebSocket Client Integration
    • Implement Godot WebSocket client node.
    • Create parser for incoming state updates (JSON parsing for positions, animations, damage numbers, and health bars).
  • Visual Elements & Animations
    • Design and animate base character templates (Defender, Attacker, Supporter).
    • Create animations for spawn, run, attack, hit, heal, death, and victory.
    • Design and asset-pack room structures (scaffold, tier 1, tier 2, tier 3 blacksmith, tavern, keep).
    • Add floating text system for damage numbers and healing effects.
  • Standalone Spectator Mode
    • Build UI overlay for standalone client allowing players to type a channel name to load and spectate that streamerโ€™s field locally.
    • Synchronize spectator input actions with the Master Server.
  • Build & Export
    • Set up Godot WebGL/HTML5 export template.
    • Build automated export pipeline to bundle files for web hosting.

๐Ÿš€ Phase 5: Testing, Deployment & MVP Launch

  • Verification & Mocking
    • Create a local chat mock script (simulating Twitch chat commands at high volume).
    • Write integration tests for database saves/loads (e.g., verifying gold is saved when a wave ends).
    • Test timing-based click seed verification (anti-cheat simulation).
  • Deployment
    • Deploy Master Server to the root server.
    • Deploy Keycloak configuration.
    • Host Godot WebGL build assets on the web server/CDN.
  • Friends & Family Test
    • Whitelist 2-3 friend streams.
    • Monitor server performance, CPU load, and database write/read latency.
    • Solicit feedback on game balance and Twitch chat responsiveness.

๐Ÿ’Ž Phase 6: Standalone Premium Client Content (Post-MVP / Future)

  • Personal Estates & Housing
    • Implement local database/file saving for offline player housing.
    • Create UI for purchasing and decorating offline estates using prop pools.
  • 2D Side-Scrolling Dungeons
    • Develop side-scrolling level maps with active enemy AI.
    • Code combat skills hotbar, health recovery, and dungeon boss events.
    • Set up exclusive dungeon loot tables (e.g. Starsteel, Dragon Scales).
  • Player Auction House
    • Implement market listings database schema.
    • Code search, buy, and sell transactions with Keycloak auth checks.