# Technical Analysis — Shogun's Storm

## For Andres

This document is the honest technical breakdown of Sebastian's game vision — what's buildable, how to build it, and where the risks are.

---

## Recommended Tooling

### Primary Recommendation: Phaser.js (2D) via Claude Code

**Why Phaser:**

1. **Best-in-class Claude Code reliability (9/10).** Phaser has an official MCP server and 18 battle-tested Claude Code skill files. This means when Sebastian describes what he wants, Claude Code can generate working Phaser code with high accuracy. This matters more than any other technical factor — Sebastian's workflow IS Claude Code conversation.

2. **The game design maps to 2D beautifully.** Shogun's Storm is a combat game with team composition and atmosphere. A 2D side-view or top-down perspective (like classic fighting games or For Honor's locked perspective) delivers the combat feel without the complexity of 3D camera management, 3D collision, and 3D animation systems.

3. **The atmosphere is achievable in 2D.** Cherry blossom particles, parallax-scrolled castle interiors, black-and-white screen transitions for Ghost Mode, wind effects — these are all well-supported in Phaser with particles, tweens, and camera effects. The atmospheric vision Sebastian described is MORE achievable in 2D than 3D, not less.

4. **Proven with kids.** A 7-year-old built a functioning space shooter with Phaser via Claude Code. The framework is well-documented, has a massive community, and Claude Code generates reliable Phaser code.

5. **Deploys as a shareable URL.** Sebastian wants to send the game to friends. Phaser games run in the browser and can be deployed to itch.io — his friends click a link and play. No installs, no app stores. This directly solves the "send it to friends" requirement.

6. **Controller support.** Phaser has built-in gamepad API support. Xbox controller mapping is straightforward.

**What about 3D?** Sebastian knows Meshy and has built 3D models. Three.js is viable and Claude Code generates excellent Three.js code. However, a 3D fighting game with multiple characters, animations, and boss fights is a significant jump in complexity — camera systems, 3D hitboxes, model rigging and animation, lighting. The recommendation is to start in 2D where the combat feel can be perfected quickly, and consider a 3D version as a "Shogun's Storm 2.0" growth path once the game design is proven.

### Art Pipeline

- **Character sprites:** AI image generation (Nano Banana / Google Gemini) for character art, then sprite sheet creation. Sebastian already has experience with AI image generation from Day 2 — style control, precision prompting.
- **Backgrounds:** AI-generated background layers for parallax scrolling. Castle interior, cherry blossom trees, atmospheric elements.
- **Concept art:** Meshy text-to-3D for character reference models (Sebastian is prolific with this), which can inform 2D sprite design.
- **Animations:** Sprite sheet approach — key poses generated via AI, assembled into animation frames. Fighting game characters typically need: idle, walk, attack (multiple), block, hit reaction, death, and special ability animations.

### Setup Requirements

- Phaser.js (via npm or CDN)
- Phaser MCP server for Claude Code integration
- VS Code or Claude Code as the development environment
- A local HTTP server for testing (Phaser provides one)
- itch.io account for deployment/sharing

---

## MVP Definition

**The minimum build that captures Sebastian's core fantasy: "I'm a samurai fighting alongside my team, and when I activate Ghost Mode, everything changes."**

### MVP Includes:
- Castle Shimura map with cherry blossom particle effects
- Jin Sakai as the first playable character (stances + Ghost Mode)
- Ghost Mode visual effect (black-and-white filter, wind particles, instant kill on non-bosses)
- 2-3 Mongol enemy types with basic AI (approach, attack, block)
- Khotun Khan as a boss with a multi-phase fight
- Health bars, hit feedback (hitstop, screen shake, hit flash, knockback)
- Xbox controller input with Ghost of Tsushima-inspired button mapping
- 1v1 mode against AI (easy/medium/hard)
- Basic team select screen (blue/red)
- Tutorial sequence

### MVP Excludes (for v1.0, added later):
- Full 5-character blue team roster (Jin first, then add Yuna, Ishikawa, etc.)
- 4v4 with invite system (start with 1v1 and 1-player-vs-AI-team)
- Iki Island map (this is the expansion)
- Ryuzo's betrayal mechanic (needs save state — add after core combat works)
- Online/network multiplayer (local first)

### Why this scope:
The core fantasy is the combat feel and Ghost Mode. If Jin feels incredible to play — if the stances work, if the parry lands, if Ghost Mode makes the room go quiet — then the game works. Everything else is expansion on a proven foundation.

---

## Build Sequence

Each session ends with something playable. Each step builds visibly on the last.

### Phase 1: The Arena (Sessions 1-2)

**Session 1 — Jin Moves and Fights**
- Basic scene with placeholder background
- Jin character with idle, walk, and one attack animation
- Xbox controller input (movement + attack button)
- One Mongol enemy that stands and takes hits
- **Add the juice stack:** hitstop on hit (3-5 frame pause), screen shake (2-3 frames), hit flash (white for 1 frame), knockback, hit spark particle, floating damage numbers
- Health bars for both characters

> **Wow moment:** The first time Jin hits the enemy and it FEELS like a real hit — the pause, the shake, the spark. This is where Sebastian will feel it becoming a real game.

**Session 2 — Combat Depth**
- Enemy AI: approach, attack, block cycle (state machine)
- Jin's block/parry mechanic — timing-based, with visual feedback on perfect parry
- Second attack for Jin (different stance)
- Death animation and round reset
- Easy/medium/hard difficulty (changes enemy aggression and parry window)

> **Wow moment:** The first successful parry. The enemy attacks, Sebastian times the block perfectly, and the enemy staggers. This is the mechanic that defines samurai games.

### Phase 2: Ghost Mode and Atmosphere (Sessions 3-4)

**Session 3 — Ghost Mode**
- Ghost Mode activation (LB+RB)
- Screen filter: desaturate to black and white
- Wind particle effect kicks in
- Jin's attacks become instant kills on regular enemies
- Timer bar showing Ghost Mode duration draining
- Cooldown before it can be used again
- Spawn 3-4 enemies to demonstrate the power

> **Wow moment:** Ghost Mode. The screen drains. The wind rises. Jin cuts through everything. This is the signature moment of Shogun's Storm.

**Session 4 — Castle Shimura**
- Parallax background: castle interior layers (far wall, pillars, foreground elements)
- Cherry blossom particle system (constant, gentle, drifting)
- Atmospheric lighting/color palette
- Character select screen (Jin for now, with slots for future characters)
- Team select (blue/red)
- 1v1 mode fully functional with AI difficulty

> **Wow moment:** The first time Sebastian sees Jin fighting inside Castle Shimura with cherry blossoms falling. The game has a WORLD now, not just a fighting arena.

### Phase 3: The Roster (Sessions 5-7)

**Session 5 — Yuna**
- New character: Yuna with unique moveset (daggers, fast attacks, stealth ability)
- Character select screen with Jin and Yuna
- Different animations, different speed, different range
- AI can play as Yuna

**Session 6 — Sensei Ishikawa**
- New character: Ishikawa with bow mechanics (aim, draw, release)
- Ranged combat vs melee creates new tactical dynamics
- AI Ishikawa keeps distance and punishes approach

**Session 7 — Lord Shimura and Ryuzo**
- Two more characters completing the blue team roster
- Lord Shimura: powerful, traditional, slow but heavy hits
- Ryuzo: fast swordsman, aggressive style
- Ryuzo betrayal mechanic: first playthrough on blue, then switches to red (requires simple save state)

### Phase 4: The Boss and Team Mode (Sessions 8-10)

**Session 8 — Khotun Khan**
- Boss character with unique AI: multiple attack patterns, phases
- Cannot be killed by Ghost Mode
- Health bar with phase indicators
- Boss arena within Castle Shimura

**Session 9 — Team Battle**
- 4v4 mode: player picks one character, AI controls teammates and all enemies
- Basic team AI: characters use their unique abilities
- Wave structure or continuous battle

**Session 10 — Multiplayer and Polish**
- Local multiplayer: second controller support for 1v1
- Invite system for friends (if browser-based: share link; if local: controller pairing)
- Tutorial mode
- Title screen, music, sound effects (sword clashes, arrow impacts, Ghost Mode wind)
- Deploy to itch.io

> **Wow moment:** Sebastian sends a link to his friends. They open it. They're playing Shogun's Storm.

### Phase 5: Expansion — Iki Island (Sessions 11+)
- New map: Iki Island with unique atmosphere
- Cherry blossoms only from Kazumasa's memorial location
- Tenzo and raider characters
- The Eagle as new boss
- New enemy types

---

## The Wow-Factor Map

| Session | Wow Moment | Why It Matters |
|---------|-----------|----------------|
| 1 | First hit that FEELS real (juice stack) | Combat goes from "moving sprites" to "a game" |
| 2 | First perfect parry | The signature samurai mechanic — precision rewarded |
| 3 | Ghost Mode activation | The screen drains, the wind rises — cinematic power |
| 4 | Castle Shimura with cherry blossoms | The game has atmosphere — it's a WORLD |
| 5 | Playing as Yuna (different combat style) | The roster concept proves itself — different characters = different games |
| 8 | Khotun Khan boss fight | Ghost Mode can't save you — real challenge |
| 10 | Sending the game to friends | The ultimate validation — other people play YOUR game |

---

## Risk Points

### Where Frustration Might Spike

1. **Parry timing (Session 2).** Getting the parry window to feel right requires playtesting. Too strict = unfair. Too generous = boring. This will need multiple iterations. **Mitigation:** Start with a generous window (200ms), let Sebastian playtest, and tighten it based on what feels right to him. The difficulty modes can have different parry windows (easy: 300ms, medium: 200ms, hard: 100ms).

2. **Character animation (Sessions 5-7).** Each new character needs a full set of sprite animations. AI-generated sprites may not be consistent across frames. **Mitigation:** Start with simple animation (3-4 key frames per action). Style the art intentionally — pixel art or stylized 2D is more forgiving than realistic. Consider a consistent art pipeline early.

3. **AI teammate behavior (Session 9).** Making AI-controlled teammates fight intelligently alongside the player is a hard problem. **Mitigation:** Start simple — AI teammates attack nearby enemies, use abilities on cooldown. "Good enough" AI that's fun to play with is better than sophisticated AI that takes weeks to tune.

4. **Scope creep on the roster.** Sebastian knows a LOT of Ghost of Tsushima characters. The temptation to add more characters before the core combat is solid will be strong. **Mitigation:** The build sequence is designed so that Jin is fully polished (with Ghost Mode and atmosphere) before any other character is added. Each new character is an expansion, not a prerequisite.

5. **Multiplayer networking.** If "send to friends" means online multiplayer (not just local), that's a significant technical challenge. **Mitigation:** v1.0 is local multiplayer + shareable game link. Friends can play the same game separately. Real-time online multiplayer is a growth-path feature, not an MVP feature.

### Where Scope Creep Is Most Likely

- Adding characters before combat feels right
- Wanting online multiplayer immediately
- Expanding to new maps before Castle Shimura is polished
- Adding story/cutscenes before gameplay is solid

**The rule:** If it doesn't make hitting an enemy feel better, it waits.

---

## Session Estimates

| Phase | Sessions | What's Playable After |
|-------|----------|-----------------------|
| Phase 1: The Arena | 2 | Jin fighting enemies with satisfying combat |
| Phase 2: Ghost Mode + Atmosphere | 2 | Ghost Mode working, Castle Shimura looks beautiful |
| Phase 3: The Roster | 3 | 5 unique characters, all playable |
| Phase 4: Boss + Team Mode | 3 | Khotun Khan boss, 4v4 mode, shareable to friends |
| Phase 5: Iki Island | 2+ | Second map, new characters, new boss |

**Total to "v1.0" (shareable game with full Castle Shimura experience): ~10 sessions**

Each session is one focused work period with Claude Code. The game is playable after every single session — there's never a point where Sebastian has built something he can't play.

---

## Integration with Existing Skills

| Skill Sebastian Has | How It Feeds Into Shogun's Storm |
|---------------------|----------------------------------|
| **AI image generation** (Nano Banana, Day 2) | Character sprites, background art, UI elements. He already knows style control and precision prompting. |
| **Meshy text-to-3D** (4+ models, independent use) | Character reference models — generate a 3D Jin Sakai in Meshy, use as reference for 2D sprite design. Could also feed into a future 3D version. |
| **Claude Code workflow** (his primary tool) | The entire game is built through Claude Code conversation. This IS his development environment. |
| **Parametric thinking** (katana project) | Combat tuning — "change the parry window from 200ms to 150ms and see how it feels" is exactly the same parametric approach. |
| **The katana project** (Day 5b) | He studied real blade anatomy. That precision and attention to detail is what makes a combat system feel authentic — every attack has weight because the weapon was designed with care. |

---

## Growth Path

### After v1.0: Immediate Expansions
- **Iki Island** — Second map with new roster, new boss (the Eagle), unique atmosphere
- **More characters** — Each Ghost of Tsushima character Sebastian wants to add
- **Online 1v1** — Share a link, friend joins, you duel in the browser (WebRTC or similar)
- **Sound design** — Sword clashes, arrow impacts, Ghost Mode wind, atmospheric music

### Medium-term: Engine Evolution
- **Three.js 3D version** — Sebastian already knows Meshy. A 3D Shogun's Storm with his own 3D models loaded in is a natural evolution. Same game design, new visual dimension.
- **Roblox port** — If multiplayer with a wider audience becomes a priority. Built-in multiplayer infrastructure. Different art style but massive reach.

### Long-term: Full Engine
- **Unity via MCP** — If the game grows to the point where a full engine is needed. Claude Code can interface with Unity through the CoplayDev MCP (86+ tools, 7,800 GitHub stars). Highest ceiling, heaviest setup.

**The key insight:** The game design is engine-independent. Sebastian's vision document describes the GAME, not the technology. If Shogun's Storm v1.0 in Phaser proves the combat and the feel, the same design can be rebuilt in a more powerful engine later with all the lessons learned. Nothing is wasted.

---

## A Note on Francisco's Game

Sebastian's brother Francisco is building a One Piece fighting/RPG game. They talk about their games, compare progress, and motivate each other. This is fuel. When Sebastian sees Francisco's game progressing, he'll want to push Shogun's Storm further — and vice versa.

The build sequence is designed so that visible progress happens every session. Sebastian will always have something to show.
