@zigrivers/scaffold 3.4.1 → 3.5.1

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 (195) hide show
  1. package/README.md +91 -0
  2. package/content/knowledge/game/game-accessibility.md +328 -0
  3. package/content/knowledge/game/game-ai-patterns.md +567 -0
  4. package/content/knowledge/game/game-asset-pipeline.md +363 -0
  5. package/content/knowledge/game/game-audio-design.md +344 -0
  6. package/content/knowledge/game/game-binary-vcs-strategy.md +396 -0
  7. package/content/knowledge/game/game-design-document.md +269 -0
  8. package/content/knowledge/game/game-domain-patterns.md +299 -0
  9. package/content/knowledge/game/game-economy-design.md +355 -0
  10. package/content/knowledge/game/game-engine-selection.md +242 -0
  11. package/content/knowledge/game/game-input-systems.md +379 -0
  12. package/content/knowledge/game/game-level-content-design.md +483 -0
  13. package/content/knowledge/game/game-liveops-analytics.md +280 -0
  14. package/content/knowledge/game/game-localization.md +323 -0
  15. package/content/knowledge/game/game-milestone-definitions.md +337 -0
  16. package/content/knowledge/game/game-modding-ugc.md +390 -0
  17. package/content/knowledge/game/game-narrative-design.md +404 -0
  18. package/content/knowledge/game/game-networking.md +393 -0
  19. package/content/knowledge/game/game-performance-budgeting.md +389 -0
  20. package/content/knowledge/game/game-platform-certification.md +417 -0
  21. package/content/knowledge/game/game-project-structure.md +360 -0
  22. package/content/knowledge/game/game-save-systems.md +452 -0
  23. package/content/knowledge/game/game-testing-strategy.md +470 -0
  24. package/content/knowledge/game/game-ui-patterns.md +477 -0
  25. package/content/knowledge/game/game-vr-ar-design.md +313 -0
  26. package/content/knowledge/review/review-art-bible.md +305 -0
  27. package/content/knowledge/review/review-game-design.md +303 -0
  28. package/content/knowledge/review/review-game-economy.md +272 -0
  29. package/content/knowledge/review/review-game-ui.md +293 -0
  30. package/content/knowledge/review/review-netcode.md +280 -0
  31. package/content/knowledge/review/review-platform-cert.md +341 -0
  32. package/content/methodology/custom-defaults.yml +25 -0
  33. package/content/methodology/deep.yml +25 -0
  34. package/content/methodology/game-overlay.yml +145 -0
  35. package/content/methodology/mvp.yml +25 -0
  36. package/content/pipeline/architecture/ai-behavior-design.md +87 -0
  37. package/content/pipeline/architecture/netcode-spec.md +86 -0
  38. package/content/pipeline/architecture/review-netcode.md +78 -0
  39. package/content/pipeline/foundation/performance-budgets.md +91 -0
  40. package/content/pipeline/modeling/narrative-bible.md +84 -0
  41. package/content/pipeline/pre/game-design-document.md +90 -0
  42. package/content/pipeline/pre/review-gdd.md +74 -0
  43. package/content/pipeline/quality/analytics-telemetry.md +98 -0
  44. package/content/pipeline/quality/live-ops-plan.md +99 -0
  45. package/content/pipeline/quality/platform-cert-prep.md +129 -0
  46. package/content/pipeline/quality/playtest-plan.md +84 -0
  47. package/content/pipeline/specification/art-bible.md +87 -0
  48. package/content/pipeline/specification/audio-design.md +97 -0
  49. package/content/pipeline/specification/content-structure-design.md +142 -0
  50. package/content/pipeline/specification/economy-design.md +105 -0
  51. package/content/pipeline/specification/game-accessibility.md +82 -0
  52. package/content/pipeline/specification/game-ui-spec.md +97 -0
  53. package/content/pipeline/specification/input-controls-spec.md +81 -0
  54. package/content/pipeline/specification/localization-plan.md +113 -0
  55. package/content/pipeline/specification/modding-ugc-spec.md +116 -0
  56. package/content/pipeline/specification/online-services-spec.md +104 -0
  57. package/content/pipeline/specification/review-economy.md +87 -0
  58. package/content/pipeline/specification/review-game-ui.md +73 -0
  59. package/content/pipeline/specification/save-system-spec.md +116 -0
  60. package/dist/cli/commands/adopt.d.ts.map +1 -1
  61. package/dist/cli/commands/adopt.js +25 -0
  62. package/dist/cli/commands/adopt.js.map +1 -1
  63. package/dist/cli/commands/adopt.test.js +28 -1
  64. package/dist/cli/commands/adopt.test.js.map +1 -1
  65. package/dist/cli/commands/build.test.js +3 -0
  66. package/dist/cli/commands/build.test.js.map +1 -1
  67. package/dist/cli/commands/init.d.ts +1 -0
  68. package/dist/cli/commands/init.d.ts.map +1 -1
  69. package/dist/cli/commands/init.js +6 -0
  70. package/dist/cli/commands/init.js.map +1 -1
  71. package/dist/cli/commands/init.test.js +12 -1
  72. package/dist/cli/commands/init.test.js.map +1 -1
  73. package/dist/cli/commands/knowledge.test.js +8 -0
  74. package/dist/cli/commands/knowledge.test.js.map +1 -1
  75. package/dist/cli/commands/next.d.ts.map +1 -1
  76. package/dist/cli/commands/next.js +19 -5
  77. package/dist/cli/commands/next.js.map +1 -1
  78. package/dist/cli/commands/next.test.js +56 -0
  79. package/dist/cli/commands/next.test.js.map +1 -1
  80. package/dist/cli/commands/rework.d.ts.map +1 -1
  81. package/dist/cli/commands/rework.js +11 -2
  82. package/dist/cli/commands/rework.js.map +1 -1
  83. package/dist/cli/commands/rework.test.js +5 -0
  84. package/dist/cli/commands/rework.test.js.map +1 -1
  85. package/dist/cli/commands/run.d.ts.map +1 -1
  86. package/dist/cli/commands/run.js +54 -4
  87. package/dist/cli/commands/run.js.map +1 -1
  88. package/dist/cli/commands/run.test.js +384 -0
  89. package/dist/cli/commands/run.test.js.map +1 -1
  90. package/dist/cli/commands/skip.test.js +3 -0
  91. package/dist/cli/commands/skip.test.js.map +1 -1
  92. package/dist/cli/commands/status.d.ts.map +1 -1
  93. package/dist/cli/commands/status.js +16 -3
  94. package/dist/cli/commands/status.js.map +1 -1
  95. package/dist/cli/commands/status.test.js +55 -0
  96. package/dist/cli/commands/status.test.js.map +1 -1
  97. package/dist/cli/output/auto.d.ts +3 -0
  98. package/dist/cli/output/auto.d.ts.map +1 -1
  99. package/dist/cli/output/auto.js +9 -0
  100. package/dist/cli/output/auto.js.map +1 -1
  101. package/dist/cli/output/context.d.ts +6 -0
  102. package/dist/cli/output/context.d.ts.map +1 -1
  103. package/dist/cli/output/context.js.map +1 -1
  104. package/dist/cli/output/context.test.js +87 -0
  105. package/dist/cli/output/context.test.js.map +1 -1
  106. package/dist/cli/output/error-display.test.js +3 -0
  107. package/dist/cli/output/error-display.test.js.map +1 -1
  108. package/dist/cli/output/interactive.d.ts +3 -0
  109. package/dist/cli/output/interactive.d.ts.map +1 -1
  110. package/dist/cli/output/interactive.js +76 -0
  111. package/dist/cli/output/interactive.js.map +1 -1
  112. package/dist/cli/output/json.d.ts +3 -0
  113. package/dist/cli/output/json.d.ts.map +1 -1
  114. package/dist/cli/output/json.js +9 -0
  115. package/dist/cli/output/json.js.map +1 -1
  116. package/dist/config/loader.d.ts.map +1 -1
  117. package/dist/config/loader.js +3 -2
  118. package/dist/config/loader.js.map +1 -1
  119. package/dist/config/schema.d.ts +641 -15
  120. package/dist/config/schema.d.ts.map +1 -1
  121. package/dist/config/schema.js +26 -1
  122. package/dist/config/schema.js.map +1 -1
  123. package/dist/config/schema.test.js +192 -1
  124. package/dist/config/schema.test.js.map +1 -1
  125. package/dist/core/assembly/overlay-loader.d.ts +24 -0
  126. package/dist/core/assembly/overlay-loader.d.ts.map +1 -0
  127. package/dist/core/assembly/overlay-loader.js +190 -0
  128. package/dist/core/assembly/overlay-loader.js.map +1 -0
  129. package/dist/core/assembly/overlay-loader.test.d.ts +2 -0
  130. package/dist/core/assembly/overlay-loader.test.d.ts.map +1 -0
  131. package/dist/core/assembly/overlay-loader.test.js +106 -0
  132. package/dist/core/assembly/overlay-loader.test.js.map +1 -0
  133. package/dist/core/assembly/overlay-resolver.d.ts +15 -0
  134. package/dist/core/assembly/overlay-resolver.d.ts.map +1 -0
  135. package/dist/core/assembly/overlay-resolver.js +58 -0
  136. package/dist/core/assembly/overlay-resolver.js.map +1 -0
  137. package/dist/core/assembly/overlay-resolver.test.d.ts +2 -0
  138. package/dist/core/assembly/overlay-resolver.test.d.ts.map +1 -0
  139. package/dist/core/assembly/overlay-resolver.test.js +246 -0
  140. package/dist/core/assembly/overlay-resolver.test.js.map +1 -0
  141. package/dist/core/assembly/overlay-state-resolver.d.ts +26 -0
  142. package/dist/core/assembly/overlay-state-resolver.d.ts.map +1 -0
  143. package/dist/core/assembly/overlay-state-resolver.js +63 -0
  144. package/dist/core/assembly/overlay-state-resolver.js.map +1 -0
  145. package/dist/core/assembly/overlay-state-resolver.test.d.ts +2 -0
  146. package/dist/core/assembly/overlay-state-resolver.test.d.ts.map +1 -0
  147. package/dist/core/assembly/overlay-state-resolver.test.js +256 -0
  148. package/dist/core/assembly/overlay-state-resolver.test.js.map +1 -0
  149. package/dist/core/assembly/preset-loader.d.ts +1 -0
  150. package/dist/core/assembly/preset-loader.d.ts.map +1 -1
  151. package/dist/core/assembly/preset-loader.js +2 -0
  152. package/dist/core/assembly/preset-loader.js.map +1 -1
  153. package/dist/core/dependency/eligibility.test.js +3 -0
  154. package/dist/core/dependency/eligibility.test.js.map +1 -1
  155. package/dist/e2e/game-pipeline.test.d.ts +10 -0
  156. package/dist/e2e/game-pipeline.test.d.ts.map +1 -0
  157. package/dist/e2e/game-pipeline.test.js +298 -0
  158. package/dist/e2e/game-pipeline.test.js.map +1 -0
  159. package/dist/e2e/init.test.js +3 -0
  160. package/dist/e2e/init.test.js.map +1 -1
  161. package/dist/project/adopt.d.ts +3 -1
  162. package/dist/project/adopt.d.ts.map +1 -1
  163. package/dist/project/adopt.js +29 -1
  164. package/dist/project/adopt.js.map +1 -1
  165. package/dist/project/adopt.test.js +51 -1
  166. package/dist/project/adopt.test.js.map +1 -1
  167. package/dist/types/config.d.ts +50 -4
  168. package/dist/types/config.d.ts.map +1 -1
  169. package/dist/types/config.test.d.ts +2 -0
  170. package/dist/types/config.test.d.ts.map +1 -0
  171. package/dist/types/config.test.js +97 -0
  172. package/dist/types/config.test.js.map +1 -0
  173. package/dist/utils/eligible.d.ts +3 -2
  174. package/dist/utils/eligible.d.ts.map +1 -1
  175. package/dist/utils/eligible.js +18 -4
  176. package/dist/utils/eligible.js.map +1 -1
  177. package/dist/utils/errors.d.ts +4 -0
  178. package/dist/utils/errors.d.ts.map +1 -1
  179. package/dist/utils/errors.js +31 -0
  180. package/dist/utils/errors.js.map +1 -1
  181. package/dist/utils/errors.test.js +4 -1
  182. package/dist/utils/errors.test.js.map +1 -1
  183. package/dist/wizard/questions.d.ts +4 -0
  184. package/dist/wizard/questions.d.ts.map +1 -1
  185. package/dist/wizard/questions.js +59 -1
  186. package/dist/wizard/questions.js.map +1 -1
  187. package/dist/wizard/questions.test.js +178 -4
  188. package/dist/wizard/questions.test.js.map +1 -1
  189. package/dist/wizard/wizard.d.ts +1 -0
  190. package/dist/wizard/wizard.d.ts.map +1 -1
  191. package/dist/wizard/wizard.js +4 -1
  192. package/dist/wizard/wizard.js.map +1 -1
  193. package/dist/wizard/wizard.test.js +102 -4
  194. package/dist/wizard/wizard.test.js.map +1 -1
  195. package/package.json +1 -1
package/README.md CHANGED
@@ -356,6 +356,97 @@ scaffold dashboard # open a visual progress dashboard in your browser
356
356
  - **The pipeline is a guide, not a cage.** Skip steps that don't apply (`scaffold skip <step> --reason "..."`). Run them out of order if you know what you're doing. Scaffold tracks dependencies so it'll tell you if you're missing a prerequisite.
357
357
  - **Depth controls thoroughness.** Each step runs at a depth from 1 (focused, fast) to 5 (exhaustive). The mvp preset defaults to depth 1; deep defaults to 5. You can override per step or per session: `"Use depth 3 for everything"`.
358
358
 
359
+ ### Game Development
360
+
361
+ Scaffold fully supports game development projects. When you select `game` as your project type, a **project-type overlay** activates 24 game-specific pipeline steps and injects game domain expertise into existing steps — all while keeping the standard pipeline workflow (status, next, rework, multi-model review) fully functional.
362
+
363
+ #### Getting Started
364
+
365
+ ```bash
366
+ # Interactive — the wizard asks about your engine, multiplayer, platforms, etc.
367
+ scaffold init
368
+
369
+ # Non-interactive with defaults (engine: custom, single-player, PC)
370
+ scaffold init --project-type game --auto
371
+
372
+ # Non-interactive with specific methodology
373
+ scaffold init --project-type game --methodology deep --auto
374
+
375
+ # Adopt an existing game project (auto-detects Unity/Unreal/Godot)
376
+ scaffold adopt
377
+ ```
378
+
379
+ #### How It Works
380
+
381
+ Game support uses a **project-type overlay** architecture. You choose your methodology normally (`mvp`, `deep`, or `custom`), then `projectType: game` layers on top:
382
+
383
+ - **Enables 24 game steps** — GDD, performance budgets, art bible, audio design, etc.
384
+ - **Disables 3 web-centric steps** — `design-system`, `ux-spec`, `review-ux` (replaced by `game-ui-spec`)
385
+ - **Injects 29 game knowledge entries** into existing steps (e.g., game engine evaluation into `tech-stack`, game testing patterns into `tdd`)
386
+ - **Remaps artifact references** so downstream steps read game-specific docs instead of web ones
387
+
388
+ A game jam project uses `mvp` + game overlay (fewer steps, lower depth). An AAA project uses `deep` + game overlay (all steps, max depth).
389
+
390
+ #### Game Configuration
391
+
392
+ During `scaffold init`, the wizard asks game-specific questions with progressive disclosure:
393
+
394
+ | Category | Questions |
395
+ |----------|-----------|
396
+ | **Core** (always asked) | Game engine (Unity/Unreal/Godot/custom), multiplayer mode (none/local/online/hybrid), target platforms (PC/console/mobile/VR/AR) |
397
+ | **Conditional** | Online services (if multiplayer), content structure (levels/open-world/procedural/endless), economy type (none/progression/monetized) |
398
+ | **Advanced** (opt-in) | Narrative depth, supported locales, NPC AI complexity, mod support, persistence model |
399
+
400
+ These answers control which conditional steps activate. A single-player puzzle game gets a different pipeline than a multiplayer live-service RPG.
401
+
402
+ #### Game Pipeline Steps
403
+
404
+ **Always enabled** (12 steps):
405
+
406
+ | Step | Phase | What It Produces |
407
+ |------|-------|-----------------|
408
+ | `game-design-document` | Pre | Game pillars, core loop, mechanics catalog, progression systems |
409
+ | `review-gdd` | Pre | Multi-pass review of GDD for pillar coherence, scope feasibility |
410
+ | `performance-budgets` | Foundation | Frame budgets, memory budgets, GPU limits, loading targets per platform |
411
+ | `game-accessibility` | Specification | XAG-aligned accessibility plan (visual, motor, cognitive, auditory) |
412
+ | `input-controls-spec` | Specification | Input bindings, rebinding, haptics, dead zones, cross-play fairness |
413
+ | `game-ui-spec` | Specification | HUD, menus, controller navigation, settings, FTUE/tutorial, UI states |
414
+ | `review-game-ui` | Specification | Multi-pass review of game UI for completeness and accessibility |
415
+ | `content-structure-design` | Specification | Level layouts, world regions, procedural rulesets, or mission templates |
416
+ | `art-bible` | Specification | Art style, asset specs, naming conventions, DCC pipeline, LOD strategy |
417
+ | `audio-design` | Specification | Audio direction, adaptive music, spatial audio, middleware config, VO |
418
+ | `playtest-plan` | Quality | Playtest types, schedule, feedback templates, balance testing |
419
+ | `analytics-telemetry` | Quality | Event taxonomy, crash telemetry, data pipeline, privacy compliance |
420
+
421
+ **Conditional** (12 steps — activated by your game configuration):
422
+
423
+ | Step | Activates When | What It Produces |
424
+ |------|---------------|-----------------|
425
+ | `narrative-bible` | Narrative is light/heavy | World lore, characters, dialogue systems, branching narrative |
426
+ | `netcode-spec` | Multiplayer is online/hybrid | Network topology, tick rate, prediction, lag compensation, anti-cheat |
427
+ | `review-netcode` | Netcode spec enabled | Latency tolerance, bandwidth, cheat resistance review |
428
+ | `ai-behavior-design` | NPC AI is simple/complex | Behavior trees, pathfinding, perception, difficulty scaling |
429
+ | `economy-design` | Economy is not none | Currencies, loot tables, monetization, legal compliance |
430
+ | `review-economy` | Economy design enabled | Inflation analysis, exploit detection, ethical monetization review |
431
+ | `online-services-spec` | Online services selected | Identity, leaderboards, matchmaking, moderation, cloud save |
432
+ | `modding-ugc-spec` | Mod support enabled | Mod API, sandboxing, distribution, content moderation |
433
+ | `save-system-spec` | Persistence is not none | Save format, cloud sync, corruption recovery, migration |
434
+ | `localization-plan` | Multiple locales | String management, fonts (CJK/RTL), VO localization, LQA |
435
+ | `live-ops-plan` | Live-ops selected | Content cadence, events, hotfix deployment, maintenance |
436
+ | `platform-cert-prep` | Console/mobile/VR targets | Sony TRC, Xbox XR, Nintendo Lotcheck, store compliance checklists |
437
+
438
+ #### Engine Detection
439
+
440
+ `scaffold adopt` automatically detects game engines in existing projects:
441
+
442
+ | Engine | Detection Signal |
443
+ |--------|-----------------|
444
+ | Unity | `Assets/*.meta` files |
445
+ | Unreal | `*.uproject` file |
446
+ | Godot | `project.godot` file |
447
+
448
+ When detected, `scaffold adopt` sets `projectType: game` and `gameConfig.engine` in your config, enabling the full game overlay.
449
+
359
450
  ## The Pipeline
360
451
 
361
452
  ### Phase 0 — Product Vision (vision)
@@ -0,0 +1,328 @@
1
+ ---
2
+ name: game-accessibility
3
+ description: Xbox Accessibility Guidelines as best-practice guidance, game-specific a11y categories, CVAA scope, and low-cost high-impact features
4
+ topics: [game-dev, accessibility, xag, cvaa, colorblind, remapping]
5
+ ---
6
+
7
+ Game accessibility is about removing barriers that prevent players with disabilities from experiencing your game. The Xbox Accessibility Guidelines (XAG) provide the most comprehensive industry framework — not as a legal compliance checklist, but as best-practice guidance that Microsoft explicitly positions as aspirational. Every feature you implement opens your game to more players, and many accessibility features (subtitles, remapping, difficulty options) benefit all players regardless of ability.
8
+
9
+ ## Summary
10
+
11
+ ### XAG as Best-Practice Guidance (Not Compliance)
12
+
13
+ The Xbox Accessibility Guidelines are published by Microsoft as voluntary guidance. They are NOT certification requirements, NOT legal mandates, and NOT a pass/fail checklist. Microsoft explicitly states that XAG is aspirational — studios should implement what makes sense for their game and audience. Treating XAG as a rigid compliance framework leads to "compliance theater" where teams check boxes without improving actual player experience.
14
+
15
+ That said, XAG is the best-organized accessibility framework in games. It covers 23 guidelines across categories that map directly to disability types. Use it as a design reference and prioritization tool, not a certification gate.
16
+
17
+ ### CVAA: Scope Is Communication Features Only
18
+
19
+ The 21st Century Communications and Video Accessibility Act (CVAA) applies specifically to communication features in games — voice chat, text chat, video chat, and related UI. If your game has no communication features, CVAA has minimal direct applicability. Games with voice or text chat must provide accessible alternatives (text-to-speech for chat, speech-to-text, visual indicators for voice activity). The FCC enforces CVAA, and waivers can be requested but require documented justification.
20
+
21
+ ### Accessibility Categories
22
+
23
+ Game accessibility spans six distinct areas, each addressing different disability types:
24
+
25
+ - **Visual**: Colorblind modes, high-contrast options, UI scaling, screen reader support, audio cues for visual events
26
+ - **Motor**: Input remapping, one-handed play, hold-vs-toggle options, copilot mode, adjustable timing windows
27
+ - **Cognitive**: Difficulty as accessibility, objective reminders, simplified UI modes, content warnings, adjustable game speed
28
+ - **Auditory**: Subtitles with speaker identification, visual sound indicators, adjustable subtitle size, mono audio option
29
+ - **Speech**: Text-to-speech for voice chat, ping systems as voice alternatives, preset communication phrases
30
+ - **Photosensitivity**: Flash reduction, screen shake controls, motion reduction, high-contrast mode
31
+
32
+ ### Low-Cost High-Impact Features
33
+
34
+ Not all accessibility features require massive engineering effort. The following have the best effort-to-impact ratio:
35
+
36
+ - Subtitle options with size/background controls (benefits 15%+ of players)
37
+ - Input remapping (often provided by engine frameworks)
38
+ - Colorblind mode (affects ~8% of males, ~0.5% of females)
39
+ - Hold-vs-toggle option for sustained inputs
40
+ - UI text scaling
41
+ - Screen shake intensity slider
42
+ - Difficulty options with granular controls
43
+
44
+ ## Deep Guidance
45
+
46
+ ### Visual Accessibility
47
+
48
+ Visual accessibility addresses blindness, low vision, and color vision deficiency. Color vision deficiency (colorblind) is the most common — affecting approximately 1 in 12 males and 1 in 200 females — but low vision and full blindness require different solutions.
49
+
50
+ **Color vision deficiency (colorblind support):**
51
+
52
+ The three main types are deuteranopia (red-green, most common), protanopia (red-green, less common), and tritanopia (blue-yellow, rare). Never use color alone to convey critical information. Every color-coded element should have a secondary differentiator: shape, pattern, label, or icon.
53
+
54
+ ```typescript
55
+ // Colorblind-safe design pattern: never rely on color alone
56
+ interface GameMarker {
57
+ color: string; // Primary visual cue
58
+ shape: MarkerShape; // Secondary cue — always present
59
+ label: string; // Tertiary cue — screen reader accessible
60
+ pattern?: string; // Optional pattern fill for map elements
61
+ }
62
+
63
+ type MarkerShape = "circle" | "triangle" | "square" | "diamond" | "star";
64
+
65
+ // BAD: Only color distinguishes teams
66
+ const badTeamIndicators = {
67
+ friendly: { color: "#00FF00" }, // Green
68
+ enemy: { color: "#FF0000" }, // Red — indistinguishable for deuteranopia
69
+ };
70
+
71
+ // GOOD: Color + shape + label
72
+ const goodTeamIndicators = {
73
+ friendly: { color: "#00FF00", shape: "circle" as MarkerShape, label: "Friendly" },
74
+ enemy: { color: "#FF0000", shape: "diamond" as MarkerShape, label: "Enemy" },
75
+ };
76
+
77
+ // Colorblind mode palette swaps
78
+ // These palettes are designed to be distinguishable across all three
79
+ // major types of color vision deficiency
80
+ const colorblindPalettes = {
81
+ deuteranopia: {
82
+ friendly: "#1B9E77", // Teal (replaces green)
83
+ enemy: "#D95F02", // Orange (replaces red)
84
+ neutral: "#7570B3", // Purple
85
+ highlight: "#E6AB02", // Gold
86
+ },
87
+ protanopia: {
88
+ friendly: "#0072B2", // Blue
89
+ enemy: "#E69F00", // Amber
90
+ neutral: "#CC79A7", // Pink
91
+ highlight: "#F0E442", // Yellow
92
+ },
93
+ tritanopia: {
94
+ friendly: "#009E73", // Green
95
+ enemy: "#D55E00", // Vermillion
96
+ neutral: "#56B4E9", // Sky blue
97
+ highlight: "#CC79A7", // Pink
98
+ },
99
+ };
100
+ ```
101
+
102
+ **High-contrast mode:**
103
+
104
+ Provide an option that increases contrast between game elements and backgrounds. This does not mean making everything black and white — it means ensuring foreground elements (characters, interactables, UI) have sufficient contrast against their surroundings. A dedicated high-contrast mode might add outlines, increase UI opacity, or simplify background detail.
105
+
106
+ **UI scaling:**
107
+
108
+ All text and UI elements should scale independently of render resolution. Minimum text size should be 28px at 1080p (per XAG guidance). Provide a UI scale slider from 75% to 200%. HUD elements should reflow or stack at larger scales rather than overlapping.
109
+
110
+ **Screen reader support:**
111
+
112
+ For menu navigation, screen readers need semantic structure: focusable elements with descriptive labels, logical tab order, and state announcements (selected, disabled, expanded). Most engines do not provide this natively — it requires a custom narration layer that reads UI element text via TTS.
113
+
114
+ ### Motor Accessibility
115
+
116
+ Motor accessibility covers a wide spectrum from reduced dexterity to full paralysis. The common thread is that players may not be able to use standard input methods in standard ways.
117
+
118
+ **Input remapping:**
119
+
120
+ Full input remapping is the single most impactful motor accessibility feature. Every bindable action should be remappable to any button or key. Support modifier keys (Shift+X, Ctrl+A). Allow multiple inputs bound to the same action. Allow one input bound to multiple actions (player's choice to accept conflicts).
121
+
122
+ ```yaml
123
+ # Remapping configuration structure
124
+ input_remapping:
125
+ # Every game action is remappable
126
+ actions:
127
+ - name: jump
128
+ default_keyboard: Space
129
+ default_gamepad: A
130
+ remappable: true
131
+ category: movement
132
+
133
+ - name: interact
134
+ default_keyboard: E
135
+ default_gamepad: X
136
+ remappable: true
137
+ category: actions
138
+
139
+ - name: fire
140
+ default_keyboard: LeftMouse
141
+ default_gamepad: RightTrigger
142
+ remappable: true
143
+ category: combat
144
+ # Hold-vs-toggle is per-action, not global
145
+ input_mode: [hold, toggle]
146
+ default_mode: hold
147
+
148
+ # Global motor accessibility options
149
+ motor_options:
150
+ hold_to_toggle:
151
+ description: "Convert any sustained-press action to a toggle"
152
+ applies_to: [sprint, aim, crouch, fire]
153
+ default: false
154
+
155
+ copilot_mode:
156
+ description: "Two controllers act as one — second player assists"
157
+ enabled: false
158
+ # Both controllers send input; game merges them
159
+ # No actions are exclusive to either controller
160
+
161
+ auto_sprint:
162
+ description: "Sprint activates automatically when stick is fully tilted"
163
+ default: false
164
+
165
+ aim_assist_strength:
166
+ description: "Adjustable aim assist from 0 (off) to 100 (maximum)"
167
+ range: [0, 100]
168
+ default: 50
169
+
170
+ qte_auto_complete:
171
+ description: "Quick-time events complete automatically"
172
+ default: false
173
+
174
+ timing_window_multiplier:
175
+ description: "Multiplier for all timing-based inputs"
176
+ range: [1.0, 5.0]
177
+ default: 1.0
178
+ ```
179
+
180
+ **One-handed play:**
181
+
182
+ Support playing with one hand by allowing all essential actions to be bound to one side of the controller or keyboard. For gamepad, this means binding movement and camera to the same stick (with toggle) or using gyro for camera. For keyboard, bind everything to the left hand region (WASD + surrounding keys).
183
+
184
+ **Copilot mode:**
185
+
186
+ Xbox's copilot feature lets two controllers act as a single input. The game receives merged input from both. This lets a helper (parent, caregiver, friend) assist with actions the primary player cannot perform. The game does not need to implement copilot itself — Xbox provides it at the OS level — but the game must not break when receiving input from two devices simultaneously.
187
+
188
+ ### Cognitive Accessibility
189
+
190
+ Cognitive accessibility helps players with learning disabilities, ADHD, autism, brain injuries, or simply unfamiliarity with game conventions.
191
+
192
+ **Difficulty as accessibility:**
193
+
194
+ Difficulty options are an accessibility feature, not a concession. Granular difficulty controls (separate sliders for enemy damage, player health, puzzle hints, timer length) are more accessible than a single Easy/Normal/Hard toggle. Players should be able to change difficulty at any time without penalty.
195
+
196
+ **Objective reminders and guidance:**
197
+
198
+ Players who lose track of objectives should be able to request a reminder at any time (waypoint, journal entry, NPC dialogue hint). Avoid punishing players for taking long breaks between sessions — provide session-start recaps or "story so far" summaries.
199
+
200
+ **Content warnings:**
201
+
202
+ Provide warnings for potentially distressing content (flashing lights, spiders, gore, loud sounds). Allow players to skip or modify these elements where possible. Content warnings are especially important for players with PTSD or anxiety disorders.
203
+
204
+ ### Auditory Accessibility
205
+
206
+ **Subtitles best practices:**
207
+
208
+ Subtitles should include speaker identification (name or color-coded labels, with shape differentiators for colorblind players). Provide background adjustable from transparent to fully opaque. Support size scaling from small to extra-large. Position subtitles consistently. For environmental audio, provide descriptive captions: "[explosion in distance]", "[footsteps approaching from left]".
209
+
210
+ ```typescript
211
+ // Subtitle system configuration
212
+ interface SubtitleOptions {
213
+ enabled: boolean;
214
+ size: "small" | "medium" | "large" | "extra-large";
215
+ // Font sizes at 1080p (scale proportionally at other resolutions)
216
+ // small: 24px, medium: 32px, large: 42px, extra-large: 56px
217
+
218
+ background: "transparent" | "semi-transparent" | "opaque";
219
+ // semi-transparent: rgba(0, 0, 0, 0.6)
220
+ // opaque: rgba(0, 0, 0, 0.9)
221
+
222
+ speakerIdentification: boolean;
223
+ // When true, prefix each line with speaker name in their assigned color
224
+ // "ELENA: We need to move, now."
225
+
226
+ directionIndicator: boolean;
227
+ // When true, show arrow or label indicating sound direction
228
+ // "[LEFT] ELENA: We need to move, now."
229
+
230
+ environmentalCaptions: boolean;
231
+ // When true, also display non-speech audio
232
+ // "[distant gunfire]", "[door creaks open]"
233
+
234
+ letterboxSafe: boolean;
235
+ // When true, position subtitles above any letterbox bars
236
+ // Prevents subtitles from being hidden during cutscenes
237
+ }
238
+
239
+ // Default configuration — accessible out of the box
240
+ const defaultSubtitles: SubtitleOptions = {
241
+ enabled: true, // On by default per XAG guidance
242
+ size: "medium",
243
+ background: "semi-transparent",
244
+ speakerIdentification: true,
245
+ directionIndicator: false,
246
+ environmentalCaptions: false,
247
+ letterboxSafe: true,
248
+ };
249
+ ```
250
+
251
+ **Visual sound indicators:**
252
+
253
+ For deaf and hard-of-hearing players, provide visual representations of important game sounds. A radial indicator around the crosshair showing the direction and type of nearby sounds (footsteps, gunfire, voice) is the most common pattern. Sound visualization should be optional and non-distracting for players who do not need it.
254
+
255
+ **Mono audio:**
256
+
257
+ Players who are deaf in one ear lose spatial audio cues entirely with stereo output. A mono audio option collapses stereo/surround to a single channel, ensuring no audio information is lost. This should be a simple toggle.
258
+
259
+ ### Speech Accessibility
260
+
261
+ **Alternatives to voice communication:**
262
+
263
+ Not all players can or want to use voice chat. Provide robust alternatives:
264
+
265
+ - Ping system: contextual pings (enemy here, go here, need help, danger) that communicate essential information without speech
266
+ - Preset phrases: quick-select wheel of common callouts mapped to a button
267
+ - Text-to-speech: read typed chat messages aloud to teammates
268
+ - Speech-to-text: transcribe voice chat for players who cannot hear it
269
+
270
+ ### Photosensitivity
271
+
272
+ Photosensitive epilepsy affects approximately 1 in 4,000 people. Game-triggered seizures are a liability and a safety concern.
273
+
274
+ **Flash reduction:**
275
+
276
+ Avoid rapid flashing patterns (more than 3 flashes per second in any 1-second period). When flashing effects are essential (explosions, lightning), reduce their intensity and frequency. Provide a "reduce flashing" option that dims or removes strobing effects.
277
+
278
+ **Screen shake and camera motion:**
279
+
280
+ Provide separate intensity sliders for screen shake (0-100%) and camera motion/bobbing (0-100%). Default values should be moderate. A motion sensitivity option that reduces all camera-driven motion effects to zero should be available.
281
+
282
+ ### Implementation Priority Matrix
283
+
284
+ Not every feature is equally costly or impactful. Prioritize by effort-to-impact ratio:
285
+
286
+ ```markdown
287
+ | Priority | Feature | Effort | Impact | Notes |
288
+ |----------|--------------------------------|--------|--------|----------------------------------|
289
+ | P0 | Subtitle options | Low | High | Benefits 15%+ of all players |
290
+ | P0 | Input remapping | Low | High | Engine frameworks often support |
291
+ | P0 | Colorblind mode | Low | High | 8% of males affected |
292
+ | P1 | Hold-vs-toggle | Low | Medium | Per-action, not global toggle |
293
+ | P1 | UI text scaling | Medium | High | Requires UI reflow support |
294
+ | P1 | Difficulty granularity | Medium | High | Separate sliders per dimension |
295
+ | P1 | Screen shake slider | Low | Medium | Trivial to implement |
296
+ | P2 | High-contrast mode | Medium | Medium | Outline shaders, UI opacity |
297
+ | P2 | Visual sound indicators | Medium | Medium | Radial indicator UI element |
298
+ | P2 | Mono audio | Low | Low | Simple audio mix change |
299
+ | P2 | Environmental captions | High | Medium | Requires tagging all sound events |
300
+ | P3 | Screen reader / TTS menus | High | Medium | Custom narration layer needed |
301
+ | P3 | Copilot mode | Low | Low | Xbox provides OS-level; test only |
302
+ | P3 | One-handed presets | Medium | Low | Remap presets + UI |
303
+ ```
304
+
305
+ ### Testing Accessibility Features
306
+
307
+ Accessibility features must be tested — not just implemented and forgotten.
308
+
309
+ **Manual testing protocols:**
310
+ - Play through the first 30 minutes with each colorblind simulation filter active (most GPUs provide built-in simulation)
311
+ - Complete key gameplay sequences using only a keyboard (no mouse) and only a gamepad
312
+ - Complete key gameplay sequences with audio muted — verify all critical information has visual representation
313
+ - Test subtitle readability at minimum and maximum text sizes on both TV (3-meter viewing) and monitor (0.5-meter viewing) distances
314
+ - Invite players with disabilities to playtest — automated testing cannot replace lived experience
315
+
316
+ **Automated validation:**
317
+ - Contrast ratio checking for all UI text (WCAG AA minimum: 4.5:1 for normal text, 3:1 for large text)
318
+ - Flash detection in cutscenes and VFX (automated tools can flag sequences exceeding 3 flashes/second)
319
+ - Input binding validation: ensure every game action has at least one binding in every remapping preset
320
+ - UI overlap detection at maximum text scale
321
+
322
+ ### Common Pitfalls
323
+
324
+ - **Colorblind "filter" overlays**: Applying a post-process color filter to the entire screen is inferior to designing distinct visual elements from the start. Filters make the whole game look washed out. Instead, use distinct shapes, patterns, and labels alongside color.
325
+ - **Subtitles off by default**: XAG recommends subtitles ON by default or prompted during first launch. Many players who need subtitles do not know where to find the option.
326
+ - **Binary difficulty**: "Easy or Hard" does not serve accessibility. A player who cannot execute rapid button presses but has no cognitive limitations needs different accommodations than a player who needs simpler puzzle solutions.
327
+ - **Inaccessible menus**: If the options menu itself is not accessible (tiny text, no keyboard navigation, no screen reader), players cannot even enable the accessibility features.
328
+ - **Testing only with default settings**: Every accessibility feature must be tested in combination with gameplay. Colorblind mode + high contrast + large text + remapped controls — do they all work together?