blacktrigram 0.7.8 โ†’ 0.7.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/ARCHITECTURE.md +2404 -0
  2. package/COMBAT_ARCHITECTURE.md +3322 -0
  3. package/CONTROLS.md +639 -0
  4. package/CRA-ASSESSMENT.md +508 -0
  5. package/DATA_MODEL.md +675 -0
  6. package/ISMS_REFERENCE_MAPPING.md +513 -0
  7. package/SECURITY_ARCHITECTURE.md +1160 -0
  8. package/THREAT_MODEL.md +1163 -0
  9. package/lib/components/screens/intro/IntroScreen3D.js +1 -1
  10. package/lib/components/shared/ui/SplashScreen.js +2 -2
  11. package/lib/data/archetypeClothing.js +1 -1
  12. package/lib/data/archetypePhysicalAttributes.js +158 -1
  13. package/lib/data/archetypePhysicalAttributes.js.map +1 -1
  14. package/lib/data/index.d.ts +14 -0
  15. package/lib/data/index.d.ts.map +1 -0
  16. package/lib/data/index.js +43 -0
  17. package/lib/data/index.js.map +1 -0
  18. package/lib/data/techniqueMappings.js +47 -2
  19. package/lib/data/techniqueMappings.js.map +1 -1
  20. package/lib/data/techniques.js +1 -1
  21. package/lib/hooks/index.d.ts +29 -0
  22. package/lib/hooks/index.d.ts.map +1 -0
  23. package/lib/hooks/index.js +53 -0
  24. package/lib/hooks/index.js.map +1 -0
  25. package/lib/hooks/useDebounce.js +52 -0
  26. package/lib/hooks/useDebounce.js.map +1 -0
  27. package/lib/hooks/usePauseMenu.js +60 -0
  28. package/lib/hooks/usePauseMenu.js.map +1 -0
  29. package/lib/hooks/useResponsiveLayout.js +160 -0
  30. package/lib/hooks/useResponsiveLayout.js.map +1 -0
  31. package/lib/hooks/useWebGLContextLossHandler.js +36 -1
  32. package/lib/hooks/useWebGLContextLossHandler.js.map +1 -1
  33. package/lib/hooks/useWindowSize.js +19 -1
  34. package/lib/hooks/useWindowSize.js.map +1 -1
  35. package/lib/index.d.ts +2 -0
  36. package/lib/index.d.ts.map +1 -1
  37. package/lib/index.js +3 -1
  38. package/package.json +19 -3
package/CONTROLS.md ADDED
@@ -0,0 +1,639 @@
1
+ # ๐ŸŽฎ Black Trigram (ํ‘๊ด˜) - Complete Controls Reference
2
+
3
+ **๐Ÿ” ISMS Alignment:** This document follows [Hack23 Secure Development Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md) documentation requirements.
4
+
5
+ **Version**: 0.5.37
6
+ **Last Updated**: January 2026
7
+ **Status**: โœ… Production Ready
8
+
9
+ This document is the **single source of truth** for all game controls in Black Trigram. It describes the currently implemented control scheme and clearly marks planned future enhancements.
10
+
11
+ ---
12
+
13
+ ## ๐Ÿ“‹ Quick Reference
14
+
15
+ ### Desktop Controls (Currently Implemented)
16
+
17
+ | **Action** | **Key(s)** | **Korean** | **Description** |
18
+ |------------|------------|------------|-----------------|
19
+ | **Stance 1 - โ˜ฐ Geon** | `1` | ๊ฑด (Heaven) | Bone-striking force |
20
+ | **Stance 2 - โ˜ฑ Tae** | `2` | ํƒœ (Lake) | Joint manipulation |
21
+ | **Stance 3 - โ˜ฒ Li** | `3` | ๋ฆฌ (Fire) | Precise nerve strikes |
22
+ | **Stance 4 - โ˜ณ Jin** | `4` | ์ง„ (Thunder) | Stunning techniques |
23
+ | **Stance 5 - โ˜ด Son** | `5` | ์† (Wind) | Continuous pressure |
24
+ | **Stance 6 - โ˜ต Gam** | `6` | ๊ฐ (Water) | Flow and adaptation |
25
+ | **Stance 7 - โ˜ถ Gan** | `7` | ๊ฐ„ (Mountain) | Defensive mastery |
26
+ | **Stance 8 - โ˜ท Gon** | `8` | ๊ณค (Earth) | Grounding techniques |
27
+ | **Technique 1-10** | `Q` `E` `R` `T` `Y` `F` `G` `Z` `X` `C` | ๊ธฐ์ˆ  ์‹คํ–‰ | Execute archetype techniques (3-10 available) |
28
+ | **Movement** | `W` `A` `S` `D` or Arrow Keys | ์ด๋™ | 8-directional tactical positioning |
29
+ | **Attack** | `Space` | ๊ณต๊ฒฉ | Execute current stance technique |
30
+ | **Block/Guard** | `B` | ๋ฐฉ์–ด | Defensive positioning and blocks |
31
+ | **Vital Points Overlay** | `V` | ๊ธ‰์†Œ ํ‘œ์‹œ | Toggle anatomical targeting overlay |
32
+ | **Pause Menu** | `ESC` or `M` | ์ผ์‹œ์ •์ง€ | Pause game / Return to menu |
33
+
34
+ > โœ… **NEW: Zero-Conflict Control Scheme** (Current Version):
35
+ >
36
+ > In **v0.5.37**, all **currently implemented** controls avoid conflicts: technique keys (Q-E-R-T-Y-F-G-Z-X-C) are positioned around WASD for easy reach with your left hand while keeping WASD free for movement.
37
+ >
38
+ > - **Techniques (now)**: Use keys around WASD (Q, E, R, T, Y, F, G, Z, X, C)
39
+ > - **Movement**: WASD remains fully functional
40
+ > - **No browser conflicts**: No function keys or Ctrl shortcuts
41
+ > - **Ergonomic**: All keys within easy reach of left hand
42
+ > - **โš ๏ธ Future Note**: The planned **Advanced Footwork System** (NOT YET IMPLEMENTED) proposes using `X` for **Swap Front Foot** and `Z` for **Short Step**. In that future update, technique bindings for `Z`/`X` may be remapped to avoid conflicts; refer to this document's version header for the active scheme.
43
+
44
+ ### Mobile Controls (Touch Screen)
45
+
46
+ | **Control** | **Location** | **Korean** | **Description** |
47
+ |-------------|--------------|------------|-----------------|
48
+ | **Virtual D-Pad** | Bottom-Left (200px from bottom) | ๊ฐ€์ƒ ๋ฐฉํ–ฅํ‚ค | 8-directional movement (140x140px) |
49
+ | **Attack Button** | Bottom-Right (200px from bottom) | ๊ณต๊ฒฉ ๋ฒ„ํŠผ | Gold โšก button (80x80px) |
50
+ | **Block Button** | Bottom-Right (200px from bottom) | ๋ฐฉ์–ด ๋ฒ„ํŠผ | Blue ๐Ÿ›ก๏ธ button (70x70px) |
51
+ | **Stance Wheel** | Right-Center | ์ž์„ธ ์„ ํƒ | Circular 8-trigram selector (200px) |
52
+ | **Swipe Right โ†’** | Anywhere | ์ „์ง„ | Advance toward opponent |
53
+ | **Swipe Left โ†** | Anywhere | ํ›„ํ‡ด | Retreat from opponent |
54
+ | **Swipe Up โ†‘** | Anywhere | ์ƒ๋‹จ ๊ณต๊ฒฉ | High attack execution |
55
+ | **Swipe Down โ†“** | Anywhere | ํ•˜๋‹จ ๊ณต๊ฒฉ | Low attack execution |
56
+ | **Two-Finger Tap** | Anywhere | ๊ธ‰์†Œ ๋ชจ๋“œ | Toggle vital point targeting mode |
57
+
58
+ > **๐Ÿ†• Enhanced Mobile Layout (v0.6.15+)**:
59
+ >
60
+ > - **Improved Visibility**: On-screen D-Pad and action buttons are positioned 200px from the bottom edge so they don't cover the combat arena.
61
+ > - **TechniqueBar Positioning**: TechniqueBar is positioned closer to the bottom edge at 20px (mobile) / 30px (desktop) to maximize arena visibility while remaining easily reachable.
62
+ > - **No Overlap**: Clear separation between TechniqueBar, on-screen mobile controls (D-Pad / action buttons), and the "Back to Menu" button.
63
+ > - **Portrait Mode**: Full functionality in vertical orientation
64
+ > - **Touch Targets**: Minimum 48px for accessibility compliance (WCAG 2.1 Level AA)
65
+ > - **Z-Index Layering**: On-screen mobile controls (z-index 50) > TechniqueBar (45) > HUD (40)
66
+
67
+ ---
68
+
69
+ ## ๐ŸŽฏ Detailed Control Specifications
70
+
71
+ ### 1. Eight Trigram Stance System (ํŒ”๊ด˜ ์ฒด๊ณ„)
72
+
73
+ The core of Black Trigram combat is the Eight Trigrams stance system from the I Ching (ๆ˜“็ถ“). Each stance has unique combat properties and techniques.
74
+
75
+ #### โ˜ฐ 1: Geon (๊ฑด - Heaven)
76
+ - **Korean Name**: ๊ฑด (Geon)
77
+ - **English**: Heaven
78
+ - **Technique**: ์ฒœ๋‘ฅ๋ฒฝ๋ ฅ (Thunder Strike)
79
+ - **Combat Focus**: ๊ณจ๊ฒฉํƒ€๊ฒฉ (Bone-striking force)
80
+ - **Effects**: Fractures, structural damage
81
+ - **Philosophy**: Direct overwhelming power from above
82
+
83
+ #### โ˜ฑ 2: Tae (ํƒœ - Lake)
84
+ - **Korean Name**: ํƒœ (Tae)
85
+ - **English**: Lake
86
+ - **Technique**: ์œ ์ˆ˜์—ฐํƒ€ (Flowing Strike)
87
+ - **Combat Focus**: ๊ด€์ ˆ์กฐ์ž‘ (Joint manipulation)
88
+ - **Effects**: Dislocations, mobility loss
89
+ - **Philosophy**: Fluid redirection like water
90
+
91
+ #### โ˜ฒ 3: Li (๋ฆฌ - Fire)
92
+ - **Korean Name**: ๋ฆฌ (Li)
93
+ - **English**: Fire
94
+ - **Technique**: ํ™”์—ผ์ง€์ฐฝ (Fire Spear)
95
+ - **Combat Focus**: ์ •๋ฐ€์‹ ๊ฒฝํƒ€๊ฒฉ (Precise nerve strikes)
96
+ - **Effects**: Temporary paralysis, numbness
97
+ - **Philosophy**: Precise burning intensity
98
+
99
+ #### โ˜ณ 4: Jin (์ง„ - Thunder)
100
+ - **Korean Name**: ์ง„ (Jin)
101
+ - **English**: Thunder
102
+ - **Technique**: ๋ฒฝ๋ ฅ์ผ์„ฌ (Lightning Strike)
103
+ - **Combat Focus**: ๊ธฐ์ ˆ๊ธฐ๋ฒ• (Stunning techniques)
104
+ - **Effects**: Disorientation, knockouts
105
+ - **Philosophy**: Explosive shocking power
106
+
107
+ #### โ˜ด 5: Son (์† - Wind)
108
+ - **Korean Name**: ์† (Son)
109
+ - **English**: Wind
110
+ - **Technique**: ์„ ํ’์—ฐ๊ฒฉ (Whirlwind Combo)
111
+ - **Combat Focus**: ์ง€์†์••๋ฐ• (Continuous pressure)
112
+ - **Effects**: Gradual incapacitation
113
+ - **Philosophy**: Persistent grinding assault
114
+
115
+ #### โ˜ต 6: Gam (๊ฐ - Water)
116
+ - **Korean Name**: ๊ฐ (Gam)
117
+ - **English**: Water
118
+ - **Technique**: ์ˆ˜๋ฅ˜๋ฐ˜๊ฒฉ (Flowing Counter)
119
+ - **Combat Focus**: ์ ์‘๋ฐ˜๊ฒฉ (Adaptive counters)
120
+ - **Effects**: Flow reversals, escapes
121
+ - **Philosophy**: Adaptive formless response
122
+
123
+ #### โ˜ถ 7: Gan (๊ฐ„ - Mountain)
124
+ - **Korean Name**: ๊ฐ„ (Gan)
125
+ - **English**: Mountain
126
+ - **Technique**: ๋ฐ˜์„๋ฐฉ์–ด (Rock Defense)
127
+ - **Combat Focus**: ๋ฐฉ์–ด์ „๋ฌธ (Defensive mastery)
128
+ - **Effects**: Blocks, deflections, counters
129
+ - **Philosophy**: Immovable defensive positioning
130
+
131
+ #### โ˜ท 8: Gon (๊ณค - Earth)
132
+ - **Korean Name**: ๊ณค (Gon)
133
+ - **English**: Earth
134
+ - **Technique**: ๋Œ€์ง€ํฌ์˜น (Earth Embrace)
135
+ - **Combat Focus**: ์ง€๋ฉด์ œ์•• (Ground control)
136
+ - **Effects**: Throws, takedowns, locks
137
+ - **Philosophy**: Grounding and overwhelming mass
138
+
139
+ ---
140
+
141
+ ### 2. Archetype Technique System (๊ธฐ์ˆ  ์ฒด๊ณ„)
142
+
143
+ **Implementation**: Q-E-R-T-Y-F-G-Z-X-C keys execute archetype-specific combat techniques (3-10 per archetype)
144
+
145
+ Each player archetype has unique techniques that reflect their combat philosophy. These techniques are more powerful than basic attacks but require Ki and Stamina resources.
146
+
147
+ #### Technique Properties
148
+ - **Keyboard Shortcuts**: `Q` `E` `R` `T` `Y` `F` `G` `Z` `X` `C` (up to 10 techniques)
149
+ - **Resource Cost**: Varies by technique (8-35 stamina, 10-35 Ki)
150
+ - **Cooldown**: 4-12 seconds depending on power level
151
+ - **Damage**: 25-55 base damage (higher than basic attacks)
152
+ - **Stance Requirement**: Some techniques require specific trigram stances
153
+ - **Zero Conflicts**: Keys positioned around WASD for easy access without interfering with movement
154
+
155
+ #### Archetype Technique Examples
156
+
157
+ ##### ๋ฌด์‚ฌ (Musa) - Traditional Warrior
158
+ | Key | Technique | Korean | Damage | Cost | Stance | Description |
159
+ |-----|-----------|--------|--------|------|--------|-------------|
160
+ | `Q` | Thunder Strike | ์ฒœ๋‘ฅ๋ฒฝ๋ ฅ | 25-35 | 30๐Ÿ”‹ 20โšก | โ˜ฐ Geon | Strike with power of heaven |
161
+ | `T` | Iron Defense | ์ฒ ๋ฒฝ๋ฐฉ์–ด | 0-5 | 20๐Ÿ”‹ 15โšก | โ˜ถ Gan | Immovable defensive stance |
162
+ | `E` | Dragon Fist | ์šฉ๊ถŒ | 30-40 | 35๐Ÿ”‹ 25โšก | Any | Pierce through with dragon's might |
163
+ | `R` | Mountain Breaker | ํŒŒ์‚ฐ๊ฒฉ | 35-50 | 40๐Ÿ”‹ 30โšก | โ˜ฐ Geon | Devastating blow that shatters mountains |
164
+
165
+ ##### ์•”์‚ด์ž (Amsalja) - Shadow Assassin
166
+ | Key | Technique | Korean | Damage | Cost | Stance | Description |
167
+ |-----|-----------|--------|--------|------|--------|-------------|
168
+ | `Q` | Shadow Strike | ์•”์˜๊ฒฉ | 20-35 | 25๐Ÿ”‹ 20โšก | โ˜ฒ Li | Strike vital points with shadow speed |
169
+ | `T` | Nerve Strike | ์‹ ๊ฒฝํƒ€ | 15-25 | 30๐Ÿ”‹ 25โšก | Any | Paralyze with precise nerve strikes |
170
+ | `E` | Deadly Precision | ์น˜๋ช…์ •๋ฐ€ | 25-45 | 35๐Ÿ”‹ 30โšก | โ˜ฒ Li | Attack critical points with perfect accuracy |
171
+ | `R` | Silent Death | ๋ฌด์Œ์‚ด | 40-60 | 45๐Ÿ”‹ 35โšก | Any | Deliver a silent, lethal strike |
172
+
173
+ #### Technique Execution Flow
174
+
175
+ 1. **Select Stance** (1-8) - Choose trigram stance for bonuses
176
+ 2. **Check Resources** - Ensure sufficient Stamina (๐Ÿ”‹) and Ki (โšก)
177
+ 3. **Press Technique Key** (Q-E-R-T-Y-F-G-Z-X-C) - Execute the technique
178
+ 4. **Cooldown Period** - Wait 4-12 seconds before reusing (varies by technique)
179
+ 5. **Resource Regeneration** - Stamina and Ki regenerate over time
180
+
181
+ **Note**: Only the first 10 techniques per archetype are assigned keyboard shortcuts. Additional techniques (if any) can be accessed via mouse/touch on the technique bar.
182
+
183
+ #### Technique UI Indicators
184
+
185
+ - **Technique Bar**: Displays available techniques with icons and shortcuts
186
+ - **Green Indicator**: Technique ready to use
187
+ - **Red Indicator**: Insufficient resources or on cooldown
188
+ - **Cooldown Timer**: Shows remaining time before technique available
189
+ - **Resource Costs**: Displays ๐Ÿ”‹ stamina and โšก Ki requirements
190
+
191
+ #### โœ… Zero-Conflict Design
192
+
193
+ **New Control Scheme Eliminates ALL Conflicts**:
194
+ - **Q, E, R, T, Y**: Top row keys around WASD
195
+ - **F, G**: Middle row keys near left hand
196
+ - **Z, X, C**: Bottom row keys under left hand
197
+ - **Result**: No interference with WASD movement, no browser shortcuts, no function keys
198
+
199
+ **Left Hand Layout**:
200
+ ```
201
+ [1][2][3][4][5][6][7][8] โ† Stances
202
+ [Q][W][E][R][T][Y] โ† Techniques (Q,E,R,T,Y) + Movement (W)
203
+ [A][S][D][F][G] โ† Movement (A,S,D) + Techniques (F,G)
204
+ [Z][X][C][V][B] โ† Techniques (Z,X,C) + Vital Points (V) + Block (B)
205
+ [Space] โ† Attack
206
+ ```
207
+
208
+ ---
209
+
210
+ ### 3. Movement Controls (์ด๋™ ์กฐ์ž‘)
211
+
212
+ #### 3.1 Basic Movement
213
+
214
+ **WASD or Arrow Keys** - 8-directional movement
215
+ - **W / โ†‘**: Forward | ์ „์ง„ (Jeonjin)
216
+ - **S / โ†“**: Backward | ํ›„ํ‡ด (Hutoe)
217
+ - **A / โ†**: Left | ์ขŒ (Jwa)
218
+ - **D / โ†’**: Right | ์šฐ (U)
219
+ - **Diagonals**: Combine keys for 45ยฐ angles | ๋Œ€๊ฐ์„  ์ด๋™ (Daegakseon Idong)
220
+
221
+ #### 3.2 Tactical Steps (์ „์ˆ ๋ณด๋ฒ• - Shift+WASD)
222
+
223
+ **Shift + WASD** - Precise 30cm tactical repositioning (18 frames, 300ms)
224
+
225
+ Tactical steps execute committed footwork movements for positional advantage:
226
+
227
+ | **Input** | **Direction** | **Korean** | **Distance** | **Duration** |
228
+ |-----------|---------------|------------|--------------|--------------|
229
+ | `Shift+W` | Forward Step | ์ „์ง„๋ณด๋ฒ• | 30cm | 300ms |
230
+ | `Shift+S` | Retreat Step | ํ›„ํ‡ด๋ณด๋ฒ• | 30cm | 300ms |
231
+ | `Shift+A` | Left Step | ์ขŒ์ธก๋ฉด๋ณด๋ฒ• | 30cm | 300ms |
232
+ | `Shift+D` | Right Step | ์šฐ์ธก๋ฉด๋ณด๋ฒ• | 30cm | 300ms |
233
+ | `Shift+W+A` | Forward-Left | ์ „์ขŒ์ธก๋ณด๋ฒ• | 30cm | 300ms |
234
+ | `Shift+W+D` | Forward-Right | ์ „์šฐ์ธก๋ณด๋ฒ• | 30cm | 300ms |
235
+ | `Shift+S+A` | Back-Left | ํ›„์ขŒ์ธก๋ณด๋ฒ• | 30cm | 300ms |
236
+ | `Shift+S+D` | Back-Right | ํ›„์šฐ์ธก๋ณด๋ฒ• | 30cm | 300ms |
237
+
238
+ **Tactical Step Properties:**
239
+ - โœ… **Non-interruptible**: Committed movement (Priority 5)
240
+ - โœ… **Guard maintained**: Fighting stance preserved
241
+ - โœ… **Stamina cost**: 5 stamina per step
242
+ - โœ… **Precise distance**: Exactly 30cm (one foot width)
243
+
244
+ #### 3.3 Advanced Footwork Patterns (๋ณด๋ฒ• ์ฒด๊ณ„ - Ctrl+WASD)
245
+
246
+ **Ctrl + WASD** - Specialized Korean martial arts footwork patterns
247
+
248
+ Advanced footwork adds 4 distinct movement patterns for tactical combat positioning:
249
+
250
+ ##### Circular Steps (์›ํ˜•๋ณด - Wonhyeongbo) โœ… IMPLEMENTED
251
+ Lateral movement while maintaining guard facing forward.
252
+
253
+ | **Input** | **Pattern** | **Korean** | **Distance** | **Duration** |
254
+ |-----------|-------------|------------|--------------|--------------|
255
+ | `Ctrl+A` | Circular Left | ์›ํ˜•๋ณด ์ขŒ | 30cm lateral | 300ms (18 frames) |
256
+ | `Ctrl+D` | Circular Right | ์›ํ˜•๋ณด ์šฐ | 30cm lateral | 300ms (18 frames) |
257
+
258
+ **Circular Step Properties:**
259
+ - ๐ŸŽฏ **Maintains guard facing**: Body stays oriented toward opponent
260
+ - โšก **Non-interruptible**: Committed footwork (Priority 5)
261
+ - ๐Ÿฅ‹ **Tactical advantage**: Circle around opponent while keeping guard
262
+ - ๐Ÿ“Š **Same distance as tactical steps**: 30cm movement
263
+
264
+ ##### Slide Steps (๋ฏธ๋„๋Ÿผ๋ณด - Mikkeureombo) โœ… IMPLEMENTED
265
+ Both feet move together without weight transfer.
266
+
267
+ | **Input** | **Pattern** | **Korean** | **Distance** | **Duration** |
268
+ |-----------|-------------|------------|--------------|--------------|
269
+ | `Ctrl+W` | Slide Forward | ๋ฏธ๋„๋Ÿผ๋ณด ์ „ | 30cm | 200ms (12 frames) |
270
+ | `Ctrl+S` | Slide Back | ๋ฏธ๋„๋Ÿผ๋ณด ํ›„ | 30cm | 200ms (12 frames) |
271
+
272
+ **Slide Step Properties:**
273
+ - ๐Ÿƒ **Faster than tactical steps**: 200ms vs 300ms
274
+ - ๐Ÿ”„ **Interruptible**: Can be canceled (Priority 4)
275
+ - โš–๏ธ **Stable base**: Both feet move together
276
+ - ๐ŸŽฏ **Good for spacing**: Quick in/out without commitment
277
+
278
+ ##### Pivot Rotations (์ถ•์กฑํšŒ์ „ - Chukjok Hoejeon) โณ PENDING CONTROLS
279
+ 90ยฐ rotation on planted foot for angle changes.
280
+
281
+ | **Input** | **Pattern** | **Korean** | **Rotation** | **Duration** |
282
+ |-----------|-------------|------------|--------------|--------------|
283
+ | _Future Enhancement_ | Pivot Left | ์ถ•์กฑํšŒ์ „ ์ขŒ | 90ยฐ counter-clockwise | 250ms (15 frames) |
284
+ | _Future Enhancement_ | Pivot Right | ์ถ•์กฑํšŒ์ „ ์šฐ | 90ยฐ clockwise | 250ms (15 frames) |
285
+
286
+ **Pivot Properties:**
287
+ - ๐Ÿ”„ **Fast direction change**: 90ยฐ rotation in 250ms
288
+ - ๐ŸŽฏ **Planted foot stays**: One foot is pivot point
289
+ - โšก **Non-interruptible**: Committed rotation (Priority 5)
290
+ - ๐Ÿฅ‹ **Tactical repositioning**: Change facing without retreating
291
+ - โš ๏ธ **Status**: Skeletal animations complete, keyboard controls pending
292
+
293
+ ##### Shuffle Step (์„ž์Œ๋ณด - Seokkeumbo) โณ PENDING CONTROLS
294
+ Quick 15cm micro-adjustment for fine positioning.
295
+
296
+ | **Input** | **Pattern** | **Korean** | **Distance** | **Duration** |
297
+ |-----------|-------------|------------|--------------|--------------|
298
+ | _Future Enhancement_ | Shuffle | ์„ž์Œ๋ณด | 15cm omnidirectional | 100ms (6 frames) |
299
+
300
+ **Shuffle Properties:**
301
+ - โšก **Fastest footwork**: Only 100ms (6 frames)
302
+ - ๐ŸŽฏ **Micro-adjustment**: Half the distance of other steps (15cm)
303
+ - ๐Ÿ”„ **Fully interruptible**: Can cancel anytime (Priority 3)
304
+ - ๐Ÿƒ **Fine-tuning**: Perfect for precise positioning
305
+ - โš ๏ธ **Status**: Skeletal animations complete, keyboard controls pending
306
+
307
+ ##### Footwork Pattern Comparison
308
+
309
+ | Pattern | Korean | Frames | Duration | Distance | Priority | Interruptible | Use Case |
310
+ |---------|--------|--------|----------|----------|----------|---------------|----------|
311
+ | **Tactical Step** | ์ „์ˆ ๋ณด๋ฒ• | 18 | 300ms | 30cm | 5 | โŒ | Standard repositioning |
312
+ | **Circular** | ์›ํ˜•๋ณด | 18 | 300ms | 30cm | 5 | โŒ | Lateral while maintaining guard |
313
+ | **Pivot** | ์ถ•์กฑํšŒ์ „ | 15 | 250ms | 90ยฐ | 5 | โŒ | Fast angle changes โš ๏ธ _Controls pending_ |
314
+ | **Slide** | ๋ฏธ๋„๋Ÿผ๋ณด | 12 | 200ms | 30cm | 4 | โœ… | Quick in/out spacing |
315
+ | **Shuffle** | ์„ž์Œ๋ณด | 6 | 100ms | 15cm | 3 | โœ… | Micro-adjustments โš ๏ธ _Controls pending_ |
316
+
317
+ **Movement Control Philosophy:**
318
+ - **Regular WASD**: Continuous movement, no commitment
319
+ - **Shift+WASD**: Tactical steps with commitment (30cm)
320
+ - **Ctrl+A/D**: Circular footwork (lateral movement)
321
+ - **Ctrl+W/S**: Slide footwork (quick spacing)
322
+ - **Note**: Pivot and Shuffle controls TBD (animations ready, awaiting keybinding)
323
+
324
+ ---
325
+
326
+ **Current Implementation**: Simple 8-directional movement on arena grid
327
+
328
+ | **Keys** | **Action** | **Description** |
329
+ |----------|------------|-----------------|
330
+ | `W` or `โ†‘` | Move Up/North | Move one grid cell north |
331
+ | `A` or `โ†` | Move Left/West | Move one grid cell west |
332
+ | `S` or `โ†“` | Move Down/South | Move one grid cell south |
333
+ | `D` or `โ†’` | Move Right/East | Move one grid cell east |
334
+ | `W+A` or `โ†–` | Move Northwest | Diagonal movement northwest |
335
+ | `W+D` or `โ†—` | Move Northeast | Diagonal movement northeast |
336
+ | `S+A` or `โ†™` | Move Southwest | Diagonal movement southwest |
337
+ | `S+D` or `โ†˜` | Move Southeast | Diagonal movement southeast |
338
+
339
+ **Movement Properties**:
340
+ - Speed varies by stance (fast stances: Geon/Son, slow stances: Gon/Jin)
341
+ - Stamina cost: 5-7 per cell moved
342
+ - Animation: 8-10 frames per movement
343
+ - Boundaries: Octagonal arena with out-of-bounds detection
344
+
345
+ ---
346
+
347
+ ### 3. Combat Actions (์ „ํˆฌ ์กฐ์ž‘)
348
+
349
+ #### Attack (Space)
350
+ - **Key**: `Spacebar`
351
+ - **Korean**: ๊ณต๊ฒฉ (Gonggyeok)
352
+ - **Function**: Execute the current stance's primary technique
353
+ - **Properties**:
354
+ - Damage determined by stance and vital point targeting
355
+ - Stamina cost: 8-15 depending on technique
356
+ - Animation frames: 12-20
357
+ - Range: Melee (adjacent cells)
358
+ - Can be blocked or parried
359
+
360
+ #### Block/Guard (B)
361
+ - **Key**: `B`
362
+ - **Korean**: ๋ฐฉ์–ด (Bang-eo)
363
+ - **Function**: Enter defensive guard position
364
+ - **Properties**:
365
+ - Reduces incoming damage by stance-specific percentage
366
+ - Stamina cost: 3 (tap) or 2/sec (hold)
367
+ - Vital Resistance Bonus: +15-30% depending on stance
368
+ - Best stances for blocking: Gan (Mountain), Gon (Earth)
369
+
370
+ ---
371
+
372
+ ### 4. Special Features (ํŠน์ˆ˜ ๊ธฐ๋Šฅ)
373
+
374
+ #### Vital Points Overlay (V)
375
+ - **Key**: `V`
376
+ - **Korean**: ๊ธ‰์†Œ ํ‘œ์‹œ (Geupso Pyosi)
377
+ - **Function**: Toggle anatomical vital point overlay
378
+ - **Features**:
379
+ - Shows all 70 authentic vital points
380
+ - Filter by severity (Lethal, Critical, Major, Moderate, Minor)
381
+ - Filter by body region (Head, Torso, Arms, Legs)
382
+ - Search by Korean or English name
383
+ - Scale adjustment (0.5x - 2.0x)
384
+ - Label toggle
385
+ - Animation toggle
386
+
387
+ #### Pause/Menu (ESC or M)
388
+ - **Keys**: `ESC` or `M`
389
+ - **Korean**: ์ผ์‹œ์ •์ง€ (Ilsijeongji)
390
+ - **Function**: Pause game or return to menu
391
+ - **Options in Pause Menu**:
392
+ - Resume (๋‹ค์‹œ ์‹œ์ž‘)
393
+ - Restart Match (์žฌ์‹œํ•ฉ)
394
+ - Return to Menu (๋ฉ”๋‰ด๋กœ ๋Œ์•„๊ฐ€๊ธฐ)
395
+ - Audio Volume Controls
396
+
397
+ ---
398
+
399
+ ### 5. Mobile Touch Controls (๋ชจ๋ฐ”์ผ ํ„ฐ์น˜ ์กฐ์ž‘)
400
+
401
+ Black Trigram provides comprehensive touch controls optimized for mobile devices (375x667px and larger).
402
+
403
+ #### Virtual D-Pad (๊ฐ€์ƒ ๋ฐฉํ–ฅํ‚ค)
404
+ - **Location**: Bottom-left corner
405
+ - **Size**: 140x140px total, 48x48px buttons
406
+ - **Function**: 8-directional movement
407
+ - **Safe Area**: 34px from bottom for iOS/Android notches
408
+ - **Haptic Feedback**: Light vibration (10ms) on direction press
409
+
410
+ #### Action Buttons (ํ–‰๋™ ๋ฒ„ํŠผ)
411
+ - **Location**: Bottom-right corner
412
+ - **Attack Button**:
413
+ - Size: 80x80px
414
+ - Icon: โšก (Gold)
415
+ - Function: Execute stance technique
416
+ - Haptic: Medium vibration (50ms)
417
+ - **Block Button**:
418
+ - Size: 70x70px
419
+ - Icon: ๐Ÿ›ก๏ธ (Blue)
420
+ - Function: Activate guard
421
+ - Haptic: Medium vibration (50ms)
422
+
423
+ #### Stance Wheel (์ž์„ธ ํœ )
424
+ - **Location**: Bottom-center
425
+ - **Size**: 200px diameter when expanded
426
+ - **Function**: Select one of 8 trigram stances
427
+ - **Layout**: Circular with 8 trigram symbols
428
+ - **Activation**: Tap to expand, tap symbol to select
429
+ - **Korean Names**: ๊ฑด ํƒœ ๋ฆฌ ์ง„ ์† ๊ฐ ๊ฐ„ ๊ณค
430
+ - **Haptic**: Light vibration (10ms) on selection
431
+
432
+ #### Gesture Controls (์ œ์Šค์ฒ˜ ์กฐ์ž‘)
433
+ - **Swipe Right** (โ†’): Advance/forward dash
434
+ - **Swipe Left** (โ†): Retreat/backward dash
435
+ - **Swipe Up** (โ†‘): High attack/jump attack
436
+ - **Swipe Down** (โ†“): Low attack/sweep
437
+ - **Two-Finger Tap**: Toggle vital point overlay
438
+
439
+ #### Mobile Haptic Feedback
440
+ - **Light** (10ms): Menu navigation, D-pad movement
441
+ - **Medium** (50ms): Attack execution, block activation
442
+ - **Heavy** (100ms): Critical hits, vital point strikes, match events
443
+
444
+ ---
445
+
446
+ ## ๐Ÿšง Future Control Enhancements (Planned)
447
+
448
+ The following controls are documented in `game-design.md` but **NOT YET IMPLEMENTED**. They are planned for future releases.
449
+
450
+ ### Advanced Footwork System (PLANNED)
451
+
452
+ #### Swap Front Foot (X)
453
+ - **Status**: ๐Ÿšง Not Implemented
454
+ - **Key**: `X`
455
+ - **Function**: Mirror stance by swapping which foot is forward
456
+ - **Properties**:
457
+ - Stamina cost: 2
458
+ - Frames: 6
459
+ - No position change
460
+ - Changes attack/defense angles
461
+
462
+ #### Short Step (Z + Arrow)
463
+ - **Status**: ๐Ÿšง Not Implemented
464
+ - **Keys**: `Z` + Direction Arrow
465
+ - **Function**: Move one cell while keeping current front foot forward
466
+ - **Properties**:
467
+ - Stamina cost: 5
468
+ - Frames: 10
469
+ - No auto-pivot
470
+ - Maintains attack angle
471
+
472
+ #### Step & Swap (X + Arrow)
473
+ - **Status**: ๐Ÿšง Not Implemented
474
+ - **Keys**: `X` + Direction Arrow
475
+ - **Function**: Mirror foot, then move one cell
476
+ - **Properties**:
477
+ - Stamina cost: 10
478
+ - Frames: 14
479
+ - Changes both position and foot
480
+ - Full orientation change
481
+
482
+ ### Advanced Attack System (PLANNED)
483
+
484
+ #### Directional Attacks (PLANNED)
485
+ - **Space + โ†‘**: Front-leg kick (12 stamina, 16 frames)
486
+ - **Space + โ†**: Front-elbow strike (10 stamina, 14 frames)
487
+ - **Space + โ†“**: Front-knee strike (10 stamina, 14 frames)
488
+ - **Space + โ†’**: Back-hand strike (9 stamina, 13 frames)
489
+
490
+ #### Rotational Backcast (PLANNED)
491
+ - **Keys**: `Space` then `โ†“` in same frame
492
+ - **Function**: 180ยฐ pivot + spinning back strike
493
+ - **Properties**:
494
+ - Stamina cost: 15
495
+ - Frames: 20 (10 pivot + 10 strike)
496
+ - Full position reversal
497
+
498
+ #### Queued Attacks (PLANNED)
499
+ - **Keys**: Hold `Space+Arrow` during movement
500
+ - **Function**: Queue attack to execute immediately after movement lands
501
+ - **Properties**:
502
+ - Reduces reaction time
503
+ - Enables smooth combos
504
+
505
+ ---
506
+
507
+ ## โš™๏ธ Control Customization
508
+
509
+ ### Current State
510
+ - Controls are **hardcoded** with defaults defined in `src/utils/controlMapping.ts`
511
+ - No in-game customization UI currently available
512
+ - LocalStorage persistence implemented but not exposed to users
513
+
514
+ ### Planned Customization Features
515
+ - [ ] In-game control remapping UI
516
+ - [ ] Preset control schemes (Classic, FPS-style, Fighting Game)
517
+ - [ ] Gamepad support with customization
518
+ - [ ] Control conflict detection and resolution
519
+ - [ ] Export/import control configurations
520
+
521
+ ---
522
+
523
+ ## ๐ŸŽฎ Control Design Philosophy
524
+
525
+ ### Principles
526
+ 1. **Accessibility First**: All actions available via keyboard, mouse, touch, and gamepad
527
+ 2. **No Hidden Inputs**: All controls clearly documented and discoverable
528
+ 3. **Muscle Memory**: Consistent key positions across all screens
529
+ 4. **Cultural Respect**: Korean terminology and philosophy integrated authentically
530
+ 5. **60fps Responsive**: All inputs processed at 60Hz with minimal latency
531
+
532
+ ### Korean Martial Arts Integration
533
+ - **8 Stances** based on I Ching trigrams (ํŒ”๊ด˜)
534
+ - **70 Vital Points** from Korean martial arts anatomy (๊ธ‰์†Œ)
535
+ - **Authentic Techniques** with Korean and English names
536
+ - **Philosophy-Driven**: Each stance embodies a natural element's combat principle
537
+
538
+ ---
539
+
540
+ ## ๐Ÿ“ฑ Platform-Specific Notes
541
+
542
+ ### Desktop
543
+ - โœ… Full keyboard support
544
+ - โœ… Mouse support for menus
545
+ - โš ๏ธ Gamepad support planned but not implemented
546
+ - Target: 60fps at 1920x1080
547
+
548
+ ### Mobile
549
+ - โœ… Touch controls (375x667px minimum)
550
+ - โœ… Gesture recognition
551
+ - โœ… Haptic feedback
552
+ - โœ… Safe area aware (iOS/Android notches)
553
+ - Target: 30-60fps on mid-range devices
554
+
555
+ ### Tablet
556
+ - โœ… Touch controls scaled for larger screens
557
+ - โœ… Landscape and portrait modes
558
+ - โš ๏ธ Stylus support planned
559
+ - Target: 60fps at 1024x768+
560
+
561
+ ---
562
+
563
+ ## ๐Ÿงช Testing Controls
564
+
565
+ ### Manual Testing Checklist
566
+ - [ ] All 8 stances accessible via 1-8 keys
567
+ - [ ] WASD and Arrow keys both work for movement
568
+ - [ ] Spacebar executes attacks in all stances
569
+ - [ ] B key activates block in all stances
570
+ - [ ] V key toggles vital points overlay
571
+ - [ ] ESC and M both open pause menu
572
+ - [ ] Mobile D-pad responds to all 8 directions
573
+ - [ ] Mobile attack/block buttons responsive
574
+ - [ ] Mobile stance wheel selects all 8 stances
575
+ - [ ] Gesture recognition works (swipes, two-finger tap)
576
+ - [ ] Haptic feedback triggers correctly
577
+
578
+ ### Automated Testing
579
+ - Control mapping tests: `src/utils/controlMapping.test.ts`
580
+ - Keyboard controls tests: `src/hooks/useKeyboardControls.test.ts`
581
+ - Combat controls tests: `src/components/combat/components/CombatControlsPanel.test.tsx`
582
+ - Mobile controls tests: `src/components/mobile/ActionButtons.test.tsx`
583
+
584
+ ---
585
+
586
+ ## ๐Ÿ“– References
587
+
588
+ ### Code Implementation
589
+ - **Control Mapping**: `src/utils/controlMapping.ts`
590
+ - **Combat Controls**: `src/systems/types.ts` (line 744: `COMBAT_CONTROLS`)
591
+ - **Keyboard Hooks**: `src/hooks/useKeyboardControls.ts`
592
+ - **Mobile Controls**: `src/components/mobile/*`
593
+ - **Controls Screen**: `src/components/screens/controls/ControlsScreen3D.tsx`
594
+
595
+ ### Documentation
596
+ - **Game Design**: `game-design.md` (lines 939-1133: Combat Controls & Stamina)
597
+ - **README Controls**: `README.md` (lines 213-287: Combat Controls section)
598
+ - **Game Status**: `game-status.md` (Overall implementation: 7.9/10)
599
+
600
+ ### Testing
601
+ - **E2E Controls Test**: `cypress/e2e/screens/controls-screen.cy.ts`
602
+ - **Combat Screen Test**: `cypress/e2e/screens/combat-screen.cy.ts`
603
+ - **Unit Tests**: Multiple files in `src/` directories
604
+
605
+ ---
606
+
607
+ ## ๐Ÿ“ Version History
608
+
609
+ | Version | Date | Changes |
610
+ |---------|------|---------|
611
+ | 0.5.44 | Jan 2026 | **โœ… FIXED: Arrow key bug** - ArrowUp now moves UP, ArrowDown moves DOWN (inverted forward mapping). Enhanced ControlsScreen with complete documentation including techniques, movement, and special features. |
612
+ | 0.5.37 | Jan 2026 | **Zero-conflict control redesign**: Technique keys changed from Q-W-E-R-T-Y-U-I-O-P to Q-E-R-T-Y-F-G-Z-X-C to eliminate WASD movement conflicts |
613
+ | 0.5.37 | Jan 2026 | Initial comprehensive controls documentation |
614
+ | 0.5.36 | Dec 2025 | Vital points overlay (V key) implemented |
615
+ | 0.5.30 | Nov 2025 | Mobile touch controls complete |
616
+ | 0.5.20 | Oct 2025 | Eight trigram stances finalized |
617
+
618
+ ---
619
+
620
+ ## ๐Ÿ’ก Tips for Players
621
+
622
+ ### Combat Effectiveness
623
+ - **Master Stances**: Each trigram has strengths against specific body regions
624
+ - **Mix Movement**: Don't just face-tank - positioning matters
625
+ - **Block Timing**: Tap B right before impact for bonus resistance
626
+ - **Vital Points**: Press V to study anatomy and target critical zones
627
+ - **Stance Cycling**: 1-8 keys cycle quickly - find your flow
628
+
629
+ ### Mobile Players
630
+ - **Two-Handed**: Use D-pad with left thumb, buttons with right
631
+ - **Swipe Combos**: Combine swipes with button taps for variety
632
+ - **Stance Wheel**: Master quick taps - don't hold the wheel open
633
+ - **Haptics**: Feel the feedback - it tells you when inputs register
634
+
635
+ ---
636
+
637
+ **ํ‘๊ด˜์˜ ๊ธธ์„ ๊ฑธ์–ด๋ผ** - _Walk the Path of the Black Trigram_
638
+
639
+ ๐Ÿฅ‹ Master the controls. Master the combat. Master the art. ๐Ÿฅ‹