@zigrivers/scaffold 3.4.1 → 3.5.0

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 (194) 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 +542 -0
  4. package/content/knowledge/game/game-asset-pipeline.md +359 -0
  5. package/content/knowledge/game/game-audio-design.md +342 -0
  6. package/content/knowledge/game/game-binary-vcs-strategy.md +396 -0
  7. package/content/knowledge/game/game-design-document.md +260 -0
  8. package/content/knowledge/game/game-domain-patterns.md +297 -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 +357 -0
  12. package/content/knowledge/game/game-level-content-design.md +455 -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 +391 -0
  19. package/content/knowledge/game/game-performance-budgeting.md +378 -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 +475 -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-netcode.md +280 -0
  30. package/content/knowledge/review/review-platform-cert.md +341 -0
  31. package/content/methodology/custom-defaults.yml +25 -0
  32. package/content/methodology/deep.yml +25 -0
  33. package/content/methodology/game-overlay.yml +145 -0
  34. package/content/methodology/mvp.yml +25 -0
  35. package/content/pipeline/architecture/ai-behavior-design.md +87 -0
  36. package/content/pipeline/architecture/netcode-spec.md +86 -0
  37. package/content/pipeline/architecture/review-netcode.md +78 -0
  38. package/content/pipeline/foundation/performance-budgets.md +91 -0
  39. package/content/pipeline/modeling/narrative-bible.md +84 -0
  40. package/content/pipeline/pre/game-design-document.md +89 -0
  41. package/content/pipeline/pre/review-gdd.md +74 -0
  42. package/content/pipeline/quality/analytics-telemetry.md +98 -0
  43. package/content/pipeline/quality/live-ops-plan.md +99 -0
  44. package/content/pipeline/quality/platform-cert-prep.md +129 -0
  45. package/content/pipeline/quality/playtest-plan.md +83 -0
  46. package/content/pipeline/specification/art-bible.md +87 -0
  47. package/content/pipeline/specification/audio-design.md +96 -0
  48. package/content/pipeline/specification/content-structure-design.md +141 -0
  49. package/content/pipeline/specification/economy-design.md +104 -0
  50. package/content/pipeline/specification/game-accessibility.md +82 -0
  51. package/content/pipeline/specification/game-ui-spec.md +97 -0
  52. package/content/pipeline/specification/input-controls-spec.md +81 -0
  53. package/content/pipeline/specification/localization-plan.md +113 -0
  54. package/content/pipeline/specification/modding-ugc-spec.md +116 -0
  55. package/content/pipeline/specification/online-services-spec.md +104 -0
  56. package/content/pipeline/specification/review-economy.md +87 -0
  57. package/content/pipeline/specification/review-game-ui.md +73 -0
  58. package/content/pipeline/specification/save-system-spec.md +116 -0
  59. package/dist/cli/commands/adopt.d.ts.map +1 -1
  60. package/dist/cli/commands/adopt.js +25 -0
  61. package/dist/cli/commands/adopt.js.map +1 -1
  62. package/dist/cli/commands/adopt.test.js +28 -1
  63. package/dist/cli/commands/adopt.test.js.map +1 -1
  64. package/dist/cli/commands/build.test.js +3 -0
  65. package/dist/cli/commands/build.test.js.map +1 -1
  66. package/dist/cli/commands/init.d.ts +1 -0
  67. package/dist/cli/commands/init.d.ts.map +1 -1
  68. package/dist/cli/commands/init.js +6 -0
  69. package/dist/cli/commands/init.js.map +1 -1
  70. package/dist/cli/commands/init.test.js +12 -1
  71. package/dist/cli/commands/init.test.js.map +1 -1
  72. package/dist/cli/commands/knowledge.test.js +8 -0
  73. package/dist/cli/commands/knowledge.test.js.map +1 -1
  74. package/dist/cli/commands/next.d.ts.map +1 -1
  75. package/dist/cli/commands/next.js +19 -5
  76. package/dist/cli/commands/next.js.map +1 -1
  77. package/dist/cli/commands/next.test.js +56 -0
  78. package/dist/cli/commands/next.test.js.map +1 -1
  79. package/dist/cli/commands/rework.d.ts.map +1 -1
  80. package/dist/cli/commands/rework.js +11 -2
  81. package/dist/cli/commands/rework.js.map +1 -1
  82. package/dist/cli/commands/rework.test.js +5 -0
  83. package/dist/cli/commands/rework.test.js.map +1 -1
  84. package/dist/cli/commands/run.d.ts.map +1 -1
  85. package/dist/cli/commands/run.js +54 -4
  86. package/dist/cli/commands/run.js.map +1 -1
  87. package/dist/cli/commands/run.test.js +384 -0
  88. package/dist/cli/commands/run.test.js.map +1 -1
  89. package/dist/cli/commands/skip.test.js +3 -0
  90. package/dist/cli/commands/skip.test.js.map +1 -1
  91. package/dist/cli/commands/status.d.ts.map +1 -1
  92. package/dist/cli/commands/status.js +16 -3
  93. package/dist/cli/commands/status.js.map +1 -1
  94. package/dist/cli/commands/status.test.js +55 -0
  95. package/dist/cli/commands/status.test.js.map +1 -1
  96. package/dist/cli/output/auto.d.ts +3 -0
  97. package/dist/cli/output/auto.d.ts.map +1 -1
  98. package/dist/cli/output/auto.js +9 -0
  99. package/dist/cli/output/auto.js.map +1 -1
  100. package/dist/cli/output/context.d.ts +6 -0
  101. package/dist/cli/output/context.d.ts.map +1 -1
  102. package/dist/cli/output/context.js.map +1 -1
  103. package/dist/cli/output/context.test.js +87 -0
  104. package/dist/cli/output/context.test.js.map +1 -1
  105. package/dist/cli/output/error-display.test.js +3 -0
  106. package/dist/cli/output/error-display.test.js.map +1 -1
  107. package/dist/cli/output/interactive.d.ts +3 -0
  108. package/dist/cli/output/interactive.d.ts.map +1 -1
  109. package/dist/cli/output/interactive.js +76 -0
  110. package/dist/cli/output/interactive.js.map +1 -1
  111. package/dist/cli/output/json.d.ts +3 -0
  112. package/dist/cli/output/json.d.ts.map +1 -1
  113. package/dist/cli/output/json.js +9 -0
  114. package/dist/cli/output/json.js.map +1 -1
  115. package/dist/config/loader.d.ts.map +1 -1
  116. package/dist/config/loader.js +3 -2
  117. package/dist/config/loader.js.map +1 -1
  118. package/dist/config/schema.d.ts +641 -15
  119. package/dist/config/schema.d.ts.map +1 -1
  120. package/dist/config/schema.js +26 -1
  121. package/dist/config/schema.js.map +1 -1
  122. package/dist/config/schema.test.js +192 -1
  123. package/dist/config/schema.test.js.map +1 -1
  124. package/dist/core/assembly/overlay-loader.d.ts +24 -0
  125. package/dist/core/assembly/overlay-loader.d.ts.map +1 -0
  126. package/dist/core/assembly/overlay-loader.js +190 -0
  127. package/dist/core/assembly/overlay-loader.js.map +1 -0
  128. package/dist/core/assembly/overlay-loader.test.d.ts +2 -0
  129. package/dist/core/assembly/overlay-loader.test.d.ts.map +1 -0
  130. package/dist/core/assembly/overlay-loader.test.js +106 -0
  131. package/dist/core/assembly/overlay-loader.test.js.map +1 -0
  132. package/dist/core/assembly/overlay-resolver.d.ts +15 -0
  133. package/dist/core/assembly/overlay-resolver.d.ts.map +1 -0
  134. package/dist/core/assembly/overlay-resolver.js +58 -0
  135. package/dist/core/assembly/overlay-resolver.js.map +1 -0
  136. package/dist/core/assembly/overlay-resolver.test.d.ts +2 -0
  137. package/dist/core/assembly/overlay-resolver.test.d.ts.map +1 -0
  138. package/dist/core/assembly/overlay-resolver.test.js +246 -0
  139. package/dist/core/assembly/overlay-resolver.test.js.map +1 -0
  140. package/dist/core/assembly/overlay-state-resolver.d.ts +26 -0
  141. package/dist/core/assembly/overlay-state-resolver.d.ts.map +1 -0
  142. package/dist/core/assembly/overlay-state-resolver.js +63 -0
  143. package/dist/core/assembly/overlay-state-resolver.js.map +1 -0
  144. package/dist/core/assembly/overlay-state-resolver.test.d.ts +2 -0
  145. package/dist/core/assembly/overlay-state-resolver.test.d.ts.map +1 -0
  146. package/dist/core/assembly/overlay-state-resolver.test.js +256 -0
  147. package/dist/core/assembly/overlay-state-resolver.test.js.map +1 -0
  148. package/dist/core/assembly/preset-loader.d.ts +1 -0
  149. package/dist/core/assembly/preset-loader.d.ts.map +1 -1
  150. package/dist/core/assembly/preset-loader.js +2 -0
  151. package/dist/core/assembly/preset-loader.js.map +1 -1
  152. package/dist/core/dependency/eligibility.test.js +3 -0
  153. package/dist/core/dependency/eligibility.test.js.map +1 -1
  154. package/dist/e2e/game-pipeline.test.d.ts +10 -0
  155. package/dist/e2e/game-pipeline.test.d.ts.map +1 -0
  156. package/dist/e2e/game-pipeline.test.js +298 -0
  157. package/dist/e2e/game-pipeline.test.js.map +1 -0
  158. package/dist/e2e/init.test.js +3 -0
  159. package/dist/e2e/init.test.js.map +1 -1
  160. package/dist/project/adopt.d.ts +3 -1
  161. package/dist/project/adopt.d.ts.map +1 -1
  162. package/dist/project/adopt.js +29 -1
  163. package/dist/project/adopt.js.map +1 -1
  164. package/dist/project/adopt.test.js +51 -1
  165. package/dist/project/adopt.test.js.map +1 -1
  166. package/dist/types/config.d.ts +50 -4
  167. package/dist/types/config.d.ts.map +1 -1
  168. package/dist/types/config.test.d.ts +2 -0
  169. package/dist/types/config.test.d.ts.map +1 -0
  170. package/dist/types/config.test.js +97 -0
  171. package/dist/types/config.test.js.map +1 -0
  172. package/dist/utils/eligible.d.ts +3 -2
  173. package/dist/utils/eligible.d.ts.map +1 -1
  174. package/dist/utils/eligible.js +18 -4
  175. package/dist/utils/eligible.js.map +1 -1
  176. package/dist/utils/errors.d.ts +4 -0
  177. package/dist/utils/errors.d.ts.map +1 -1
  178. package/dist/utils/errors.js +31 -0
  179. package/dist/utils/errors.js.map +1 -1
  180. package/dist/utils/errors.test.js +4 -1
  181. package/dist/utils/errors.test.js.map +1 -1
  182. package/dist/wizard/questions.d.ts +4 -0
  183. package/dist/wizard/questions.d.ts.map +1 -1
  184. package/dist/wizard/questions.js +59 -1
  185. package/dist/wizard/questions.js.map +1 -1
  186. package/dist/wizard/questions.test.js +178 -4
  187. package/dist/wizard/questions.test.js.map +1 -1
  188. package/dist/wizard/wizard.d.ts +1 -0
  189. package/dist/wizard/wizard.d.ts.map +1 -1
  190. package/dist/wizard/wizard.js +4 -1
  191. package/dist/wizard/wizard.js.map +1 -1
  192. package/dist/wizard/wizard.test.js +102 -4
  193. package/dist/wizard/wizard.test.js.map +1 -1
  194. package/package.json +1 -1
@@ -0,0 +1,360 @@
1
+ ---
2
+ name: game-project-structure
3
+ description: Engine-specific directory conventions for Unity, Unreal, and Godot with asset and code organization strategies
4
+ topics: [game-dev, project-structure, unity, unreal, godot, organization]
5
+ ---
6
+
7
+ Game projects have fundamentally different structure requirements than web or business applications because they manage two distinct artifact types: code and content assets. Code follows software engineering conventions (modules, namespaces, tests). Content assets follow production pipeline conventions (source art, exported formats, level data, audio banks). The directory structure must serve both engineers and content creators, and it must scale from prototype to shipped product without requiring a mid-project reorganization.
8
+
9
+ ## Summary
10
+
11
+ ### Two Organization Strategies
12
+
13
+ Game projects choose between two primary strategies for organizing files:
14
+
15
+ **By Type** (group by file/asset category):
16
+ - All scripts in one tree, all textures in another, all models in another
17
+ - Easy to find "all textures" or "all scripts"
18
+ - Breaks down at scale: hundreds of unrelated textures in one folder
19
+ - Preferred by engine conventions (Unity's traditional approach)
20
+
21
+ **By Feature** (group by gameplay feature or content area):
22
+ - Each feature/area contains its own scripts, prefabs, textures, audio
23
+ - Co-locates related assets — changing the "Weapon" feature means editing files in one directory
24
+ - Harder to find "all textures across the project"
25
+ - Preferred by large teams and experienced studios
26
+
27
+ **Recommendation**: Start by-type for small projects (under 1000 assets) and migrate to by-feature when the project grows. Most engines support both; the choice is convention, not technical limitation.
28
+
29
+ ### Engine-Agnostic Principles
30
+
31
+ Regardless of engine, these principles apply:
32
+
33
+ - **Separate source assets from exported assets**: Raw Photoshop/Blender files do not belong in the engine project; they live in a parallel `art-source/` repository or directory
34
+ - **Version control strategy**: Binary assets (textures, models, audio) need Git LFS or Perforce; text assets (scripts, config) use standard Git
35
+ - **Scene/Level naming**: Use a consistent naming convention with numeric prefixes for load order (e.g., `01_main-menu`, `02_tutorial`, `03_forest-village`)
36
+ - **Test scenes**: Maintain a `_test/` or `_sandbox/` directory for developer testing scenes that are excluded from builds
37
+ - **Plugin/addon isolation**: Third-party code lives in a clearly separated directory, never mixed with project code
38
+
39
+ ### Asset Naming Conventions
40
+
41
+ Consistent asset naming prevents chaos at scale:
42
+
43
+ - Prefix by type: `T_` (texture), `M_` (material), `SM_` (static mesh), `SK_` (skeletal mesh), `A_` (animation), `SFX_` (sound effect), `MUS_` (music), `UI_` (UI element), `FX_` (particle/VFX)
44
+ - Use PascalCase for asset names: `T_ForestGround_Diffuse`, `SM_Weapon_Sword_01`
45
+ - Include variant suffixes: `_Diffuse`, `_Normal`, `_Roughness` for texture maps; `_01`, `_02` for variants
46
+ - Never use spaces in filenames — they break build tools, CLI scripts, and some version control systems
47
+
48
+ ## Deep Guidance
49
+
50
+ ### Unity Project Structure
51
+
52
+ Unity projects follow a mandatory `Assets/` root for all project content. The engine expects specific directories at known locations.
53
+
54
+ ```
55
+ ProjectRoot/
56
+ ├── Assets/ # All project content lives here
57
+ │ ├── _Project/ # Project-specific assets (underscore sorts to top)
58
+ │ │ ├── Art/
59
+ │ │ │ ├── Animations/ # Animation clips and controllers
60
+ │ │ │ ├── Materials/ # Material assets
61
+ │ │ │ ├── Models/ # FBX/OBJ mesh imports
62
+ │ │ │ ├── Shaders/ # Custom shaders and shader graphs
63
+ │ │ │ ├── Sprites/ # 2D sprite sheets and atlases
64
+ │ │ │ ├── Textures/ # Texture files (PNG, TGA, EXR)
65
+ │ │ │ └── VFX/ # Particle systems and VFX graphs
66
+ │ │ ├── Audio/
67
+ │ │ │ ├── Music/ # Background music tracks
68
+ │ │ │ ├── SFX/ # Sound effects
69
+ │ │ │ └── Mixers/ # Audio mixer assets
70
+ │ │ ├── Data/ # ScriptableObjects, game data tables
71
+ │ │ │ ├── Items/ # Item definitions
72
+ │ │ │ ├── Enemies/ # Enemy stat definitions
73
+ │ │ │ ├── Levels/ # Level configuration data
74
+ │ │ │ └── Balancing/ # Tuning spreadsheets / CSV imports
75
+ │ │ ├── Prefabs/ # Reusable game object templates
76
+ │ │ │ ├── Characters/
77
+ │ │ │ ├── Environment/
78
+ │ │ │ ├── UI/
79
+ │ │ │ └── Weapons/
80
+ │ │ ├── Scenes/ # Unity scene files
81
+ │ │ │ ├── _Boot/ # Bootstrap / initialization scene
82
+ │ │ │ ├── MainMenu/
83
+ │ │ │ ├── Gameplay/
84
+ │ │ │ └── _Test/ # Developer test scenes (exclude from build)
85
+ │ │ ├── Scripts/ # All C# source code
86
+ │ │ │ ├── Runtime/ # Game code
87
+ │ │ │ │ ├── Core/ # Game loop, state management, singletons
88
+ │ │ │ │ ├── Player/ # Player controller, input, camera
89
+ │ │ │ │ ├── AI/ # Enemy AI, behavior trees, pathfinding
90
+ │ │ │ │ ├── Combat/ # Damage system, weapons, projectiles
91
+ │ │ │ │ ├── UI/ # UI controllers and data binding
92
+ │ │ │ │ ├── Audio/ # Audio management, music system
93
+ │ │ │ │ ├── Save/ # Save/load system
94
+ │ │ │ │ └── Utilities/ # Shared helpers, extensions, pools
95
+ │ │ │ └── Editor/ # Custom editor tools and inspectors
96
+ │ │ ├── UI/ # UI Toolkit UXML/USS or Canvas prefabs
97
+ │ │ │ ├── Screens/ # Full-screen UI (menus, HUD, dialogs)
98
+ │ │ │ ├── Components/ # Reusable UI components
99
+ │ │ │ └── Styles/ # USS stylesheets or shared UI materials
100
+ │ │ └── Fonts/ # Font assets
101
+ │ ├── Plugins/ # Third-party plugins and packages
102
+ │ ├── StreamingAssets/ # Files copied verbatim to build (config, JSON)
103
+ │ ├── Resources/ # Assets loadable by name (use sparingly)
104
+ │ └── Editor Default Resources/ # Editor-only assets
105
+ ├── Packages/ # Unity Package Manager manifest
106
+ ├── ProjectSettings/ # Unity project settings (version control these)
107
+ ├── UserSettings/ # Per-user settings (gitignore these)
108
+ ├── Logs/ # Unity logs (gitignore)
109
+ ├── Library/ # Unity cache (gitignore)
110
+ ├── Temp/ # Unity temp (gitignore)
111
+ ├── obj/ # Build artifacts (gitignore)
112
+ ├── .gitignore
113
+ └── .gitattributes # Git LFS tracking rules
114
+ ```
115
+
116
+ **Unity-specific rules:**
117
+ - `Resources/` is loaded into memory at startup — only put assets here that must be loaded by string name; prefer Addressables for dynamic loading
118
+ - `StreamingAssets/` is copied byte-for-byte to the build — use for config files, JSON data, pre-built databases
119
+ - `Editor/` directories anywhere in the tree are excluded from builds — put editor-only code here
120
+ - The `_Project/` prefix is a convention to visually separate your code from Plugins; the underscore ensures it sorts above plugin folders
121
+ - `.meta` files must be committed — they contain asset GUIDs and import settings; missing meta files break references
122
+
123
+ ### Unreal Engine Project Structure
124
+
125
+ Unreal uses a `Content/` directory for assets and `Source/` for C++ code. The engine enforces stronger conventions than Unity.
126
+
127
+ ```
128
+ ProjectRoot/
129
+ ├── Content/ # All game assets (equivalent to Unity's Assets/)
130
+ │ ├── Characters/ # Character blueprints, meshes, animations
131
+ │ │ ├── Player/
132
+ │ │ │ ├── Meshes/
133
+ │ │ │ ├── Animations/
134
+ │ │ │ ├── Materials/
135
+ │ │ │ └── BP_PlayerCharacter.uasset
136
+ │ │ └── Enemies/
137
+ │ │ ├── Goblin/
138
+ │ │ └── Dragon/
139
+ │ ├── Environment/ # Level art, props, foliage
140
+ │ │ ├── Architecture/
141
+ │ │ ├── Nature/
142
+ │ │ ├── Props/
143
+ │ │ └── Materials/
144
+ │ ├── Weapons/ # Weapon meshes, animations, blueprints
145
+ │ ├── VFX/ # Niagara particle systems
146
+ │ ├── UI/ # UMG widget blueprints
147
+ │ │ ├── Widgets/
148
+ │ │ ├── Screens/
149
+ │ │ └── Styles/
150
+ │ ├── Audio/
151
+ │ │ ├── Music/
152
+ │ │ ├── SFX/
153
+ │ │ └── SoundCues/
154
+ │ ├── Maps/ # Level/map files
155
+ │ │ ├── MainMenu/
156
+ │ │ ├── Gameplay/
157
+ │ │ └── _Dev/ # Developer test levels
158
+ │ ├── Data/ # Data tables, curve assets, enums
159
+ │ ├── Cinematics/ # Sequencer assets and cutscenes
160
+ │ ├── Input/ # Enhanced Input mapping contexts
161
+ │ └── Core/ # Core blueprints (game mode, game state)
162
+ ├── Source/ # C++ source code
163
+ │ ├── ProjectName/ # Primary game module
164
+ │ │ ├── ProjectName.h
165
+ │ │ ├── ProjectName.cpp
166
+ │ │ ├── ProjectName.Build.cs # Module build configuration
167
+ │ │ ├── Core/ # Game framework classes
168
+ │ │ ├── Player/ # Player classes
169
+ │ │ ├── AI/ # AI controllers and behavior trees
170
+ │ │ ├── Combat/ # Combat system
171
+ │ │ ├── UI/ # UI controller classes
172
+ │ │ └── Save/ # Save system
173
+ │ └── ProjectNameEditor/ # Editor-only module (optional)
174
+ │ ├── ProjectNameEditor.Build.cs
175
+ │ └── CustomEditors/
176
+ ├── Config/ # Engine and project configuration
177
+ │ ├── DefaultEngine.ini
178
+ │ ├── DefaultGame.ini
179
+ │ ├── DefaultInput.ini
180
+ │ └── DefaultEditor.ini
181
+ ├── Plugins/ # Project-specific plugins
182
+ ├── Binaries/ # Compiled binaries (gitignore)
183
+ ├── Intermediate/ # Build intermediates (gitignore)
184
+ ├── Saved/ # Logs, autosaves, crashes (gitignore)
185
+ ├── DerivedDataCache/ # Asset cache (gitignore)
186
+ ├── .uproject # Project descriptor
187
+ ├── .gitignore
188
+ └── .gitattributes # Git LFS rules for .uasset, .umap
189
+ ```
190
+
191
+ **Unreal-specific rules:**
192
+ - Use `Content/` subfolders as feature domains, not asset types — `Content/Characters/Player/` not `Content/Meshes/Characters/Player/`
193
+ - Blueprints should mirror the C++ class hierarchy — `BP_PlayerCharacter` inherits from `APlayerCharacter`
194
+ - Name Blueprint assets with `BP_` prefix, Widget Blueprints with `WBP_`, Data Tables with `DT_`
195
+ - `Content/_Dev/` for personal test assets — each developer gets a subdirectory; exclude from builds
196
+ - Unreal assets are binary — Git LFS is mandatory for `.uasset` and `.umap` files; alternatively use Perforce
197
+ - `Config/` INI files should be committed — they control project settings; `Saved/Config/` contains runtime overrides and should be gitignored
198
+ - Redirectors (created when assets move) should be cleaned up regularly with `Fix Up Redirectors In Folder`
199
+
200
+ ### Godot Project Structure
201
+
202
+ Godot uses `res://` as the project root. Everything is a resource, and the scene/node tree is the primary organizational unit.
203
+
204
+ ```
205
+ ProjectRoot/
206
+ ├── project.godot # Project configuration
207
+ ├── scenes/ # Scene files (.tscn)
208
+ │ ├── main/ # Main game scenes
209
+ │ │ ├── main_menu.tscn
210
+ │ │ ├── game_world.tscn
211
+ │ │ └── game_over.tscn
212
+ │ ├── characters/ # Character scenes (instantiated)
213
+ │ │ ├── player.tscn
214
+ │ │ └── enemies/
215
+ │ │ ├── goblin.tscn
216
+ │ │ └── dragon.tscn
217
+ │ ├── ui/ # UI scenes
218
+ │ │ ├── hud.tscn
219
+ │ │ ├── inventory_screen.tscn
220
+ │ │ └── components/ # Reusable UI components
221
+ │ │ ├── health_bar.tscn
222
+ │ │ └── item_slot.tscn
223
+ │ ├── levels/ # Level scenes
224
+ │ │ ├── level_01_tutorial.tscn
225
+ │ │ ├── level_02_forest.tscn
226
+ │ │ └── level_03_dungeon.tscn
227
+ │ └── _test/ # Developer test scenes
228
+ ├── scripts/ # GDScript or C# source files
229
+ │ ├── autoloads/ # Singleton scripts (AudioManager, SaveManager)
230
+ │ ├── core/ # Game loop, state management
231
+ │ ├── player/ # Player controller, input
232
+ │ ├── ai/ # Enemy AI
233
+ │ ├── combat/ # Damage system, weapons
234
+ │ ├── ui/ # UI logic
235
+ │ ├── save/ # Save/load system
236
+ │ └── utilities/ # Shared helpers
237
+ ├── assets/ # Non-scene resources
238
+ │ ├── art/
239
+ │ │ ├── sprites/ # 2D sprites and sprite sheets
240
+ │ │ ├── tilesets/ # Tileset images and .tres resources
241
+ │ │ ├── models/ # 3D models (GLTF, OBJ)
242
+ │ │ ├── materials/ # Material resources
243
+ │ │ ├── shaders/ # Shader files (.gdshader)
244
+ │ │ └── vfx/ # Particle scenes and textures
245
+ │ ├── audio/
246
+ │ │ ├── music/ # Background music (OGG for streaming)
247
+ │ │ └── sfx/ # Sound effects (WAV for low-latency)
248
+ │ ├── fonts/ # Font files and font resources
249
+ │ └── ui/ # UI textures, icons, themes
250
+ ├── data/ # Game data tables and configuration
251
+ │ ├── items.json # Item definitions
252
+ │ ├── enemies.json # Enemy stat tables
253
+ │ ├── dialogue/ # Dialogue trees (JSON or custom format)
254
+ │ └── levels/ # Level metadata and configuration
255
+ ├── addons/ # Third-party Godot plugins
256
+ ├── export_presets.cfg # Export configuration (commit this)
257
+ ├── .godot/ # Engine cache (gitignore)
258
+ ├── .gitignore
259
+ └── .gitattributes
260
+ ```
261
+
262
+ **Godot-specific rules:**
263
+ - Scenes (`.tscn`) are the primary organizational unit — prefer small, reusable scenes composed into larger ones
264
+ - Scripts can be attached directly to scene nodes or kept in `scripts/` — co-locate scripts with scenes for small projects, separate for larger ones
265
+ - Autoloads (singletons) are registered in `project.godot` — use sparingly for truly global services (audio, save, events)
266
+ - Use `.tres` (text resource) format over `.res` (binary) for version-control-friendly resources
267
+ - Audio: OGG Vorbis for music (streamed, smaller files), WAV for sound effects (low latency, no decompression)
268
+ - Godot's `.import/` cache is in `.godot/` and should be gitignored — it regenerates automatically
269
+ - Export presets (`export_presets.cfg`) should be committed so all developers build consistently
270
+
271
+ ### Scene and Level Management
272
+
273
+ **Level loading strategies:**
274
+
275
+ - **Additive loading**: Load new level scenes additively while keeping persistent scenes (UI, player, audio) active. Prevents jarring transitions and allows seamless level streaming.
276
+ - **Full scene change**: Unload everything and load the new scene. Simpler, but causes a loading screen. Appropriate for distinct game modes (main menu to gameplay).
277
+ - **Level streaming**: Load level chunks as the player approaches and unload distant chunks. Required for open-world games. All three engines support this with different APIs.
278
+
279
+ **Scene organization principles:**
280
+ - One scene file per logical unit (one level, one character, one UI screen)
281
+ - Avoid mega-scenes with everything in one file — they cause merge conflicts and slow load times
282
+ - Use scene instancing/prefabs for reusable elements (enemies, pickups, interactable objects)
283
+ - Maintain a "boot" or "persistent" scene that initializes core systems and is never unloaded
284
+
285
+ ### Game Data Tables
286
+
287
+ Game data (item stats, enemy configurations, level parameters) should be data-driven, not hardcoded:
288
+
289
+ - **JSON/YAML files**: Easy to edit, version-control-friendly, loadable by any engine; however, no type safety and need runtime validation
290
+ - **CSV/Spreadsheet exports**: Designers edit in Google Sheets or Excel, export to CSV, import into engine; good for bulk data like item databases
291
+ - **ScriptableObjects (Unity)**: Type-safe, editor-friendly, serialized as YAML; best option in Unity for designer-editable data
292
+ - **Data Tables (Unreal)**: Struct-based tables with CSV import; native Unreal solution for bulk game data
293
+ - **Resource files (Godot)**: `.tres` files with typed properties; Godot's native approach to data assets
294
+
295
+ **Rules for game data:**
296
+ - Never hardcode tuning values in scripts — always reference a data table or config asset
297
+ - Designers must be able to change game balance without touching code
298
+ - Data changes should be hot-reloadable during play testing when possible
299
+ - Validate data on load: check for missing references, out-of-range values, and broken dependencies
300
+
301
+ ### Shader and VFX Organization
302
+
303
+ - Keep custom shaders in a dedicated directory (`Shaders/`, `shaders/`)
304
+ - Name shaders by their visual purpose: `S_Water_Surface`, `S_Character_Outline`, `S_Dissolve_Effect`
305
+ - VFX (particle systems) belong in their own directory with descriptive names: `FX_Hit_Spark`, `FX_Heal_Glow`, `FX_Explosion_Small`
306
+ - Shader includes/libraries (shared functions) go in a `Shaders/Includes/` or `Shaders/Library/` subdirectory
307
+ - Profile shaders on target hardware early — complex shaders that run fine on dev machines may be unacceptable on target platforms
308
+
309
+ ### Plugin and Addon Organization
310
+
311
+ **Rules for third-party code:**
312
+ - Never modify third-party plugin source code directly — fork it or use the engine's extension/override mechanisms
313
+ - Document every plugin dependency: name, version, license, what it is used for
314
+ - Pin plugin versions — do not auto-update plugins during production
315
+ - Keep a `PLUGINS.md` or equivalent listing all dependencies, their versions, and their licenses
316
+ - If a plugin is abandoned by its maintainer, evaluate: fork and maintain, find an alternative, or build a replacement
317
+
318
+ ### Version Control Setup
319
+
320
+ Game projects require special version control configuration:
321
+
322
+ **Git LFS tracking (`.gitattributes`):**
323
+ ```
324
+ # Textures
325
+ *.png filter=lfs diff=lfs merge=lfs -text
326
+ *.tga filter=lfs diff=lfs merge=lfs -text
327
+ *.psd filter=lfs diff=lfs merge=lfs -text
328
+ *.exr filter=lfs diff=lfs merge=lfs -text
329
+
330
+ # Models
331
+ *.fbx filter=lfs diff=lfs merge=lfs -text
332
+ *.obj filter=lfs diff=lfs merge=lfs -text
333
+ *.gltf filter=lfs diff=lfs merge=lfs -text
334
+ *.glb filter=lfs diff=lfs merge=lfs -text
335
+
336
+ # Audio
337
+ *.wav filter=lfs diff=lfs merge=lfs -text
338
+ *.ogg filter=lfs diff=lfs merge=lfs -text
339
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
340
+
341
+ # Video
342
+ *.mp4 filter=lfs diff=lfs merge=lfs -text
343
+
344
+ # Engine-specific binary formats
345
+ *.uasset filter=lfs diff=lfs merge=lfs -text
346
+ *.umap filter=lfs diff=lfs merge=lfs -text
347
+ *.asset filter=lfs diff=lfs merge=lfs -text
348
+ ```
349
+
350
+ **What to gitignore per engine:**
351
+ - Unity: `Library/`, `Temp/`, `obj/`, `Logs/`, `UserSettings/`, `*.csproj`, `*.sln` (regenerated by Unity)
352
+ - Unreal: `Binaries/`, `Intermediate/`, `Saved/`, `DerivedDataCache/`, `.vs/`
353
+ - Godot: `.godot/`, `*.import` (older Godot versions), `export/`
354
+
355
+ **Merge strategy:**
356
+ - Scene files are the most conflict-prone asset in any engine
357
+ - Unity YAML scenes can sometimes be text-merged but often break — use Unity Smart Merge or lock-based workflows
358
+ - Unreal `.umap` files are binary and cannot be text-merged — use file locking (Perforce) or assign level ownership
359
+ - Godot `.tscn` files are text-based and merge better than Unity/Unreal equivalents, but complex scenes still conflict
360
+ - Rule of thumb: if two people need to edit the same scene, split it into smaller scenes that compose together