packwise-skills 1.0.0 → 1.2.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 (53) hide show
  1. package/.cursorrules +23 -23
  2. package/CLAUDE.md +25 -25
  3. package/LICENSE +21 -0
  4. package/README.md +404 -295
  5. package/audit.md +224 -224
  6. package/bin/packwise.js +322 -155
  7. package/install.sh +123 -0
  8. package/package.json +32 -31
  9. package/skill.md +944 -719
  10. package/sub-skills/ai/local-llm.md +183 -183
  11. package/sub-skills/ai/python-ml.md +164 -164
  12. package/sub-skills/backend/go-server.md +184 -184
  13. package/sub-skills/backend/java-spring.md +241 -241
  14. package/sub-skills/backend/node-server.md +164 -164
  15. package/sub-skills/backend/php-laravel.md +175 -175
  16. package/sub-skills/backend/python-server.md +164 -164
  17. package/sub-skills/backend/rust-backend.md +118 -118
  18. package/sub-skills/cli/python-cli.md +236 -236
  19. package/sub-skills/cli/sdk-library.md +497 -497
  20. package/sub-skills/cloud/ci-cd-pipelines.md +350 -350
  21. package/sub-skills/cloud/docker.md +191 -191
  22. package/sub-skills/cloud/kubernetes.md +277 -277
  23. package/sub-skills/cloud/payment-integration.md +307 -307
  24. package/sub-skills/cross-platform/multiplatform.md +252 -252
  25. package/sub-skills/desktop/electron.md +783 -783
  26. package/sub-skills/desktop/game-dev.md +443 -443
  27. package/sub-skills/desktop/native-app.md +123 -123
  28. package/sub-skills/desktop/scenarios.md +443 -443
  29. package/sub-skills/desktop/smart-platforms.md +324 -324
  30. package/sub-skills/desktop/tauri.md +428 -428
  31. package/sub-skills/desktop/vr-ar.md +252 -252
  32. package/sub-skills/desktop/web-to-desktop.md +153 -153
  33. package/sub-skills/embedded/car-infotainment.md +129 -129
  34. package/sub-skills/embedded/esp32.md +184 -184
  35. package/sub-skills/embedded/ros.md +150 -150
  36. package/sub-skills/embedded/stm32.md +160 -160
  37. package/sub-skills/mobile/android.md +322 -322
  38. package/sub-skills/mobile/capacitor.md +232 -232
  39. package/sub-skills/mobile/flutter-mobile.md +138 -138
  40. package/sub-skills/mobile/harmonyos.md +150 -150
  41. package/sub-skills/mobile/ios.md +245 -245
  42. package/sub-skills/mobile/react-native.md +443 -443
  43. package/sub-skills/mobile/wearables.md +230 -230
  44. package/sub-skills/plugins/browser-extension.md +308 -308
  45. package/sub-skills/plugins/jetbrains-plugin.md +226 -226
  46. package/sub-skills/plugins/vscode-extension.md +204 -204
  47. package/sub-skills/security/security-tools.md +174 -174
  48. package/sub-skills/web/monorepo.md +274 -274
  49. package/sub-skills/web/pwa.md +220 -220
  50. package/sub-skills/web/serverless-edge.md +295 -295
  51. package/sub-skills/web/spa.md +266 -266
  52. package/sub-skills/web/ssr.md +228 -228
  53. package/sub-skills/web/wasm.md +243 -243
@@ -1,443 +1,443 @@
1
- # Game Development Build Sub-Skill
2
-
3
- For indie games and small game studios. Covers Unity, Unreal Engine, and Godot across desktop, mobile, web, and console platforms.
4
-
5
- **Current versions**: Unity 6 (6000.x) / Unreal Engine 5.5 / Godot 4.4 (2025-2026)
6
-
7
- ---
8
-
9
- ## Unity Build
10
-
11
- ### When to Use
12
-
13
- 2D/3D indie games, cross-platform (desktop + mobile + web + console), small-to-medium teams, AR/VR applications
14
-
15
- ### Build Flow
16
-
17
- ```
18
- File → Build Settings → Select Platform → Player Settings → Build
19
- ```
20
-
21
- ### Player Settings
22
-
23
- | Setting | Windows | macOS | Linux | Android | iOS | WebGL |
24
- |---------|---------|-------|-------|---------|-----|-------|
25
- | Scripting Backend | IL2CPP | IL2CPP | IL2CPP | IL2CPP | IL2CPP | IL2CPP |
26
- | Architecture | x64 + ARM64 | Universal | x64 + ARM64 | ARM64 | ARM64 | N/A |
27
- | Compression | LZ4HC | LZ4HC | LZ4HC | LZ4HC | LZ4HC | Brotli |
28
- | API Compat. | .NET Standard 2.1 | .NET Standard 2.1 | .NET Standard 2.1 | .NET Standard 2.1 | .NET Standard 2.1 | .NET Standard 2.1 |
29
-
30
- ### IL2CPP vs Mono
31
-
32
- | Feature | IL2CPP | Mono |
33
- |---------|--------|------|
34
- | Performance | Better (AOT compilation) | Standard (JIT) |
35
- | Build speed | Slow | Fast |
36
- | Package size | Larger | Smaller |
37
- | Debugging | Limited | Full |
38
- | Platform support | All | Limited (no iOS JIT) |
39
- | **Recommendation** | Release builds | Development/debug |
40
-
41
- ### Command Line Build
42
-
43
- ```bash
44
- # Windows
45
- Unity -batchmode -nographics -projectPath . -buildTarget StandaloneWindows64 -executeMethod BuildScript.BuildWindows -quit
46
-
47
- # macOS
48
- Unity -batchmode -nographics -projectPath . -buildTarget StandaloneOSX -executeMethod BuildScript.BuildMac -quit
49
-
50
- # Linux
51
- Unity -batchmode -nographics -projectPath . -buildTarget StandaloneLinux64 -executeMethod BuildScript.BuildLinux -quit
52
-
53
- # Android (APK)
54
- Unity -batchmode -nographics -projectPath . -buildTarget Android -executeMethod BuildScript.BuildAndroid -quit
55
-
56
- # Android (AAB for Play Store)
57
- Unity -batchmode -nographics -projectPath . -buildTarget Android -executeMethod BuildScript.BuildAndroidAAB -quit
58
-
59
- # iOS (generates Xcode project, requires Mac to finalize)
60
- Unity -batchmode -nographics -projectPath . -buildTarget iOS -executeMethod BuildScript.BuildiOS -quit
61
-
62
- # WebGL
63
- Unity -batchmode -nographics -projectPath . -buildTarget WebGL -executeMethod BuildScript.BuildWebGL -quit
64
- ```
65
-
66
- ```csharp
67
- // Editor/BuildScript.cs
68
- using UnityEditor;
69
- using UnityEditor.Build.Reporting;
70
- using System.Linq;
71
-
72
- public static class BuildScript
73
- {
74
- static string[] GetScenes() =>
75
- EditorBuildSettings.scenes.Where(s => s.enabled).Select(s => s.path).ToArray();
76
-
77
- public static void BuildWindows()
78
- {
79
- var report = BuildPipeline.BuildPlayer(GetScenes(), "build/Windows/MyGame.exe",
80
- BuildTarget.StandaloneWindows64, BuildOptions.None);
81
- if (report.summary.result != BuildResult.Succeeded)
82
- throw new System.Exception("Build failed");
83
- }
84
-
85
- public static void BuildAndroid()
86
- {
87
- EditorUserBuildSettings.buildAppBundle = false;
88
- var report = BuildPipeline.BuildPlayer(GetScenes(), "build/Android/MyGame.apk",
89
- BuildTarget.Android, BuildOptions.None);
90
- if (report.summary.result != BuildResult.Succeeded)
91
- throw new System.Exception("Build failed");
92
- }
93
-
94
- public static void BuildAndroidAAB()
95
- {
96
- EditorUserBuildSettings.buildAppBundle = true;
97
- var report = BuildPipeline.BuildPlayer(GetScenes(), "build/Android/MyGame.aab",
98
- BuildTarget.Android, BuildOptions.None);
99
- if (report.summary.result != BuildResult.Succeeded)
100
- throw new System.Exception("Build failed");
101
- }
102
-
103
- public static void BuildiOS()
104
- {
105
- var report = BuildPipeline.BuildPlayer(GetScenes(), "build/iOS",
106
- BuildTarget.iOS, BuildOptions.None);
107
- if (report.summary.result != BuildResult.Succeeded)
108
- throw new System.Exception("Build failed");
109
- }
110
- }
111
- ```
112
-
113
- ### Addressables (Asset Management)
114
-
115
- ```bash
116
- # Install Addressables package
117
- # Window → Package Manager → Addressables
118
-
119
- # Build addressable content
120
- AddressableAssetSettings.BuildPlayerContent()
121
-
122
- # Use for: DLC, on-demand loading, reduce initial download
123
- ```
124
-
125
- ### Unity Mobile Builds
126
-
127
- #### Android
128
-
129
- ```bash
130
- # Prerequisites: JDK 17, Android SDK 34+, NDK r23b+
131
- # Edit → Preferences → External Tools → set JDK/SDK/NDK paths
132
-
133
- # Build settings:
134
- # - Minimum API Level: 24 (Android 7.0)
135
- # - Target API Level: 34
136
- # - Scripting Backend: IL2CPP
137
- # - Target Architectures: ARM64 (check ARMv7 for older devices)
138
- ```
139
-
140
- #### iOS
141
-
142
- ```bash
143
- # Requires macOS + Xcode
144
- # Build generates Xcode project in build/iOS/
145
-
146
- cd build/iOS
147
- xcodebuild -scheme Unity-iPhone -configuration Release -sdk iphoneos archive -archivePath build/MyGame.xcarchive
148
-
149
- # TestFlight:
150
- # Xcode → Archive → Distribute App → App Store Connect → Upload
151
- ```
152
-
153
- ### Steam Integration
154
-
155
- ```csharp
156
- using Steamworks;
157
-
158
- void Start() {
159
- if (!SteamAPI.Init()) {
160
- Debug.LogError("Steam init failed");
161
- return;
162
- }
163
- // Achievements, leaderboards, cloud saves, workshop
164
- }
165
- ```
166
-
167
- ```bash
168
- # Steamworks SDK setup:
169
- # 1. Download Steamworks SDK from partner.steamgames.com
170
- # 2. Place steam_appid.txt in project root (contains your App ID)
171
- # 3. Upload via Steamworks Depot or steamcmd
172
- ```
173
-
174
- ### Steam / itch.io / Epic Games Store
175
-
176
- | Platform | Upload Method | Fee | Revenue Share |
177
- |----------|--------------|-----|---------------|
178
- | Steam | Steamworks SDK / SteamPipe | $100 per game | 70% (30% to Valve, drops to 75/25 after $10M) |
179
- | itch.io | Web upload | Free / pay what you want | You set the share (default 0%) |
180
- | Epic Games Store | Epic Dev Portal | Free | 88% (12% to Epic) |
181
- | GOG | GOG Galaxy partner | Free | 70% |
182
-
183
- ### Common Pitfalls
184
-
185
- | Issue | Fix |
186
- |-------|-----|
187
- | IL2CPP build failure | Install Visual Studio Build Tools; check C++ compiler path |
188
- | Too many shader variants | Use Shader Stripping (Project Settings → Graphics) |
189
- | Large package | Addressables for on-demand loading; strip unused engines |
190
- | Black screen on start | Check Graphics API priority (Vulkan/OpenGL/Metal) |
191
- | Android build: "Unable to find unity activity" | Check Player Settings → Minimum API Level ≥ 24 |
192
- | iOS build: "Signing requires a development team" | Set Team ID in Xcode; requires Apple Developer account |
193
- | WebGL memory crash | Reduce texture sizes; use `WebGLMemorySize` setting |
194
- | Steam overlay not working | Ensure `steam_appid.txt` in build directory; test outside Unity Editor |
195
-
196
- ---
197
-
198
- ## Unreal Engine Build
199
-
200
- ### When to Use
201
-
202
- AAA-quality 3D graphics, realistic rendering (Lumen/Nanite), multiplayer (dedicated servers), small-to-medium teams with 3D experience
203
-
204
- ### Build Flow
205
-
206
- ```
207
- Platforms → [Target Platform] → Package Project
208
- ```
209
-
210
- ### Command Line Build
211
-
212
- ```bash
213
- # Build editor and game
214
- UnrealBuildTool.exe MyGame Win64 Development -Project="C:/MyGame/MyGame.uproject" -WaitMutex -FromMsBuild
215
-
216
- # Package for Windows
217
- RunUAT.bat BuildCookRun -project="C:/MyGame/MyGame.uproject" -noP4 -platform=Win64 -configuration=Shipping -cook -build -stage -pak -archive -archivedirectory="C:/MyGame/build"
218
-
219
- # Package for Linux
220
- RunUAT.bat BuildCookRun -project="C:/MyGame/MyGame.uproject" -noP4 -platform=Linux -configuration=Shipping -cook -build -stage -pak -archive -archivedirectory="C:/MyGame/build"
221
-
222
- # Package for Android
223
- RunUAT.bat BuildCookRun -project="C:/MyGame/MyGame.uproject" -noP4 -platform=Android -configuration=Shipping -cook -build -stage -pak -archive -archivedirectory="C:/MyGame/build"
224
-
225
- # Package for iOS
226
- RunUAT.bat BuildCookRun -project="C:/MyGame/MyGame.uproject" -noP4 -platform=IOS -configuration=Shipping -cook -build -stage -pak -archive -archivedirectory="C:/MyGame/build"
227
- ```
228
-
229
- ### Platform Configuration
230
-
231
- | Platform | Min Specs | Key Settings |
232
- |----------|-----------|-------------|
233
- | Windows | Win10 x64, DX12 GPU | RHI: DirectX 12; Ray Tracing (optional) |
234
- | Linux | Ubuntu 22.04+ | Vulkan RHI; install `libc++1` |
235
- | Android | API 29+, Vulkan GPU | Android SDK 34, NDK r25b; Vulkan ES 3.1 |
236
- | iOS | iOS 16+, A12+ chip | Metal RHI; Xcode 15+ |
237
- | macOS | macOS 13+, M1+ | Metal RHI; Xcode 15+ |
238
-
239
- ### Key Build Concepts
240
-
241
- | Concept | Description |
242
- |---------|-------------|
243
- | **Cook** | Process assets into platform-specific formats |
244
- | **Stage** | Copy cooked content + binaries to staging directory |
245
- | **Package** | Create distributable build (.exe/.apk/.ipa) |
246
- | **Pak** | Pack content into `.pak` files for distribution |
247
- | **Shipping** | Final build config: no debug, fully optimized, no console |
248
-
249
- ### Optimization
250
-
251
- | Technique | Description |
252
- |-----------|-------------|
253
- | **Nanite** | Virtualized geometry (millions of polygons, auto-LOD) |
254
- | **Lumen** | Global illumination + reflections (software or hardware ray tracing) |
255
- | **World Partition** | Stream large worlds in cells |
256
- | **Level Streaming** | Load/unload levels dynamically |
257
- | **Texture Streaming** | Load textures on demand |
258
- | **Shader Permutation Reduction** | Reduce shader compile time and package size |
259
-
260
- ### Steam Integration (UE5)
261
-
262
- ```cpp
263
- // DefaultEngine.ini
264
- [OnlineSubsystem]
265
- DefaultPlatformService=Steam
266
-
267
- [OnlineSubsystemSteam]
268
- bEnabled=true
269
- SteamDevAppId=480 // Replace with your App ID
270
-
271
- [/Script/Engine.GameEngine]
272
- +NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
273
- ```
274
-
275
- ### Common Pitfalls
276
-
277
- | Issue | Fix |
278
- |-------|-----|
279
- | Build takes hours | Enable `Editor → Cook on the Fly`; use SSD; increase `MaxParallelActions` |
280
- | Package too large (10GB+) | Use Pak file compression; remove unused plugins; reduce texture quality levels |
281
- | Android Vulkan crash | Test on target device; set minimum GPU feature level |
282
- | iOS provisioning error | Set Team ID in Project Settings → Platforms → iOS → Signing |
283
- | Shader compilation takes forever | Enable Shader Pipeline Caching; pre-compile shaders |
284
- | Linux missing .so files | Include Vulkan validation layers; install system dependencies |
285
- | Memory crash on mobile | Reduce texture resolution; disable Lumen on mobile; use software ray tracing |
286
-
287
- ---
288
-
289
- ## Godot Build
290
-
291
- ### When to Use
292
-
293
- 2D indie games, lightweight 3D, free and open source, low learning curve, rapid prototyping
294
-
295
- ### Export Flow
296
-
297
- ```
298
- Project → Export → Select Platform → Configure → Export Project
299
- ```
300
-
301
- ### Command Line Export
302
-
303
- ```bash
304
- # Desktop
305
- godot --headless --export-release "Windows Desktop" build/Windows/MyGame.exe
306
- godot --headless --export-release "macOS" build/macOS/MyGame.dmg
307
- godot --headless --export-release "Linux/X11" build/Linux/MyGame.x86_64
308
-
309
- # Mobile
310
- godot --headless --export-release "Android" build/Android/MyGame.apk
311
- godot --headless --export-release "iOS" build/iOS/MyGame.ipa
312
-
313
- # Web
314
- godot --headless --export-release "Web" build/Web/
315
-
316
- # Debug builds (with remote debugging)
317
- godot --headless --export-debug "Windows Desktop" build/MyGame-debug.exe
318
- ```
319
-
320
- ### Platform Export Configuration
321
-
322
- | Platform | Export Preset | Key Settings |
323
- |----------|--------------|-------------|
324
- | Windows | Windows Desktop | Architecture: x86_64; Embed PCK: on |
325
- | macOS | macOS | Code signing identity; Bundle identifier |
326
- | Linux | Linux/X11 | Architecture: x86_64 or arm64 |
327
- | Android | Android | Min SDK 24, Target SDK 34; Keystore; Gradle build |
328
- | iOS | iOS | Team ID; Bundle identifier; Provisioning profile |
329
- | Web | Web | Export type: Regular (WASM); Headless: off |
330
-
331
- ### Android Export Setup
332
-
333
- ```bash
334
- # Prerequisites: JDK 17, Android SDK 34+, Gradle 8.x
335
-
336
- # In Godot Editor:
337
- # Editor → Manage Export Templates → Download
338
- # Export → Android → Set:
339
- # - Min SDK: 24
340
- # - Target SDK: 34
341
- # - Keystore: path to debug.keystore or release keystore
342
- # - Gradle Build: Use Gradle Build (recommended)
343
- ```
344
-
345
- ### iOS Export Setup
346
-
347
- ```bash
348
- # Requires macOS + Xcode 15+
349
- # In Godot Editor → Export → iOS:
350
- # - Team ID: your Apple Developer Team ID
351
- # - Bundle Identifier: com.yourcompany.mygame
352
- # - Provisioning Profile: automatic
353
-
354
- # After export, open .xcodeproj in Xcode:
355
- # Product → Archive → Distribute to TestFlight/App Store
356
- ```
357
-
358
- ### Web Export Notes
359
-
360
- ```bash
361
- # Web export generates:
362
- # - index.html
363
- # - MyGame.wasm
364
- # - MyGame.pck (game data)
365
- # - MyGame.js (loader)
366
-
367
- # Hosting requirements:
368
- # - Server must send correct MIME type: application/wasm
369
- # - CORS headers: Cross-Origin-Opener-Policy: same-origin
370
- # - Cross-Origin-Embedder-Policy: require-corp
371
- # (Required for SharedArrayBuffer / threads)
372
-
373
- # nginx config:
374
- location ~* \.wasm$ { types { application/wasm wasm; } }
375
- add_header Cross-Origin-Opener-Policy "same-origin";
376
- add_header Cross-Origin-Embedder-Policy "require-corp";
377
- ```
378
-
379
- ### GDScript vs C#
380
-
381
- | Feature | GDScript | C# |
382
- |---------|---------|-----|
383
- | Performance | Standard | Better (for complex logic) |
384
- | Package size | Smaller | Larger (needs .NET runtime) |
385
- | Learning curve | Low | Medium |
386
- | Ecosystem | Godot native | .NET ecosystem |
387
- | Web export | Full support | Limited (.NET WASM overhead) |
388
- | **Recommendation** | 2D games, rapid prototyping | 3D games, C#-experienced teams |
389
-
390
- ### itch.io Publishing
391
-
392
- ```bash
393
- # 1. Export as HTML5 (Web) or Windows/macOS/Linux
394
- # 2. Zip the build output
395
- # 3. Upload to itch.io project page
396
- # 4. Set "This file will be played in the browser" for HTML5
397
- # 5. Set viewport size to match your game resolution
398
- ```
399
-
400
- ### Common Pitfalls
401
-
402
- | Issue | Fix |
403
- |-------|-----|
404
- | Export template missing | Editor → Manage Export Templates → Download |
405
- | macOS signing | Configure signing identity + entitlements in Export settings |
406
- | C# build failure | Install correct .NET SDK version (8.0+); `dotnet build` first |
407
- | Android build: Gradle error | Check JDK 17; Android SDK path in Editor Settings |
408
- | Web export: blank screen | Check browser console; ensure .wasm MIME type is set |
409
- | Web export: SharedArrayBuffer error | Set COOP/COEP headers on web server |
410
- | Large .pck file | Compress textures; use OGG Vorbis for audio; remove unused resources |
411
- | Touch input not working (mobile) | Enable Touch input in Project Settings → Input Devices |
412
-
413
- ---
414
-
415
- ## Engine Selection Guide
416
-
417
- | Scenario | Recommended Engine | Why |
418
- |----------|-------------------|-----|
419
- | 2D indie game | Godot | Free, lightweight, fast iteration |
420
- | 2D/3D cross-platform | Unity | Most mature cross-platform pipeline |
421
- | AAA-quality 3D | Unreal Engine | Nanite, Lumen, best-in-class rendering |
422
- | Mobile-first game | Unity | Best mobile tooling and performance |
423
- | Web game | Godot or Unity | Both have good WASM support |
424
- | AR/VR application | Unity or Unreal | Unity: mobile VR; Unreal: PC VR |
425
- | Multiplayer game | Unreal Engine | Built-in dedicated server, replication |
426
- | Game jam / prototype | Godot | Zero cost, fastest setup |
427
- | Learning game dev | Godot or Unity | GDScript/C# easier than C++ |
428
- | Console publishing | Unity or Unreal | Both have official console SDK support |
429
-
430
- ---
431
-
432
- ## Universal Game Packaging Checklist
433
-
434
- 1. **Test on target hardware** — not just the development machine
435
- 2. **Strip debug symbols** — reduces package size 30–50%
436
- 3. **Compress textures** — ASTC (mobile), BC7 (desktop), BPTC (VR)
437
- 4. **Audio format** — OGG Vorbis (small), WAV (quality-critical SFX)
438
- 5. **Shader compilation** — pre-compile for target platform to avoid runtime stutters
439
- 6. **Save system** — test save/load across app updates
440
- 7. **Input handling** — support keyboard+mouse, gamepad, and touch where applicable
441
- 8. **Localization** — use engine's i18n system; test text overflow
442
- 9. **Platform-specific** — achievements, leaderboards, cloud saves per platform
443
- 10. **Legal** — EULA, privacy policy, age rating (IARC for stores)
1
+ # Game Development Build Sub-Skill
2
+
3
+ For indie games and small game studios. Covers Unity, Unreal Engine, and Godot across desktop, mobile, web, and console platforms.
4
+
5
+ **Current versions**: Unity 6 (6000.x) / Unreal Engine 5.5 / Godot 4.4 (2025-2026)
6
+
7
+ ---
8
+
9
+ ## Unity Build
10
+
11
+ ### When to Use
12
+
13
+ 2D/3D indie games, cross-platform (desktop + mobile + web + console), small-to-medium teams, AR/VR applications
14
+
15
+ ### Build Flow
16
+
17
+ ```
18
+ File → Build Settings → Select Platform → Player Settings → Build
19
+ ```
20
+
21
+ ### Player Settings
22
+
23
+ | Setting | Windows | macOS | Linux | Android | iOS | WebGL |
24
+ |---------|---------|-------|-------|---------|-----|-------|
25
+ | Scripting Backend | IL2CPP | IL2CPP | IL2CPP | IL2CPP | IL2CPP | IL2CPP |
26
+ | Architecture | x64 + ARM64 | Universal | x64 + ARM64 | ARM64 | ARM64 | N/A |
27
+ | Compression | LZ4HC | LZ4HC | LZ4HC | LZ4HC | LZ4HC | Brotli |
28
+ | API Compat. | .NET Standard 2.1 | .NET Standard 2.1 | .NET Standard 2.1 | .NET Standard 2.1 | .NET Standard 2.1 | .NET Standard 2.1 |
29
+
30
+ ### IL2CPP vs Mono
31
+
32
+ | Feature | IL2CPP | Mono |
33
+ |---------|--------|------|
34
+ | Performance | Better (AOT compilation) | Standard (JIT) |
35
+ | Build speed | Slow | Fast |
36
+ | Package size | Larger | Smaller |
37
+ | Debugging | Limited | Full |
38
+ | Platform support | All | Limited (no iOS JIT) |
39
+ | **Recommendation** | Release builds | Development/debug |
40
+
41
+ ### Command Line Build
42
+
43
+ ```bash
44
+ # Windows
45
+ Unity -batchmode -nographics -projectPath . -buildTarget StandaloneWindows64 -executeMethod BuildScript.BuildWindows -quit
46
+
47
+ # macOS
48
+ Unity -batchmode -nographics -projectPath . -buildTarget StandaloneOSX -executeMethod BuildScript.BuildMac -quit
49
+
50
+ # Linux
51
+ Unity -batchmode -nographics -projectPath . -buildTarget StandaloneLinux64 -executeMethod BuildScript.BuildLinux -quit
52
+
53
+ # Android (APK)
54
+ Unity -batchmode -nographics -projectPath . -buildTarget Android -executeMethod BuildScript.BuildAndroid -quit
55
+
56
+ # Android (AAB for Play Store)
57
+ Unity -batchmode -nographics -projectPath . -buildTarget Android -executeMethod BuildScript.BuildAndroidAAB -quit
58
+
59
+ # iOS (generates Xcode project, requires Mac to finalize)
60
+ Unity -batchmode -nographics -projectPath . -buildTarget iOS -executeMethod BuildScript.BuildiOS -quit
61
+
62
+ # WebGL
63
+ Unity -batchmode -nographics -projectPath . -buildTarget WebGL -executeMethod BuildScript.BuildWebGL -quit
64
+ ```
65
+
66
+ ```csharp
67
+ // Editor/BuildScript.cs
68
+ using UnityEditor;
69
+ using UnityEditor.Build.Reporting;
70
+ using System.Linq;
71
+
72
+ public static class BuildScript
73
+ {
74
+ static string[] GetScenes() =>
75
+ EditorBuildSettings.scenes.Where(s => s.enabled).Select(s => s.path).ToArray();
76
+
77
+ public static void BuildWindows()
78
+ {
79
+ var report = BuildPipeline.BuildPlayer(GetScenes(), "build/Windows/MyGame.exe",
80
+ BuildTarget.StandaloneWindows64, BuildOptions.None);
81
+ if (report.summary.result != BuildResult.Succeeded)
82
+ throw new System.Exception("Build failed");
83
+ }
84
+
85
+ public static void BuildAndroid()
86
+ {
87
+ EditorUserBuildSettings.buildAppBundle = false;
88
+ var report = BuildPipeline.BuildPlayer(GetScenes(), "build/Android/MyGame.apk",
89
+ BuildTarget.Android, BuildOptions.None);
90
+ if (report.summary.result != BuildResult.Succeeded)
91
+ throw new System.Exception("Build failed");
92
+ }
93
+
94
+ public static void BuildAndroidAAB()
95
+ {
96
+ EditorUserBuildSettings.buildAppBundle = true;
97
+ var report = BuildPipeline.BuildPlayer(GetScenes(), "build/Android/MyGame.aab",
98
+ BuildTarget.Android, BuildOptions.None);
99
+ if (report.summary.result != BuildResult.Succeeded)
100
+ throw new System.Exception("Build failed");
101
+ }
102
+
103
+ public static void BuildiOS()
104
+ {
105
+ var report = BuildPipeline.BuildPlayer(GetScenes(), "build/iOS",
106
+ BuildTarget.iOS, BuildOptions.None);
107
+ if (report.summary.result != BuildResult.Succeeded)
108
+ throw new System.Exception("Build failed");
109
+ }
110
+ }
111
+ ```
112
+
113
+ ### Addressables (Asset Management)
114
+
115
+ ```bash
116
+ # Install Addressables package
117
+ # Window → Package Manager → Addressables
118
+
119
+ # Build addressable content
120
+ AddressableAssetSettings.BuildPlayerContent()
121
+
122
+ # Use for: DLC, on-demand loading, reduce initial download
123
+ ```
124
+
125
+ ### Unity Mobile Builds
126
+
127
+ #### Android
128
+
129
+ ```bash
130
+ # Prerequisites: JDK 17, Android SDK 34+, NDK r23b+
131
+ # Edit → Preferences → External Tools → set JDK/SDK/NDK paths
132
+
133
+ # Build settings:
134
+ # - Minimum API Level: 24 (Android 7.0)
135
+ # - Target API Level: 34
136
+ # - Scripting Backend: IL2CPP
137
+ # - Target Architectures: ARM64 (check ARMv7 for older devices)
138
+ ```
139
+
140
+ #### iOS
141
+
142
+ ```bash
143
+ # Requires macOS + Xcode
144
+ # Build generates Xcode project in build/iOS/
145
+
146
+ cd build/iOS
147
+ xcodebuild -scheme Unity-iPhone -configuration Release -sdk iphoneos archive -archivePath build/MyGame.xcarchive
148
+
149
+ # TestFlight:
150
+ # Xcode → Archive → Distribute App → App Store Connect → Upload
151
+ ```
152
+
153
+ ### Steam Integration
154
+
155
+ ```csharp
156
+ using Steamworks;
157
+
158
+ void Start() {
159
+ if (!SteamAPI.Init()) {
160
+ Debug.LogError("Steam init failed");
161
+ return;
162
+ }
163
+ // Achievements, leaderboards, cloud saves, workshop
164
+ }
165
+ ```
166
+
167
+ ```bash
168
+ # Steamworks SDK setup:
169
+ # 1. Download Steamworks SDK from partner.steamgames.com
170
+ # 2. Place steam_appid.txt in project root (contains your App ID)
171
+ # 3. Upload via Steamworks Depot or steamcmd
172
+ ```
173
+
174
+ ### Steam / itch.io / Epic Games Store
175
+
176
+ | Platform | Upload Method | Fee | Revenue Share |
177
+ |----------|--------------|-----|---------------|
178
+ | Steam | Steamworks SDK / SteamPipe | $100 per game | 70% (30% to Valve, drops to 75/25 after $10M) |
179
+ | itch.io | Web upload | Free / pay what you want | You set the share (default 0%) |
180
+ | Epic Games Store | Epic Dev Portal | Free | 88% (12% to Epic) |
181
+ | GOG | GOG Galaxy partner | Free | 70% |
182
+
183
+ ### Common Pitfalls
184
+
185
+ | Issue | Fix |
186
+ |-------|-----|
187
+ | IL2CPP build failure | Install Visual Studio Build Tools; check C++ compiler path |
188
+ | Too many shader variants | Use Shader Stripping (Project Settings → Graphics) |
189
+ | Large package | Addressables for on-demand loading; strip unused engines |
190
+ | Black screen on start | Check Graphics API priority (Vulkan/OpenGL/Metal) |
191
+ | Android build: "Unable to find unity activity" | Check Player Settings → Minimum API Level ≥ 24 |
192
+ | iOS build: "Signing requires a development team" | Set Team ID in Xcode; requires Apple Developer account |
193
+ | WebGL memory crash | Reduce texture sizes; use `WebGLMemorySize` setting |
194
+ | Steam overlay not working | Ensure `steam_appid.txt` in build directory; test outside Unity Editor |
195
+
196
+ ---
197
+
198
+ ## Unreal Engine Build
199
+
200
+ ### When to Use
201
+
202
+ AAA-quality 3D graphics, realistic rendering (Lumen/Nanite), multiplayer (dedicated servers), small-to-medium teams with 3D experience
203
+
204
+ ### Build Flow
205
+
206
+ ```
207
+ Platforms → [Target Platform] → Package Project
208
+ ```
209
+
210
+ ### Command Line Build
211
+
212
+ ```bash
213
+ # Build editor and game
214
+ UnrealBuildTool.exe MyGame Win64 Development -Project="C:/MyGame/MyGame.uproject" -WaitMutex -FromMsBuild
215
+
216
+ # Package for Windows
217
+ RunUAT.bat BuildCookRun -project="C:/MyGame/MyGame.uproject" -noP4 -platform=Win64 -configuration=Shipping -cook -build -stage -pak -archive -archivedirectory="C:/MyGame/build"
218
+
219
+ # Package for Linux
220
+ RunUAT.bat BuildCookRun -project="C:/MyGame/MyGame.uproject" -noP4 -platform=Linux -configuration=Shipping -cook -build -stage -pak -archive -archivedirectory="C:/MyGame/build"
221
+
222
+ # Package for Android
223
+ RunUAT.bat BuildCookRun -project="C:/MyGame/MyGame.uproject" -noP4 -platform=Android -configuration=Shipping -cook -build -stage -pak -archive -archivedirectory="C:/MyGame/build"
224
+
225
+ # Package for iOS
226
+ RunUAT.bat BuildCookRun -project="C:/MyGame/MyGame.uproject" -noP4 -platform=IOS -configuration=Shipping -cook -build -stage -pak -archive -archivedirectory="C:/MyGame/build"
227
+ ```
228
+
229
+ ### Platform Configuration
230
+
231
+ | Platform | Min Specs | Key Settings |
232
+ |----------|-----------|-------------|
233
+ | Windows | Win10 x64, DX12 GPU | RHI: DirectX 12; Ray Tracing (optional) |
234
+ | Linux | Ubuntu 22.04+ | Vulkan RHI; install `libc++1` |
235
+ | Android | API 29+, Vulkan GPU | Android SDK 34, NDK r25b; Vulkan ES 3.1 |
236
+ | iOS | iOS 16+, A12+ chip | Metal RHI; Xcode 15+ |
237
+ | macOS | macOS 13+, M1+ | Metal RHI; Xcode 15+ |
238
+
239
+ ### Key Build Concepts
240
+
241
+ | Concept | Description |
242
+ |---------|-------------|
243
+ | **Cook** | Process assets into platform-specific formats |
244
+ | **Stage** | Copy cooked content + binaries to staging directory |
245
+ | **Package** | Create distributable build (.exe/.apk/.ipa) |
246
+ | **Pak** | Pack content into `.pak` files for distribution |
247
+ | **Shipping** | Final build config: no debug, fully optimized, no console |
248
+
249
+ ### Optimization
250
+
251
+ | Technique | Description |
252
+ |-----------|-------------|
253
+ | **Nanite** | Virtualized geometry (millions of polygons, auto-LOD) |
254
+ | **Lumen** | Global illumination + reflections (software or hardware ray tracing) |
255
+ | **World Partition** | Stream large worlds in cells |
256
+ | **Level Streaming** | Load/unload levels dynamically |
257
+ | **Texture Streaming** | Load textures on demand |
258
+ | **Shader Permutation Reduction** | Reduce shader compile time and package size |
259
+
260
+ ### Steam Integration (UE5)
261
+
262
+ ```cpp
263
+ // DefaultEngine.ini
264
+ [OnlineSubsystem]
265
+ DefaultPlatformService=Steam
266
+
267
+ [OnlineSubsystemSteam]
268
+ bEnabled=true
269
+ SteamDevAppId=480 // Replace with your App ID
270
+
271
+ [/Script/Engine.GameEngine]
272
+ +NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
273
+ ```
274
+
275
+ ### Common Pitfalls
276
+
277
+ | Issue | Fix |
278
+ |-------|-----|
279
+ | Build takes hours | Enable `Editor → Cook on the Fly`; use SSD; increase `MaxParallelActions` |
280
+ | Package too large (10GB+) | Use Pak file compression; remove unused plugins; reduce texture quality levels |
281
+ | Android Vulkan crash | Test on target device; set minimum GPU feature level |
282
+ | iOS provisioning error | Set Team ID in Project Settings → Platforms → iOS → Signing |
283
+ | Shader compilation takes forever | Enable Shader Pipeline Caching; pre-compile shaders |
284
+ | Linux missing .so files | Include Vulkan validation layers; install system dependencies |
285
+ | Memory crash on mobile | Reduce texture resolution; disable Lumen on mobile; use software ray tracing |
286
+
287
+ ---
288
+
289
+ ## Godot Build
290
+
291
+ ### When to Use
292
+
293
+ 2D indie games, lightweight 3D, free and open source, low learning curve, rapid prototyping
294
+
295
+ ### Export Flow
296
+
297
+ ```
298
+ Project → Export → Select Platform → Configure → Export Project
299
+ ```
300
+
301
+ ### Command Line Export
302
+
303
+ ```bash
304
+ # Desktop
305
+ godot --headless --export-release "Windows Desktop" build/Windows/MyGame.exe
306
+ godot --headless --export-release "macOS" build/macOS/MyGame.dmg
307
+ godot --headless --export-release "Linux/X11" build/Linux/MyGame.x86_64
308
+
309
+ # Mobile
310
+ godot --headless --export-release "Android" build/Android/MyGame.apk
311
+ godot --headless --export-release "iOS" build/iOS/MyGame.ipa
312
+
313
+ # Web
314
+ godot --headless --export-release "Web" build/Web/
315
+
316
+ # Debug builds (with remote debugging)
317
+ godot --headless --export-debug "Windows Desktop" build/MyGame-debug.exe
318
+ ```
319
+
320
+ ### Platform Export Configuration
321
+
322
+ | Platform | Export Preset | Key Settings |
323
+ |----------|--------------|-------------|
324
+ | Windows | Windows Desktop | Architecture: x86_64; Embed PCK: on |
325
+ | macOS | macOS | Code signing identity; Bundle identifier |
326
+ | Linux | Linux/X11 | Architecture: x86_64 or arm64 |
327
+ | Android | Android | Min SDK 24, Target SDK 34; Keystore; Gradle build |
328
+ | iOS | iOS | Team ID; Bundle identifier; Provisioning profile |
329
+ | Web | Web | Export type: Regular (WASM); Headless: off |
330
+
331
+ ### Android Export Setup
332
+
333
+ ```bash
334
+ # Prerequisites: JDK 17, Android SDK 34+, Gradle 8.x
335
+
336
+ # In Godot Editor:
337
+ # Editor → Manage Export Templates → Download
338
+ # Export → Android → Set:
339
+ # - Min SDK: 24
340
+ # - Target SDK: 34
341
+ # - Keystore: path to debug.keystore or release keystore
342
+ # - Gradle Build: Use Gradle Build (recommended)
343
+ ```
344
+
345
+ ### iOS Export Setup
346
+
347
+ ```bash
348
+ # Requires macOS + Xcode 15+
349
+ # In Godot Editor → Export → iOS:
350
+ # - Team ID: your Apple Developer Team ID
351
+ # - Bundle Identifier: com.yourcompany.mygame
352
+ # - Provisioning Profile: automatic
353
+
354
+ # After export, open .xcodeproj in Xcode:
355
+ # Product → Archive → Distribute to TestFlight/App Store
356
+ ```
357
+
358
+ ### Web Export Notes
359
+
360
+ ```bash
361
+ # Web export generates:
362
+ # - index.html
363
+ # - MyGame.wasm
364
+ # - MyGame.pck (game data)
365
+ # - MyGame.js (loader)
366
+
367
+ # Hosting requirements:
368
+ # - Server must send correct MIME type: application/wasm
369
+ # - CORS headers: Cross-Origin-Opener-Policy: same-origin
370
+ # - Cross-Origin-Embedder-Policy: require-corp
371
+ # (Required for SharedArrayBuffer / threads)
372
+
373
+ # nginx config:
374
+ location ~* \.wasm$ { types { application/wasm wasm; } }
375
+ add_header Cross-Origin-Opener-Policy "same-origin";
376
+ add_header Cross-Origin-Embedder-Policy "require-corp";
377
+ ```
378
+
379
+ ### GDScript vs C#
380
+
381
+ | Feature | GDScript | C# |
382
+ |---------|---------|-----|
383
+ | Performance | Standard | Better (for complex logic) |
384
+ | Package size | Smaller | Larger (needs .NET runtime) |
385
+ | Learning curve | Low | Medium |
386
+ | Ecosystem | Godot native | .NET ecosystem |
387
+ | Web export | Full support | Limited (.NET WASM overhead) |
388
+ | **Recommendation** | 2D games, rapid prototyping | 3D games, C#-experienced teams |
389
+
390
+ ### itch.io Publishing
391
+
392
+ ```bash
393
+ # 1. Export as HTML5 (Web) or Windows/macOS/Linux
394
+ # 2. Zip the build output
395
+ # 3. Upload to itch.io project page
396
+ # 4. Set "This file will be played in the browser" for HTML5
397
+ # 5. Set viewport size to match your game resolution
398
+ ```
399
+
400
+ ### Common Pitfalls
401
+
402
+ | Issue | Fix |
403
+ |-------|-----|
404
+ | Export template missing | Editor → Manage Export Templates → Download |
405
+ | macOS signing | Configure signing identity + entitlements in Export settings |
406
+ | C# build failure | Install correct .NET SDK version (8.0+); `dotnet build` first |
407
+ | Android build: Gradle error | Check JDK 17; Android SDK path in Editor Settings |
408
+ | Web export: blank screen | Check browser console; ensure .wasm MIME type is set |
409
+ | Web export: SharedArrayBuffer error | Set COOP/COEP headers on web server |
410
+ | Large .pck file | Compress textures; use OGG Vorbis for audio; remove unused resources |
411
+ | Touch input not working (mobile) | Enable Touch input in Project Settings → Input Devices |
412
+
413
+ ---
414
+
415
+ ## Engine Selection Guide
416
+
417
+ | Scenario | Recommended Engine | Why |
418
+ |----------|-------------------|-----|
419
+ | 2D indie game | Godot | Free, lightweight, fast iteration |
420
+ | 2D/3D cross-platform | Unity | Most mature cross-platform pipeline |
421
+ | AAA-quality 3D | Unreal Engine | Nanite, Lumen, best-in-class rendering |
422
+ | Mobile-first game | Unity | Best mobile tooling and performance |
423
+ | Web game | Godot or Unity | Both have good WASM support |
424
+ | AR/VR application | Unity or Unreal | Unity: mobile VR; Unreal: PC VR |
425
+ | Multiplayer game | Unreal Engine | Built-in dedicated server, replication |
426
+ | Game jam / prototype | Godot | Zero cost, fastest setup |
427
+ | Learning game dev | Godot or Unity | GDScript/C# easier than C++ |
428
+ | Console publishing | Unity or Unreal | Both have official console SDK support |
429
+
430
+ ---
431
+
432
+ ## Universal Game Packaging Checklist
433
+
434
+ 1. **Test on target hardware** — not just the development machine
435
+ 2. **Strip debug symbols** — reduces package size 30–50%
436
+ 3. **Compress textures** — ASTC (mobile), BC7 (desktop), BPTC (VR)
437
+ 4. **Audio format** — OGG Vorbis (small), WAV (quality-critical SFX)
438
+ 5. **Shader compilation** — pre-compile for target platform to avoid runtime stutters
439
+ 6. **Save system** — test save/load across app updates
440
+ 7. **Input handling** — support keyboard+mouse, gamepad, and touch where applicable
441
+ 8. **Localization** — use engine's i18n system; test text overflow
442
+ 9. **Platform-specific** — achievements, leaderboards, cloud saves per platform
443
+ 10. **Legal** — EULA, privacy policy, age rating (IARC for stores)