summer-engine 1.5.0 → 2.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 (101) hide show
  1. package/{marketplace.json → .claude-plugin/marketplace.json} +3 -3
  2. package/.claude-plugin/plugin.json +52 -11
  3. package/.codex-plugin/plugin.json +69 -8
  4. package/.cursor-plugin/plugin.json +53 -12
  5. package/.factory-plugin/plugin.json +20 -0
  6. package/.opencode/INSTALL.md +75 -0
  7. package/.opencode/plugins/summer.js +9 -6
  8. package/AGENTS.md +51 -0
  9. package/CHANGELOG.md +31 -1
  10. package/CLAUDE.md +5 -0
  11. package/GEMINI.md +56 -0
  12. package/README.md +409 -80
  13. package/_persona/summer/SKILL.md +113 -0
  14. package/dist/bin/summer.js +0 -0
  15. package/dist/commands/assets.d.ts +2 -0
  16. package/dist/commands/assets.js +189 -0
  17. package/dist/commands/create.js +55 -17
  18. package/dist/commands/debug.d.ts +2 -0
  19. package/dist/commands/debug.js +127 -0
  20. package/dist/commands/install.js +2 -2
  21. package/dist/commands/list.js +24 -5
  22. package/dist/commands/project.d.ts +2 -0
  23. package/dist/commands/project.js +170 -0
  24. package/dist/commands/scene.d.ts +2 -0
  25. package/dist/commands/scene.js +290 -0
  26. package/dist/lib/banner.js +2 -2
  27. package/dist/lib/log-filters.d.ts +53 -0
  28. package/dist/lib/log-filters.js +130 -0
  29. package/dist/lib/plugin-manifests.test.d.ts +1 -0
  30. package/dist/lib/plugin-manifests.test.js +134 -0
  31. package/dist/lib/remote-templates.d.ts +25 -0
  32. package/dist/lib/remote-templates.js +86 -0
  33. package/dist/lib/skills-registry.d.ts +283 -3
  34. package/dist/lib/skills-registry.js +522 -2
  35. package/dist/lib/telemetry.d.ts +13 -0
  36. package/dist/lib/telemetry.js +63 -0
  37. package/dist/lib/with-engine.d.ts +14 -0
  38. package/dist/lib/with-engine.js +109 -0
  39. package/dist/mcp/tools/asset-tools.js +12 -13
  40. package/dist/mcp/tools/debug-tools.js +32 -9
  41. package/dist/mcp/tools/generate-tools.js +101 -0
  42. package/dist/mcp/tools/with-engine.js +4 -0
  43. package/gemini-extension.json +2 -2
  44. package/hooks/pre-commit-doctor.sh +0 -0
  45. package/hooks/run-hook.cmd +0 -0
  46. package/hooks/session-start.sh +0 -0
  47. package/package.json +11 -5
  48. package/skills/2d-assets/character-portrait/SKILL.md +196 -0
  49. package/skills/2d-assets/concept-art/SKILL.md +152 -0
  50. package/skills/2d-assets/pixel-art/SKILL.md +180 -0
  51. package/skills/2d-assets/skybox-panorama/SKILL.md +207 -0
  52. package/skills/2d-assets/sprite-sheet/SKILL.md +239 -0
  53. package/skills/2d-assets/tileable-texture/SKILL.md +205 -0
  54. package/skills/2d-assets/ui-graphics/SKILL.md +210 -0
  55. package/skills/3d-assets/character-model/SKILL.md +225 -0
  56. package/skills/3d-assets/environment-kit/SKILL.md +164 -0
  57. package/skills/3d-assets/organic-model/SKILL.md +192 -0
  58. package/skills/3d-assets/prop-model/SKILL.md +133 -0
  59. package/skills/3d-assets/vehicle-model/SKILL.md +202 -0
  60. package/skills/README.md +1 -1
  61. package/skills/_meta/skill-create/SKILL.md +1 -1
  62. package/skills/_meta/skill-improve/SKILL.md +1 -1
  63. package/skills/_meta/skill-test/SKILL.md +1 -1
  64. package/skills/_meta/using-summer/SKILL.md +130 -0
  65. package/skills/ai-and-npcs/design-npc/SKILL.md +3 -1
  66. package/skills/animation/animation-tree/SKILL.md +260 -0
  67. package/skills/animation/facial-and-lipsync/SKILL.md +282 -0
  68. package/skills/animation/generate-motion/SKILL.md +129 -0
  69. package/skills/animation/procedural-animation/SKILL.md +234 -0
  70. package/skills/animation/retarget/SKILL.md +172 -0
  71. package/skills/asset-pipeline/asset-strategy/SKILL.md +102 -212
  72. package/skills/audio/adaptive-music/SKILL.md +326 -0
  73. package/skills/audio/ambient-bed/SKILL.md +278 -0
  74. package/skills/audio/music-track/SKILL.md +268 -0
  75. package/skills/audio/sound-effect/SKILL.md +237 -0
  76. package/skills/audio/voice-line/SKILL.md +253 -0
  77. package/skills/catalog.yaml +266 -5
  78. package/skills/character-controllers/fps-controller/SKILL.md +1 -1
  79. package/skills/debugging/debug/SKILL.md +102 -82
  80. package/skills/rendering-and-lighting/3d-lighting/SKILL.md +1 -1
  81. package/skills/scene-and-project/browse-templates/SKILL.md +105 -0
  82. package/skills/scene-and-project/make-game/SKILL.md +159 -346
  83. package/skills/scene-and-project/new-project/SKILL.md +106 -0
  84. package/skills/scene-and-project/scene-composition/SKILL.md +1 -1
  85. package/skills/scripting-patterns/gdscript-patterns/SKILL.md +1 -1
  86. package/skills/ui-and-ux/ui-basics/SKILL.md +1 -1
  87. package/skills/video/animated-loop/SKILL.md +200 -0
  88. package/skills/video/cinematic-cutscene/SKILL.md +204 -0
  89. package/skills/video/trailer-shot/SKILL.md +203 -0
  90. package/skills/visual-effects/_building-blocks/additive-billboard-particles.md +28 -0
  91. package/skills/visual-effects/_building-blocks/noise-3d-fbm.gdshaderinc +45 -0
  92. package/skills/visual-effects/_building-blocks/trauma-shake-snippet.md +51 -0
  93. package/skills/visual-effects/{vfx → game-feel}/SKILL.md +1 -1
  94. package/skills/visual-effects/recipes/dissolve/SKILL.md +349 -0
  95. package/skills/visual-effects/recipes/fire/SKILL.md +387 -0
  96. package/skills/visual-effects/recipes/hit-spark/SKILL.md +330 -0
  97. package/skills/visual-effects/recipes/lightning/SKILL.md +372 -0
  98. package/skills/visual-effects/recipes/magic-glow/SKILL.md +377 -0
  99. package/skills/visual-effects/recipes/muzzle-flash/SKILL.md +326 -0
  100. package/skills/visual-effects/recipes/smoke/SKILL.md +381 -0
  101. package/skills/visual-effects/recipes/water-ripple/SKILL.md +340 -0
@@ -0,0 +1,203 @@
1
+ ---
2
+ name: trailer-shot
3
+ description: Use when generating marketing or trailer footage — slow-mo combat, dramatic establishing shots, hero beats, splash screens, pitch-deck B-roll. Optimizes for maximum visual punch in 5-10 seconds. Trigger on "trailer", "marketing footage", "Steam capsule video", "splash screen", "hero shot", "pitch deck clip", "promo clip", "money shot", "B-roll".
4
+ license: MIT
5
+ compatibility: [Cursor, Claude Code, Windsurf, Codex]
6
+ category: video
7
+ user-invocable: true
8
+ allowed-tools: Read Grep Glob Write Edit summer_generate_video summer_generate_image summer_search_assets summer_import_from_url summer_add_node summer_set_prop
9
+ paths: ["assets/video/**", "trailers/**", "marketing/**"]
10
+ ---
11
+
12
+ # trailer-shot — Loud, Confident, 5-10 Seconds of Punch
13
+
14
+ A trailer shot is not a cutscene and not a loop. It is a single, deliberately-composed beat designed to live inside an edit — Steam capsule video, social cut, pitch-deck reel, Discord teaser, Twitter promo. Every shot has to earn its slot in 5 seconds or less because viewer attention drops past that. This skill produces those shots one at a time, with strong composition references and trailer-grade prompting, then hands the user off to a non-linear editor (DaVinci Resolve, Premiere, CapCut) to chain them. **Studio doesn't ship a video editor** — generation is the part this skill owns; the cutting is yours.
15
+
16
+ If the user is generating a non-interactive narrative beat with dialogue, that's `video/cinematic-cutscene`. If they want a seamless background loop for a splash screen, that's `video/animated-loop`. This skill is for the punchy stuff — the kind of shot that ends up on the Steam page or in the first 10 seconds of a launch trailer.
17
+
18
+ ## When to use
19
+
20
+ - "Generate a slow-mo combat shot for the trailer."
21
+ - "I need a hero shot of the boss for the Steam capsule."
22
+ - "Dramatic establishing shot of the kingdom for the pitch deck."
23
+ - "Make a splash-screen video for the title menu."
24
+ - "Some B-roll of the swamp environment."
25
+ - "Money shot — wide low-angle of the dragon roaring at sunset."
26
+
27
+ ## When NOT to use
28
+
29
+ - Multi-shot story sequence with dialogue — `video/cinematic-cutscene`.
30
+ - Seamless looping background — `video/animated-loop`.
31
+ - Static marketing key art — `2d-assets/concept-art` then `2d-assets/character-portrait`.
32
+ - Animated GIF of UI — that's a screen recording, not a generated video.
33
+ - A literal Steam trailer (the assembled cut) — generate the shots here, then take them to your NLE.
34
+
35
+ ## Steps
36
+
37
+ ### 1. Pick the shot
38
+
39
+ Trailer shots fall into a small number of archetypes. Pick one before prompting:
40
+
41
+ | Archetype | Composition | When |
42
+ |---|---|---|
43
+ | **Hero close-up** | Tight on the protagonist or boss, low angle | Reveal a character |
44
+ | **Slow-mo combat** | Mid shot, time dilation, frozen impact | Action sells |
45
+ | **Establishing wide** | Wide landscape, slow dolly-in | Sell a world |
46
+ | **Dolly-in on detail** | Push toward a key prop or face | Build tension |
47
+ | **Whip pan reveal** | Fast pan, lands on a beat | Reveal a turn |
48
+ | **Low-angle hero** | Looking up at the subject, sky framing | Make the subject feel large |
49
+ | **Splash card** | Static composition, atmospheric motion only | Title cards, logos |
50
+
51
+ State the archetype and composition out loud before generating: "I'll do a low-angle hero shot of the boss, slow tilt-up, golden hour. OK?"
52
+
53
+ ### 2. Lock the look with a reference image (when subject identity matters)
54
+
55
+ For shots featuring a specific character, weapon, or environment, generate a reference still first and pass it as `imageUrl`. Without it, the boss in your trailer looks different from the boss in the game.
56
+
57
+ ```
58
+ summer_generate_image(
59
+ prompt="<subject>, <archetype-driven framing>, cinematic, dramatic lighting, film still",
60
+ model="nano-banana-2",
61
+ options={ image_size: "landscape_16_9" }
62
+ )
63
+ ```
64
+
65
+ For pure environment / abstract / VFX shots, you can skip this and prompt text-to-video directly.
66
+
67
+ ### 3. Pick the model
68
+
69
+ | Model | Cost | Speed | When |
70
+ |---|---|---|---|
71
+ | `kling` | ~$0.50 | 2-4 min | Default for trailer hero shots — best motion + composition |
72
+ | `kling-turbo` | ~$0.30 | 1-2 min | Same look as kling, faster, slight quality dip |
73
+ | `veo3` | ~$1.00 | 3-5 min | Pitch deck for investors, the one shot that has to be perfect, premium social ad |
74
+ | `ltx` | ~$0.10 | ~30s | B-roll, throwaway tests, blocking the composition before committing |
75
+ | `minimax` | ~$0.40 | 2-3 min | Anime / stylized trailer looks |
76
+
77
+ Default: **`ltx` first to block the composition, then `kling` for the final**. For the *one* hero shot that drives the Steam page, escalate to `veo3` only if `kling` failed twice.
78
+
79
+ ### 4. Generate the shot
80
+
81
+ ```
82
+ summer_generate_video(
83
+ prompt="<archetype framing>, <subject>, <action>, <camera move>, <lighting>, <film grain / lens / stylistic anchor>",
84
+ model="kling",
85
+ imageUrl="<optional reference URL from step 2>",
86
+ duration=5,
87
+ aspectRatio="16:9"
88
+ )
89
+ ```
90
+
91
+ For vertical social (TikTok, Reels, Shorts): `aspectRatio="9:16"` and frame the subject vertically in your reference image.
92
+
93
+ For square (Instagram feed): `aspectRatio="1:1"`.
94
+
95
+ ### 5. Review against trailer logic
96
+
97
+ Show the user the result and ask the trailer-specific questions:
98
+
99
+ > Shot delivered. Three checks:
100
+ > 1. Does it read in 2 seconds with the sound off? (Trailer viewers are scrubbing.)
101
+ > 2. Is the subject in the frame's golden zone or buried in noise?
102
+ > 3. Would this shot survive being preceded by a hard cut and followed by a hard cut?
103
+ >
104
+ > Land or regenerate?
105
+
106
+ If "regenerate", revise *one* axis (camera move, lighting, or framing) — don't rewrite the whole prompt. Iteration converges.
107
+
108
+ ### 6. Import for archive (optional)
109
+
110
+ Trailer footage usually lives on the user's local disk and goes straight into the NLE. But for shots that double as in-engine splash content, import:
111
+
112
+ ```
113
+ summer_import_from_url(url="<fileUrl>", path="assets/video/trailers/hero_boss_reveal.mp4")
114
+ ```
115
+
116
+ For pure trailer use (DaVinci / Premiere), the user can grab the `fileUrl` and download directly.
117
+
118
+ ### 7. Hand off to the NLE
119
+
120
+ Studio does not ship a video editor. After all the shots land, tell the user:
121
+
122
+ > All 6 shots are at these URLs. Studio doesn't cut video. Drop these into DaVinci Resolve (free), Premiere, or CapCut. Recommended order based on what we generated:
123
+ > 1. Establishing wide (cold open)
124
+ > 2. Hero close-up (subject reveal)
125
+ > 3-5. Action beats (slow-mo combat, environmental destruction)
126
+ > 6. Money shot (low-angle hero, ends on logo card)
127
+ >
128
+ > Score it with the music from `audio/music-track`. Add SFX hits on the cuts with `audio/sound-effect`.
129
+
130
+ ## Reference card — prompts that work
131
+
132
+ Pattern: `<archetype framing> + <subject> + <action verb> + <camera move> + <lighting / time of day> + <stylistic anchor>`. Keep under 50 words. Anchor with a reference image whenever a specific character or asset appears.
133
+
134
+ | Goal | Model | Prompt | Cost | Duration |
135
+ |---|---|---|---|---|
136
+ | Hero boss reveal | `kling` | `low-angle hero shot of an armored dragon turning toward camera, slow tilt-up, volcanic backlight, embers in air, cinematic, anamorphic flare, 16mm grain` | $0.50 | 5s |
137
+ | Slow-mo combat impact | `kling` | `mid shot of a swordsman striking a parry, sparks fly, time-dilation slow motion, dust and motion blur, dramatic side-light, cinematic` | $0.50 | 5s |
138
+ | Establishing kingdom wide | `kling` | `wide aerial of a clifftop fortress at golden hour, slow dolly forward, low sun raking the towers, cinematic, anamorphic, faint heat haze` | $0.50 | 5s |
139
+ | Splash screen card | `kling` | `static composition of a lone hooded figure on a windswept ridge, only the cloak and grass moving, dusk, painterly cinematic, room for title text upper third` | $0.50 | 5s |
140
+ | Whip pan reveal | `kling` | `whip pan from left to right across a battlefield at night, lands on the protagonist standing alone among bodies, torches flickering, cinematic` | $0.50 | 5s |
141
+ | Detail dolly-in | `kling` | `slow dolly-in on a glowing rune-etched sword embedded in stone, motes of magic rising, blue-cold key light, shallow depth of field, cinematic` | $0.50 | 5s |
142
+ | Vertical social hero | `kling` | `vertical close-up of a young witch raising hands, magical wind, hair flowing, candle-warm key, cinematic, framed for 9:16` | $0.50 | 5s |
143
+ | Pitch-deck premium shot | `veo3` | `wide cinematic of a fleet of airships emerging through cloud cover at dawn, slow truck forward, golden god-rays, soaring orchestral cinematic` | $1.00 | 5s |
144
+ | Cheap B-roll iteration | `ltx` | `mid shot of a knight walking through fog, slow truck backward, dawn light, cinematic` | $0.10 | 5s |
145
+ | Anime style hero | `minimax` | `anime-style hero girl draws a katana in slow motion, sakura petals swirling, dramatic side-light, dynamic camera, Ghibli painterly` | $0.40 | 5s |
146
+
147
+ ### Bad prompts and why
148
+
149
+ | Bad | Why it fails |
150
+ |---|---|
151
+ | `epic trailer shot of the boss` | No framing, no action, no camera. Returns a generic montage. |
152
+ | `the camera flies through the entire battlefield, sees the king, then the dragon, then the hero` | Three shots in one prompt. The model picks one badly. Generate three shots. |
153
+ | `cool cinematic with lots of explosions and combat` | Adjective stew. Pick one beat: "wide shot of a barricade exploding, debris arc into camera, slow-mo, side-lit". |
154
+ | `realistic 4k 60fps trending on artstation` | Trash modifiers. The model knows "cinematic" already; the rest is noise. |
155
+ | `the dragon roars at the hero and the hero strikes back` | Two characters interacting reliably fails — the model loses identity on the second one. Generate them in separate shots and intercut. |
156
+
157
+ ## Anti-patterns
158
+
159
+ - **Trying to chain shots inside one video generation.** Each clip is one beat. The cut between shots is the editor's job, not the model's. A 10s prompt with three actions returns mush.
160
+ - **Skipping the reference image for the hero shot.** The boss in the Steam capsule must look like the boss in the game. Always lock identity with `imageUrl`.
161
+ - **Using `veo3` for B-roll.** Burn $0.10 on `ltx` for blocking and B-roll; reserve `veo3` for the one shot that has to be perfect.
162
+ - **Generating shots without composing the trailer first.** Make a 6-shot list before generating shot 1. Otherwise you'll generate shots that don't intercut.
163
+ - **Using `aspectRatio="16:9"` for vertical social.** TikTok / Reels / Shorts are `9:16`. Pillarboxed 16:9 reads as a desktop YouTube embed and gets demoted by the algorithm.
164
+ - **Forgetting that Studio doesn't cut video.** The user has to take the shots into an NLE. Tell them, don't pretend Studio can stitch.
165
+ - **Asking for "the camera does X then Y then Z".** Pick one camera move per shot.
166
+
167
+ ## Edge cases
168
+
169
+ - **Steam capsule animated header (Steam asset).** Steam wants `.webm` at 616x353 or 1920x1080, ≤6s, 30fps, no audio, ≤4MB. Generate at 16:9, transcode in DaVinci, export `.webm` with VP9. The video model gives you the source; format conversion is on you.
170
+ - **Pitch deck for investors.** One shot, `veo3`, money composition (low-angle hero or wide establishing). Worth the $1.00.
171
+ - **Vertical for TikTok / Shorts.** `aspectRatio="9:16"`, reference image at portrait, frame the subject in the upper-middle so titles can sit at the bottom.
172
+ - **Subject is a UGC environment the player built.** Take a screenshot of the in-engine view, run it through `summer_generate_image` as `referenceImageUrl` to "upgrade" the look, then use that as the video reference. The model can stylize a screenshot; it can't invent the user's level.
173
+ - **Logo splash with motion graphics.** Generate a static logo card in `summer_generate_image` (or use the user's existing logo PNG), then prompt video as `static composition of <logo>, only background particles drifting, cinematic, room for title text` — keep the foreground motionless.
174
+
175
+ ## Fallback (no MCP)
176
+
177
+ If the Studio MCP server isn't running, route the user to the Studio web dashboard:
178
+
179
+ 1. Image tab → generate the reference still.
180
+ 2. Video tab → image-to-video with the reference URL, model `kling`, duration 5s, aspect ratio per platform.
181
+ 3. Download the `.mp4` directly into the user's editing project (DaVinci / Premiere / CapCut).
182
+
183
+ Print the exact prompt + model + duration + aspect ratio so the user can paste it into the dashboard verbatim.
184
+
185
+ ## Handoff
186
+
187
+ Once the shots are generated:
188
+
189
+ > Generated 6 shots, ready for the cut. Next:
190
+ > - Take them into DaVinci Resolve (free) or Premiere. Studio doesn't cut video.
191
+ > - Score the trailer with `audio/music-track` — a 60-second trailer cue with a swell and a cold ending.
192
+ > - Add hit SFX on the cuts with `audio/sound-effect` (impact whooshes between shots).
193
+ > - For the title-card splash that ships in-engine, hand off to `video/animated-loop` with the established palette.
194
+ > - For a narrative beat inside the trailer (a 10s "story" segment), hand off to `video/cinematic-cutscene`.
195
+
196
+ ## See also
197
+
198
+ - `video/cinematic-cutscene` — narrative beats with dialogue.
199
+ - `video/animated-loop` — seamless background clips for splash screens / title menus.
200
+ - `audio/music-track` — trailer score.
201
+ - `audio/sound-effect` — cut SFX (whooshes, impacts, stingers).
202
+ - `2d-assets/concept-art` — generate the reference image axis when no asset exists yet.
203
+ - `_shared/mcp-tools-reference.md` — `summer_generate_video` parameter schema and error codes.
@@ -0,0 +1,28 @@
1
+ # Additive Billboard Particles — Canonical Material Settings
2
+
3
+ Reusable `BaseMaterial3D` configuration for additive particle billboards (motes, sparks, glow, ash). Used by `magic-glow`, optionally substitutable in `hit-spark` and `fire` if a custom shader is overkill.
4
+
5
+ ## Settings
6
+
7
+ ```
8
+ transparency: BaseMaterial3D.TRANSPARENCY_ALPHA
9
+ blend_mode: BaseMaterial3D.BLEND_MODE_ADD
10
+ shading_mode: BaseMaterial3D.SHADING_MODE_UNSHADED
11
+ billboard_mode: BaseMaterial3D.BILLBOARD_PARTICLES
12
+ emission_enabled: true
13
+ emission_energy_multiplier: 3.0 // 1.0–5.0 typical; bump for HDR bloom
14
+ disable_receive_shadows: true
15
+ shadow_to_opacity: false
16
+ no_depth_test: false // true only if particles must read on TOP of opaque geometry
17
+ albedo_color: Color(R, G, B, 1.0)
18
+ emission: Color(R, G, B) // usually same as albedo for single-color motes
19
+ ```
20
+
21
+ ## When to use this vs a custom shader
22
+
23
+ - **Use this `BaseMaterial3D` config** when the effect is just a tinted soft-circle mote (magic glow, sparkles, dust). Less code, faster iteration, free Godot-managed billboard math.
24
+ - **Use a custom `ShaderMaterial`** when you need per-particle color ramps over `CUSTOM.x` age (fire), shape masks (muzzle flash star burst), or stretched streaks (hit-spark). Those can't be expressed in `BaseMaterial3D`.
25
+
26
+ ## Performance note
27
+
28
+ Additive overdraw is fillrate-bound. Keep `draw_pass_1.size <= 0.2` for motes/sparks; larger quads at full additive intensity destroy mobile fillrate budgets fast.
@@ -0,0 +1,45 @@
1
+ // 3D Fractal Brownian Motion noise — used by fire, dissolve, smoke, magic-glow.
2
+ // Include with: #include "res://addons/vfx/_building-blocks/noise-3d-fbm.gdshaderinc"
3
+
4
+ float hash3(vec3 p) {
5
+ p = fract(p * vec3(443.8975, 397.2973, 491.1871));
6
+ p += dot(p, p.yxz + 19.19);
7
+ return fract((p.x + p.y) * p.z);
8
+ }
9
+
10
+ float noise3(vec3 p) {
11
+ vec3 i = floor(p);
12
+ vec3 f = fract(p);
13
+ f = f * f * (3.0 - 2.0 * f);
14
+
15
+ float n000 = hash3(i + vec3(0.0, 0.0, 0.0));
16
+ float n100 = hash3(i + vec3(1.0, 0.0, 0.0));
17
+ float n010 = hash3(i + vec3(0.0, 1.0, 0.0));
18
+ float n110 = hash3(i + vec3(1.0, 1.0, 0.0));
19
+ float n001 = hash3(i + vec3(0.0, 0.0, 1.0));
20
+ float n101 = hash3(i + vec3(1.0, 0.0, 1.0));
21
+ float n011 = hash3(i + vec3(0.0, 1.0, 1.0));
22
+ float n111 = hash3(i + vec3(1.0, 1.0, 1.0));
23
+
24
+ float x00 = mix(n000, n100, f.x);
25
+ float x10 = mix(n010, n110, f.x);
26
+ float x01 = mix(n001, n101, f.x);
27
+ float x11 = mix(n011, n111, f.x);
28
+
29
+ float y0 = mix(x00, x10, f.y);
30
+ float y1 = mix(x01, x11, f.y);
31
+
32
+ return mix(y0, y1, f.z);
33
+ }
34
+
35
+ float fbm3(vec3 p) {
36
+ float v = 0.0;
37
+ float amp = 0.5;
38
+ float freq = 1.0;
39
+ for (int i = 0; i < 4; i++) {
40
+ v += amp * noise3(p * freq);
41
+ freq *= 2.0;
42
+ amp *= 0.5;
43
+ }
44
+ return v;
45
+ }
@@ -0,0 +1,51 @@
1
+ # Trauma Camera Shake — Reusable Snippet
2
+
3
+ Variant of the canonical "trauma model" shake (see `visual-effects/game-feel/SKILL.md` for the full game-feel discipline). Lightning and explosion recipes call `add_trauma()` to chain visual impact with screen-level reaction.
4
+
5
+ ## Setup (autoload script)
6
+
7
+ `autoloads/CameraShake.gd`:
8
+
9
+ ```gdscript
10
+ extends Node
11
+
12
+ var trauma: float = 0.0
13
+ var trauma_decay: float = 1.4
14
+ var max_offset: Vector3 = Vector3(0.4, 0.4, 0.0)
15
+ var max_yaw: float = 0.05
16
+ var max_pitch: float = 0.05
17
+ var camera: Camera3D
18
+
19
+ func _process(delta: float) -> void:
20
+ if camera == null:
21
+ camera = get_viewport().get_camera_3d()
22
+ if camera == null:
23
+ return
24
+ if trauma > 0.0:
25
+ var s = trauma * trauma // perceived intensity grows quadratically
26
+ var t = Time.get_ticks_msec() * 0.01
27
+ camera.h_offset = max_offset.x * s * (randf() * 2.0 - 1.0)
28
+ camera.v_offset = max_offset.y * s * (randf() * 2.0 - 1.0)
29
+ camera.rotation.x += max_pitch * s * (randf() * 2.0 - 1.0) * 0.1
30
+ camera.rotation.y += max_yaw * s * (randf() * 2.0 - 1.0) * 0.1
31
+ trauma = max(0.0, trauma - trauma_decay * delta)
32
+ else:
33
+ camera.h_offset = 0.0
34
+ camera.v_offset = 0.0
35
+
36
+ func add_trauma(amount: float) -> void:
37
+ trauma = clamp(trauma + amount, 0.0, 1.0)
38
+ ```
39
+
40
+ Register `CameraShake` as autoload in Project Settings.
41
+
42
+ ## Usage
43
+
44
+ ```gdscript
45
+ # In a recipe controller:
46
+ CameraShake.add_trauma(0.6) # lightning strike
47
+ CameraShake.add_trauma(1.0) # explosion (saturates to max)
48
+ CameraShake.add_trauma(0.2) # hit spark
49
+ ```
50
+
51
+ The trauma model: noise-driven shake whose intensity grows quadratically with `trauma`. Multiple sources stack but saturate — a player taking 5 hits in a row shakes harder, but never beyond the max.
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: vfx
2
+ name: game-feel
3
3
  description: Use when the user says the game "feels flat", "lacks impact", "needs juice", "needs punch", or asks for hit feedback, screen shake, camera shake, audio ducking, or general "game feel". Walks the user through the canonical Godot 4.5 game-feel stack — hit-flash + trauma camera shake + audio ducking — wired together so a single hit fires all three. Trigger on "vfx", "juice", "punch", "feels flat", "game feel", "hit flash", "screen shake", "camera shake", "ducking".
4
4
  license: MIT
5
5
  compatibility: [Cursor, Claude Code, Windsurf, Codex]