rbx-camera-shake
Skill0 starsChanged 3 months agoMITView on GitHub
Trauma-based screen shake that reads as impact, not vibration — one global trauma value, squared falloff, perlin-noise offsets, and a shared impulse vocabulary for every hit in the game. Use when the user says "screen shake", "camera shake", "impact kick", "recoil punch", "make explosions feel heavy", or when existing shake feels like buzzing, stacks from multiple scripts, or never stops. Do not use for the paired flash/hit-stop layer — load rbx-juice-screenfx — or for cutscene camera motion — load rbx-camera-cutscene instead.
In this repository253 other files it gives its agents.
- rbx-abtestSkill
- rbx-accessibilitySkill
- rbx-analytics-eventsSkill
- rbx-analytics-funnelsSkill
- rbx-analytics-readingSkill
- rbx-animationSkill
- rbx-anim-cutscenesSkill
- rbx-anim-npcSkill
- rbx-anim-proceduralSkill
- rbx-anim-rigsSkill
- rbx-anim-tweenSkill
- rbx-architectureSkill
- rbx-assets-audioSkill
- rbx-assets-id-policySkill
- rbx-assets-sanitizeSkill
- rbx-assetsSkill
- rbx-assets-toolboxSkill
- rbx-assets-webSkill
- rbx-audio-feedback-mapSkill
- rbx-audio-mixingSkill
- rbx-audio-musicSkill
- rbx-audio-sfxSkill
- rbx-audioSkill
- rbx-audio-spatialSkill
- rbx-badges-groupsSkill
- rbx-build-compositionSkill
- rbx-build-detailingSkill
- rbx-build-greyboxSkill
- rbx-buildingSkill
- rbx-build-interiorsSkill
- rbx-build-kitbashSkill
- rbx-build-landscapeSkill
- rbx-build-propsSkill
- rbx-build-scaleSkill
- rbx-build-structuresSkill
- rbx-camera-controllersSkill
- rbx-camera-cutsceneSkill
- rbx-chat-moderationSkill
- rbx-ciSkill
- rbx-combat-abilitiesSkill
- rbx-combat-hitregSkill
- rbx-combat-meleeSkill
- rbx-combat-rangedSkill
- rbx-combatSkill
- rbx-combat-statusSkill
- rbx-complianceSkill
- rbx-comprehendSkill
- rbx-controlsSkill
- rbx-data-crossserverSkill
- rbx-data-profilestoreSkill
- rbx-data-recoverySkill
- rbx-data-schemaSkill
- rbx-data-sessionlockSkill
- rbx-dataSkill
- rbx-design-difficultySkill
- rbx-design-loopSkill
- rbx-design-sheetSkill
- rbx-design-socialSkill
- rbx-economy-currenciesSkill
- rbx-economy-gachaSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
One trauma system per game: Every source calls Shake.add(amount) on a single module.
- Very specific: line 77
Read: preferences.md (the user's shake-intensity taste — some flag DISLIKE on heavy shake, which is a hard constraint) and …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
rbx-camera-shake
Laws
- One trauma system per game. Every source calls
Shake.add(amount)on a single module; trauma clamps 0–1. Two scripts applying raw CFrame offsets multiply into nausea — this is the router's standing rule, enforce it when you find violators. - Shake = trauma². Displayed magnitude is
trauma * trauma, so a 0.3 tap is barely visible while a 0.9 slam fills the screen. Linear mapping is the #1 reason shake feels flat. - Perlin, not random. Per-axis
math.noise(seed, os.clock() * 20)with seeds 1/2/3 — coherent noise reads as force;math.randomjitter reads as a rumble motor. - Compose, never overwrite. Apply after the active rig writes:
RunService:BindToRenderStep("Shake", Enum.RenderPriority.Camera.Value + 1, fn)andcamera.CFrame = camera.CFrame * offset. Overwriting the base CFrame kills every other camera system. - Rotation sells it. Max angular offset 2–4° roll/pitch/yaw, max translation 0.35 studs. Translation-only shake looks like the world moved, not the camera.
- Cosmetic, client-side — but server-sourced. World shakes broadcast from the server with a position payload; each client derives its own falloff. Never expose a remote that lets one client shake others, and never let the server trust any client shake report.
Recipes
- The core loop —
trauma = math.max(trauma - decay * dt, 0)with decay 1.2/s (a full 1.0 hit settles in ~0.8 s); when trauma is 0, write nothing and go idle — do not run noise math at zero. - Impulse vocabulary — landing/small hit
+0.2, taking damage+0.35, nearby explosion+0.6, boss slam/death blow+1.0. One table at CONFIG-top; designers tune the table, not call sites. - Distance falloff — for world events:
add(base * (1 - math.clamp((camPos - eventPos).Magnitude / 60, 0, 1)))— zero beyond 60 studs. - Sustained rumble — earthquakes/drills set a floor:
trauma = math.max(trauma, 0.3)each frame while active, released when the source ends; never+=per frame (it pins at 1). - Reduced motion — multiply final offset by the accessibility scale (1 / 0.3 / 0) from
the settings toggle wired via
rbx-ui-settings, rationale inrbx-accessibility.
Performance budget
Idle cost zero: the render-step callback early-returns (or unbinds) at trauma 0. Active
cost: 6 math.noise calls + 2 CFrame constructions per frame, no allocations, ≤ 0.05
ms/frame. One module, one connection, for the entire game.
Load with
rbx-juice-screenfx — flash, vignette, and hit-stop pair with every shake impulse; don't
ask, include it. rbx-vfx-impacts when the shake source is an explosion or hit effect.
rbx-camera-controllers when a custom rig is active, so the shake layer binds after it.
AI-tells
- ☐
math.randomoffsets — vibration, not impact - ☐ Linear trauma→magnitude mapping (small and big hits feel identical)
- ☐ Shake overwrites
camera.CFrameinstead of composing onto it - ☐ Noise math still running every frame at trauma 0
- ☐ Translation-only offsets, no roll/pitch/yaw
- ☐ Each weapon/ability shipping its own private shake loop
- ☐ No distance falloff on world explosions — everyone on the map shakes equally
- ☐ No reduced-motion scale hook
Memory
Read: preferences.md (the user's shake-intensity taste — some flag DISLIKE on heavy
shake, which is a hard constraint) and module-library.md (an existing trauma module gets
reused, never duplicated). Write: the shipped module path into module-library.md; the
game's tuned impulse table into its projects.md block after approval.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

