# Production Play Screen Implementation Plan ## Overview Create a new production play screen at `templates/game/play.html` with a 3-column layout optimized for immersive gameplay, separate from the dev console. ## Layout Structure ``` +-------------+------------------------+------------------+ | LEFT | MIDDLE | RIGHT | | (280px) | (1fr flex) | (320px) | +-------------+------------------------+------------------+ | Character | Location Header | [History] | | - Name/Lv | - Name, Type, Turn # | [Quests] | | - HP/MP | Ambient Details | [NPCs] | | - Stats | ---------------- | [Map] | | ---------- | DM Response Area | | | Actions | (main narrative) | Each accordion | | [Free] | | independently | | [Premium] | | refreshable | | [Elite] | | | | ---------- | | | | [Talk NPC] | | | | [Travel] | | | +-------------+------------------------+------------------+ ``` ## Files to Create ### Templates | File | Purpose | |------|---------| | `templates/game/play.html` | Main 3-column layout | | `templates/game/partials/character_panel.html` | Left: actions + character stats | | `templates/game/partials/narrative_panel.html` | Middle: DM response + location | | `templates/game/partials/sidebar_history.html` | Right accordion: turn history | | `templates/game/partials/sidebar_quests.html` | Right accordion: active quests | | `templates/game/partials/sidebar_npcs.html` | Right accordion: NPCs at location | | `templates/game/partials/sidebar_map.html` | Right accordion: discovered locations | | `templates/game/partials/job_polling.html` | Job status polling partial | | `templates/game/partials/travel_modal.html` | Travel destination modal | | `templates/game/partials/npc_chat_modal.html` | NPC dialogue modal | ### CSS | File | Purpose | |------|---------| | `static/css/play.css` | All play screen styles | ### Flask Views | File | Purpose | |------|---------| | `app/views/game_views.py` | New blueprint for production game routes | ### Modify | File | Change | |------|--------| | `app/__init__.py` | Register `game_bp` blueprint | ## Flask Routes ```python # Main routes GET /play/session/ # Main play screen GET /play/session//character-panel # Refresh character stats GET /play/session//narrative # Refresh narrative GET /play/session//history # Refresh history accordion GET /play/session//quests # Refresh quests accordion GET /play/session//npcs # Refresh NPCs accordion GET /play/session//map # Refresh map accordion # Action routes POST /play/session//action # Submit action -> job polling GET /play/session//job/ # Poll job status # Modal routes GET /play/session//travel-modal # Get travel modal POST /play/session//travel # Execute travel GET /play/session//npc//chat # Get NPC chat modal POST /play/session//npc//talk # Send message to NPC ``` ## CSS Theme ```css /* Dark fantasy theme matching existing */ --play-bg-primary: #1a1a2a; --play-bg-secondary: #2a2a3a; --play-border: #4a4a5a; /* Action tiers */ --action-free: #3b82f6; /* Blue */ --action-premium: #8b5cf6; /* Purple */ --action-elite: #f59e0b; /* Gold */ /* Resource bars */ --hp-bar-fill: #ef4444; --mp-bar-fill: #3b82f6; ``` ## Action Button Organization **Free Tier (Blue):** 1. Ask Locals for Information (town/tavern) 2. Explore the Area (wilderness/dungeon) 3. Search for Supplies (any) - 2 turn cooldown 4. Rest and Recover (town/tavern/safe) - 3 turn cooldown **Premium Tier (Purple):** 5. Investigate Suspicious Activity (any) 6. Follow a Lead (any) 7. Make Camp (wilderness) - 5 turn cooldown **Elite Tier (Gold):** 8. Consult Ancient Texts (library/town) - 3 turn cooldown 9. Commune with Nature (wilderness) - 4 turn cooldown 10. Seek Audience with Authorities (town) - 5 turn cooldown ## HTMX Patterns ### Action Submission ```html