Game feel: juice, hit stop and feedback

Give Beacon Yard's wrench real weight: server-confirmed hit feedback, 60 ms local hit stop, damped camera shake gated by ReducedMotion, floating damage numbers and layered clangs.

Lab lesson, about 85 minutes, 8 steps

By the end you can

  • Break a melee action into anticipation, server-confirmed impact and recovery beats
  • Fire hit stop, damped camera shake, damage numbers and layered audio once per confirmed hit and never on a rejected swing
  • Gate camera shake and hit stop on Accessibility.reducedMotion() while keeping crisp hit confirmation
  • Layer impact audio with pitch variation and compare hand-rolled shake against RbxUtil Shake

Before this: The wrench: tools, raycasts, tags, Animation: the Animation Editor, Moon Animator, Animator, Audio: recording, editing, licensing, the audio graph, VFX: particles, beams, trails, lighting effects

1Why Beacon Yard's wrench still feels light

Open CombatService.luau at m14-ship and trace what the server sends back when you swing the wrench:

	local now = workspace:GetServerTimeNow()
	local previousSwing = lastSwing[player]
	if previousSwing ~= nil and now - previousSwing < SWING_GAP then
		return "rejected"
	end
	lastSwing[player] = now
 
	feedback(player, "swing", nil)
 
	local params = RaycastParams.new()
	params.FilterType = Enum.RaycastFilterType.Include
	local targets = CollectionService:GetTagged(DRONE_TAG)
	for _, crawler in CollectionService:GetTagged(CRAWLER_TAG) do
		table.insert(targets, crawler)
	end
	params.FilterDescendantsInstances = targets
 
	local result = workspace:Raycast(origin, direction.Unit * Config.WRENCH_RANGE, params)
	local tag = if result then targetTag(result.Instance) else nil
	if result == nil or tag == nil then
		return "miss"
	end
 
	feedback(player, "hit", nil)
Figure 1.1

Look closely at what happens across the client files today:

  • CombatClient.luau plays VfxClient.burst(handle.Position, "impact") on the animation's Impact marker (or after SWING_IMPACT_FALLBACK_SECONDS = 0.12) on every swing, even a miss or a swing rejected by SWING_GAP = 0.4.
  • CombatService sends only feedback(player, "hit", nil) with no hit ID, no damage number, no target kind (Drone vs Crawler) and no hit position.
  • VfxClient falls back to dronePosition() even when you hit a crawler, and neither CameraClient nor CombatClient reacts to confirmed hits at all.

At m14-ship, why can a player swinging at a scrap crawler see sparks burst at the drone instead of the crawler?

  1. CombatService sends Feedback("hit") with no position, and VfxClient.start always looks up dronePosition() first on "hit"
  2. CrawlerService destroys all ParticleEmitters when a crawler spawns
  3. CombatService only raycasts against parts tagged Drone
  4. VfxClient never listens to the Feedback remote
Answer

CombatService sends Feedback("hit") with no position, and VfxClient.start always looks up dronePosition() first on "hit". Passing hit position, damage and target kind on the server's confirmed hit message lets every client effect anchor to the exact point of impact.

Open this step in lesson mode · Link to this step · This confused me

2Anticipation, impact, recovery

Client sideAnticipation, impact and recovery in combat feel is a drum hit: raising the stick, striking the skin, letting the cymbal ring.
In the pictureIn Roblox
Raising the stickAnticipation: local swing animation and whoosh before the Impact marker
Striking the skinImpact: server-confirmed hit stop, damage number, sparks, layered clang and damped camera shake
The cymbal decayingRecovery: SWING_GAP cooldown, camera spring settling and drone stun highlight

See the whole analogy cast

Every punchy action has three beats, just like a drum hit: anticipation (raising the stick), impact (striking the skin) and recovery (the cymbal ringing out).

Think of it as A drum hit: raising the stick, striking the skin, letting the cymbal ring

Beacon Yard's timings already map to the three beats (Config.luau and CombatService.luau):

  1. Anticipation (0 to 0.20 s): plays locally the instant you press swing. The swing animation starts (or, with no animation id, the procedural SwingArc: wind-up SWING_PROCEDURAL_WINDUP = 0.08, strike SWING_PROCEDURAL_STRIKE = 0.12), a trail follows the wrench and a light whoosh plays. A swing on its own makes no sparks, so a miss reads as a miss.
  2. Impact (server-confirmed): hit confirmHit confirmFeedback that fires only after the server confirms a strike connected, separating real hits from whiffs and rejected swings.Think of it as the referee's bell ringing only when the blow actually scored. arrives from CombatService. Sparks burst at the HitConfirm position, the damage pops up there, a layered clang sounds, the camera shakes briefly and hit stopHit stopA brief pause of a few frames (often 40 to 80 ms) on a confirmed impact that gives a strike physical weight.Think of it as the split-second crunch when a heavy wrench meets solid metal. pauses the swing for 0.06 s.
  3. Recovery (0.20 to 0.40 s): the wrench returns (SWING_PROCEDURAL_RETURN = 0.15), the server's swing gap (local SWING_GAP = 0.4 in CombatService.luau) runs out and the camera settles back to rest. The drone's white stun outline lasts STUN_SECONDS = 1.6 from Config.luau, well past the next swing.
Three beats of a Beacon Yard wrench swingA left-to-right timeline with Anticipation on client, Impact gated on server confirm, and Recovery returning to ready.hitsettle1. Anticipation0 to 0.2 s local2. Impactconfirmed hit + 60 ms3. Recoveryto 0.40 s SWING_GAP
Figure 2.1. Local anticipation keeps input snappy; impact juice waits for the server's confirmed hit.

Put the events of one server-confirmed wrench hit in chronological order.

  1. Client starts the wrench swing animation and sends Swing:FireServer(origin, direction)
  2. Server applies the wrench's damage and fires HitConfirm with hitId, position, damage and target
  3. Camera settles to zero offset and SWING_GAP (0.4 s) finishes for the next swing
  4. Server validates SWING_GAP and raycasts against Drone and Crawler tags
  5. Client runs 60 ms local hit stop, spawns -34 damage text, plays layered clang and starts damped shake
Answer

1. Client starts the wrench swing animation and sends Swing:FireServer(origin, direction) 2. Server validates SWING_GAP and raycasts against Drone and Crawler tags 3. Server applies the wrench's damage and fires HitConfirm with hitId, position, damage and target 4. Client runs 60 ms local hit stop, spawns -34 damage text, plays layered clang and starts damped shake 5. Camera settles to zero offset and SWING_GAP (0.4 s) finishes for the next swing. Splitting immediate local anticipation from server-confirmed impact gives responsive controls without ever faking a hit that missed.

Open this step in lesson mode · Link to this step · This confused me

3Hit confirm: never fake a confirmed hit

Client sideRemember: Anticipation, impact and recovery in combat feel is a drum hit: raising the stick, striking the skin, letting the cymbal ring.

Why not fire hit stop and damage numbers straight from a client-side raycast so they happen zero milliseconds after clicking? Since m15-scale the server rewinds the drone to where your client saw it, so lag alone no longer causes misses. The server can still reject a swing (cooldown, range, an origin far from your head), and on a 150 ms connection its answer arrives after the 0.12 s contact frame. Showing -34 on a swing the server then rejects tells the player a number that was never true. Beacon Yard waits for the confirm; the Alternatives below show the trade-off many action games make instead.

Answer the question below after checking where the drum-kit analogy breaks over a network.

Where does it break?“A drum hit: raising the stick, striking the skin, letting the cymbal ring” is a good picture of anticipation, impact and recovery in combat feel. Where does it stop being true?

It breaks here. A real drummer always hits the drum in front of them; over a network, the client starts the swing immediately, while the server decides milliseconds later whether the raycast actually hit, so impact juice must wait for server confirmation.

The true model. Combat feel splits local anticipation from server-confirmed impact. Every impact effect triggers once per confirmed hit id, never on a miss or rejected request, and suppresses camera shake and hit stop whenever Accessibility.reducedMotion() is true.

Every confirmed hit from CombatService should carry an incrementing hitId. The client keeps a tiny seen set (or ring buffer) so each hitId fires impact feedback at most once, and miss or rejected outcomes trigger zero impact juice.

Four replies reach this cell: a rejected swing, a miss and the same hit twice. Predict confirmed and silent before you press Run. Then give the last reply hitId = 4 and run it again: a second real hit should count.

Luau
local seen = {}
local confirmed, silent = 0, 0
 
local function handle(reply)
	if reply.outcome ~= "hit" or reply.damage <= 0 or seen[reply.hitId] then
		silent += 1
		return
	end
	seen[reply.hitId] = true
	confirmed += 1
end
 
handle({ outcome = "rejected", hitId = 1, damage = 34 })
handle({ outcome = "miss", hitId = 2, damage = 0 })
handle({ outcome = "hit", hitId = 3, damage = 34 })
handle({ outcome = "hit", hitId = 3, damage = 34 }) -- duplicate
print(string.format("confirmed=%d silent=%d", confirmed, silent))
Figure 3.1. Expected output: confirmed=1 silent=3

A player swings at t = 1.00 s (hits Drone) and swings again at t = 1.25 s. SWING_GAP in CombatService.luau is 0.4 seconds. What does this print?

local SWING_GAP = 0.4
local lastSwing = 1.00
local now = 1.25
local accepted = (now - lastSwing) >= SWING_GAP
local outcome = if accepted then "hit" else "rejected"
print(accepted, outcome)
  1. false rejected
  2. true hit
  3. false miss
  4. true rejected
Answer

false rejected. Because the second swing is rejected inside SWING_GAP, CombatClient must fire zero hit stop, zero shake and zero damage text for it.

Open this step in lesson mode · Link to this step · This confused me

4Hit stop, camera shake and reduced motion

Hit stop gives a 34-damage wrench swing real weight, yet one mistake breaks multiplayer: never pause the server or yield RunService.Heartbeat. Start a 0.06 s (60 ms) hit stop on the attacking client. With an authored swing animation, call track:AdjustSpeed(0) on the local AnimationTrack, then task.delay(0.06, function() track:AdjustSpeed(1) end). With no animation id (Ids.WRENCH_SWING_ANIMATION = 0), Beacon Yard swings the wrench procedurally through SwingArc on its own clock, and the hit stop pauses that clock instead. Either way, for those 60 ms the drone stays where it is drawn (DroneClient.holdFor) and the target flashes white, so the whole contact freezes, not just the arm. The pause never touches the server. The character's Animator replicates its tracks to other clients1, so with a real swing animation other players see your swing, and may see the same short freeze, with no extra code.

The procedural arc is different. It turns Tool.Grip on your client, and a Grip change made on one client stays on that client. So since m16-design-pass the server relays the swing: after CombatService accepts a swing, hit or miss, it fires SwingSeen(swinger) to every other player (SwingRelay.recipients is everyone except the swinger):

function SwingRelay.recipients<T>(players: { T }, swinger: T): { T }
	local others: { T } = {}
	for _, player in players do
		if player ~= swinger then
			table.insert(others, player)
		end
	end
	return others
Figure 4.1

Each viewer's CombatClient.swingSeen plays the same arc on the swinger's wrench with CombatClient.playSeen, sized by the viewer's own Reduced motion setting, with no trail and no sparks. Sparks stay on the swinger's own HitConfirm. The relay only runs while the animation id is 0, and it rides on swings the Swing rate limit already accepted, so it cannot flood clients. SwingSeen is also a server-only remote: a client that fires it earns a honeypot strike. The playtests swing_relay and swing_seen_arc cover both halves.

With the animation id at 0, why does Beacon Yard relay each swing through SwingSeen instead of letting the Grip change replicate?

  1. A Tool.Grip change made on one client stays on that client, so the server tells the other clients and each plays the arc itself
  2. The server writes Tool.Grip for every swing, and SwingSeen only carries the sparks
  3. Tool.Grip does replicate, but too late, so the relay is only a speed-up
  4. The relay is needed for real swing animations too, because AnimationTracks never replicate
Answer

A Tool.Grip change made on one client stays on that client, so the server tells the other clients and each plays the arc itself. A client change stays on that client. The server, which already accepted the swing, is the one place that can tell everyone else.

Camera shake follows the same client-only rule: a small damped offset on RenderStepped. Beacon Yard nudges the local Humanoid.CameraOffset2 instead of writing workspace.CurrentCamera.CFrame, so the default camera scripts keep control and the offset resets to zero when the shake ends. Beacon Yard already checks player motion preferences in Accessibility.luau (seeded from GuiService.ReducedMotionEnabled3, the setting Roblox's accessibility guide asks you to respect4) and respects them in CameraClient.luau:

function Accessibility.reducedMotion(): boolean
	return flag("ReducedMotion")
end
 
function Accessibility.largeText(): boolean
	return flag("LargeText")
Figure 4.2
local function tweenFieldOfView(camera: Camera, fieldOfView: number)
	if activeTween ~= nil then
		activeTween:Cancel()
		activeTween = nil
	end
	if Accessibility.reducedMotion() then
		camera.FieldOfView = fieldOfView
		return
	end
	local tween = TweenService:Create(camera, FOV_TWEEN, { FieldOfView = fieldOfView })
	activeTween = tween
	tween:Play()
Figure 4.3

When Accessibility.reducedMotion() is true, drop camera shake amplitude and hit stop to 0. Keep the floating -34 damage number, the reduced spark burst (VFX_REDUCED_SHARE = 0.3) and the layered clang so players who disable motion still get unmistakable hit confirmation.

This cell compares damped shake amplitudes (amp * exp(-decay * t)) with ReducedMotion off and on. Before you press Run, predict how much of the starting 0.45 is left after 0.1 s with DECAY = 18: about half, or about a sixth? Then halve DECAY and see how much longer the shake lingers.

Luau
local DECAY = 18
 
local function shakeEnvelope(amp, t, reducedMotion)
	if reducedMotion or amp <= 0 or t < 0 then
		return 0
	end
	return amp * math.exp(-DECAY * t)
end
 
print(string.format(
	"t=0.00: %.3f (reduced %.3f) | t=0.10: %.3f (reduced %.3f)",
	shakeEnvelope(0.45, 0.00, false),
	shakeEnvelope(0.45, 0.00, true),
	shakeEnvelope(0.45, 0.10, false),
	shakeEnvelope(0.45, 0.10, true)
))
Figure 4.4. Expected output: t=0.00: 0.450 (reduced 0.000) | t=0.10: 0.074 (reduced 0.000)

In Juiced mode, swing at 0 ms and 120 ms to feel what the ends of the Hit stop slider do. Try 60 ms next, then turn on Reduced motion and swing again. Watch the Damage popup and listen for the Layered clang when shake and hit stop disappear. The next step shows how those two layers work.

The hit feel bench

The hit feel bench: a still of the simulation
Figure 4.5.

Why must Beacon Yard's 60 ms hit stop pause only the attacker's local AnimationTrack instead of pausing DroneService on the server?

  1. Pausing the server freezes movement and timers for every player in the yard, whereas pausing the local track feels crisp only to the attacker
  2. Server scripts cannot call task.wait for less than 1 second
  3. AnimationTracks can only be played on the server
  4. DroneService does not run on Heartbeat
Answer

Pausing the server freezes movement and timers for every player in the yard, whereas pausing the local track feels crisp only to the attacker. Local track pause gives tactile punch without desyncing timers or hitching teammates in the same server.

Open this step in lesson mode · Link to this step · This confused me

5Damage numbers and layered audio

Two cheap client additions multiply combat clarity without clutter:

  • Floating damage numbers: a small BillboardGui that starts at the confirmed hit position showing -34 in crisp bold text, rising 2 studs over 0.7 s and fading out (cleaned up when it finishes, or returned to a small pool). Even with sound muted or ReducedMotion on, the player knows the hit connected and exactly how much damage it dealt.
  • Layered impact sound: one flat clip sounds thin after ten swings. Beacon Yard's SoundClient.luau already jitters PlaybackSpeed using Config.SFX_PITCH_SPREAD = 0.08:
local function playFlat(spec: SoundSpec, kind: FeedbackKind, group: SoundGroup, spread: number)
	local sound = Instance.new("Sound")
	sound.Name = kind
	sound.SoundId = spec.file
	sound.Volume = spec.volume
	sound.PlaybackSpeed = spec.pitch * (1 + random:NextNumber(-spread, spread))
	sound.SoundGroup = group
	sound.Looped = false
	sound.Parent = SoundService
	sound.Ended:Once(function()
		sound:Destroy()
	end)
	sound:Play()
Figure 5.1

Layer two complementary clips on a confirmed hit: a short high metallic transient (the wrench contact) plus a slightly lower body thump (heavier on Drone, snappier on Crawler), each jittered within SFX_PITCH_SPREAD. Roblox's audio guide now recommends modular AudioPlayer and Wire graphs over legacy Sound objects for new audio work5, and the same layering and pitch-spread pattern applies to both.

Roblox Studio
Beacon Yard in Studio Play on the frame of a confirmed wrench hit: floating -34 damage number rising above the drone, contact sparks and a white stun flash on the drone.

Select a numbered pin, or a row below, to read what it marks.

Figure 5.2.

A server-confirmed wrench hit: floating -34 damage text, contact sparks and white stun flash firing together on impact.

Which techniques keep Beacon Yard's wrench hits crisp without causing ear fatigue over a 10-minute session?

  1. Jitter each layer's playback speed by a small spread such as Config.SFX_PITCH_SPREAD (0.08)
  2. Layer a bright transient contact sound with a heavier low-end body thump on confirmed hits
  3. Keep the miss swing sound light and airy so confirmed hits contrast clearly against whiffs
  4. Play five identical unjittered copies of the same clip at maximum volume on every swing
Answer

Jitter each layer's playback speed by a small spread such as Config.SFX_PITCH_SPREAD (0.08); Layer a bright transient contact sound with a heavier low-end body thump on confirmed hits; Keep the miss swing sound light and airy so confirmed hits contrast clearly against whiffs. Pitch spread breaks mechanical repetition, layering adds physical weight, and contrasting whoosh vs clang makes hits readable by ear alone.

Open this step in lesson mode · Link to this step · This confused me

6Build it: wire hit confirm, hit stop, shake and numbers

Upgrade Beacon Yard's combat loop for m16-design-pass so server hits carry the data client feel needs, while Accessibility.reducedMotion() stays respected everywhere.

  • src/shared/FeelRules.luau
  • src/server/Remotes.luau
  • src/server/CombatService.luau
  • src/client/CombatClient.luau
  • src/shared/SwingArc.luau
  • src/shared/SwingRelay.luau
  • src/client/VfxClient.luau
  • src/client/DroneClient.luau
  • src/client/CameraClient.luau
  • src/client/SoundClient.luau
  • src/shared/Config.luau
  1. Add src/shared/FeelRules.luau, the finished version of this lesson's level 3 challenge. There is no separate feel module on the client: CombatClient, CameraClient and SoundClient each play their part of the plan.

    You should see FeelRules.luau exports newTracker, planHitFeedback, shakeEnvelope and jitterPitch as pure functions, with DEFAULT_HITSTOP_SECONDS = 0.06 and SHAKE_DECAY = 18.

  2. Add "HitConfirm" to the remote names in Remotes.luau. In src/server/CombatService.luau, keep a per-player hitIds counter (cleared with the player's scope), make droneHit also return the drone's rewound position, and call confirmHit(player, hitPosition, "Drone" or "Crawler") after a hit. It never fires on "miss" or "rejected". The payload's damage is the damage the server actually dealt, UpgradeService.wrenchDamage(player), so an upgraded wrench pops -54 or -74, never a number that was not true.

    You should see CombatService fires the HitConfirm remote with an incrementing id, the hit position, the damage and the target tag only when a swing hits.

  3. Add src/shared/SwingArc.luau, the wind-up, strike and return of a procedural swing (SWING_PROCEDURAL_* in Config.luau, 70 degrees, or 18 under reduced motion). In src/client/CombatClient.luau, play the animation when the id is set and the arc when it is 0, with a trail on the wrench handle for the swing's length and no spark. Connect CombatClient.confirm to HitConfirm, build the plan with FeelRules.planHitFeedback(tracker, result, Accessibility.reducedMotion()) (the tracker drops a repeated id), then call VfxClient.burst(position, "hit"), run the hit stop with DroneClient.holdFor(0.06) and a white flash, call CameraClient.shake(plan.shakeAmplitude) and spawn the popup. Delete the "hit" branch in VfxClient.start that guessed a position from the first drone; the confirm path owns hit sparks now.

    You should see A swing shows a trail and no sparks. Landing a hit bursts sparks at the hit position, pauses the swing for 60 ms (the AnimationTrack, or the procedural arc when the animation id is 0), holds the drone where it is drawn, flashes the target white, and spawns the real damage as a BillboardGui that rises 2 studs over 0.7 s. Under ReducedMotion there is no pause and the arc shrinks from 70 to 18 degrees.

  4. Add "SwingSeen" to the remote names in Remotes.luau and to RemoteGuard.SERVER_ONLY. Add src/shared/SwingRelay.luau with needed(animationAsset) (true when there is no swing animation) and recipients(players, swinger) (everyone except the swinger). In CombatService, after a swing is accepted, fire SwingSeen(swinger) to each recipient when a relay is needed. In CombatClient, connect SwingSeen to swingSeen, which drops anything that is not another player and calls playSeen(character) to run the arc on that player's Wrench with this viewer's Reduced motion setting.

    You should see In Server & Clients with two players and the animation id at 0, each player sees the other's wrench swing through the arc, with no trail and no sparks. The playtests swing_relay and swing_seen_arc pass.

  5. Add CameraClient.shake(amplitude) in src/client/CameraClient.luau. It sets a random Humanoid.CameraOffset scaled by FeelRules.shakeEnvelope on RenderStepped, reads the reduced motion setting every frame, and resets the offset to zero when done.

    You should see CameraClient applies a damped micro-shake (0.45 amplitude on Drone, 0.3 on Crawler) for at most 0.35 s, and stops at once when ReducedMotion is turned on.

  6. Add a clang entry to Config.SOUNDS. In src/client/SoundClient.luau, play it after "hit" and compute every pitch with FeelRules.jitterPitch, while "swing" keeps its light whoosh.

    You should see SoundClient plays the hit thump and a metal clang on top for every confirmed hit, each with its own pitch jitter from Config.SFX_PITCH_SPREAD.

Other ways pros do this

OptionWhat it isWhen pros pick itTrade-offs
Predicted cosmetic impact, confirmed numbersLocal sparks and hit stop on a client-side overlap; the -34 and the damage only on HitConfirm.Fast melee where a hit stop one round trip late reads as a hitch, especially at high ping.Snappier at 150 ms and above; a rare false spark on a swing the server rejects.
Hand-rolled damped shake + AdjustSpeed(0) (Beacon Yard)25 lines of exponential decay in CameraClient plus a 60 ms local track pause.You want zero dependencies, deterministic unit tests and one place to gate on Accessibility.reducedMotion().Limited to simple impulse shakes; complex trauma blending takes extra code.
RbxUtil Shake (Sleitnick/RbxUtil)MIT-licensed camera shake module (maintained, active as of 2026-11-25) with fade-in, fade-out, frequency and positional/rotational influence.Action games with many overlapping explosions, dashes and recoil profiles.Extra Wally dependency; you still wrap it with Accessibility.reducedMotion() yourself.
Server-driven camera or part tweens for hit juiceServer scripts calling TweenService on world parts for hit recoil.Avoid for combat feel.Adds latency, burns replication bandwidth and cannot respect each player's ReducedMotion setting.

A player enables ReducedMotion in Beacon Yard's Settings menu and lands a wrench hit on the drone. What should they experience?

  1. Zero camera shake and zero hit stop, while the -34 damage number, reduced spark burst, stun flash and layered clang still confirm the hit
  2. Completely silent hits with no damage number and no sparks
  3. Full camera shake because combat overrides accessibility settings
  4. The server refuses to apply wrench damage until ReducedMotion is turned off
Answer

Zero camera shake and zero hit stop, while the -34 damage number, reduced spark burst, stun flash and layered clang still confirm the hit. Good accessibility strips motion discomfort without stripping gameplay information: text, color contrast and audio still confirm every hit.

Open this step in lesson mode · Link to this step · This confused me

7Challenges

Fix planHit in the cell below so rejected and missed swings emit no feedback, and turning reducedMotion on zeroes out shake and hit stop while keeping damage text.

Luau
local DEFAULT_HITSTOP = 0.06
 
local function planHit(outcome, damage, reducedMotion)
	-- Bug: fires feedback even on miss/rejected, and ignores reducedMotion
	return {
		confirm = true,
		hitStop = DEFAULT_HITSTOP,
		shake = 0.45,
		text = "-" .. tostring(damage),
	}
end
 
local r1 = planHit("rejected", 34, false)
local r2 = planHit("hit", 34, true)
print(r1.confirm, r2.confirm, r2.shake, r2.text)
Figure 7.1. Run it in the lesson view or in the Studio command bar. The lesson view checks it with tests.

Level 1, Apprentice

Challenge

Fix planHit in hitstop-gate so only confirmed hits emit feedback and reducedMotion disables shake and hit stop without hiding damage numbers.

Start from
The game at milestone m14 (download)
Check it here
Run the code cell in the lesson view; the challenge completes when it passes. No Studio needed.

Done means

  • Return confirm = false, hitStop = 0, shake = 0, text = nil for miss or rejected swings
  • Set hitStop = 0 and shake = 0 when reducedMotion is true while keeping confirm = true and text = -34
  • All four assertions in hitstop-gate pass

Hints

  1. Guard early with if outcome ~= "hit" or damage <= 0 then ... end.
  2. Use inline conditionals for hitStop and shake based on reducedMotion.
Solution
luau
local DEFAULT_HITSTOP = 0.06
 
local function planHit(outcome, damage, reducedMotion)
	if outcome ~= "hit" or damage <= 0 then
		return { confirm = false, hitStop = 0, shake = 0, text = nil }
	end
	return {
		confirm = true,
		hitStop = if reducedMotion then 0 else DEFAULT_HITSTOP,
		shake = if reducedMotion then 0 else 0.45,
		text = "-" .. tostring(damage),
	}
end
 
local r1 = planHit("rejected", 34, false)
local r2 = planHit("hit", 34, true)
print(r1.confirm, r2.confirm, r2.shake, r2.text)

Level 2, Builder

Challenge

Run a 150 ms latency and ReducedMotion combat audit in Studio Play and write down the five highest-impact feel improvements for Beacon Yard.

Start from
The game at milestone m14 (download)

Done means

  • Test Beacon Yard combat in Studio with the Network Simulator (beta) at 75 ms inbound and 75 ms outbound latency
  • Test with ReducedMotion off and then on in SettingsGui
  • Record a 5-row feel audit covering anticipation, hit confirm clarity, miss contrast, audio repetition and reduced-motion readability

Hints

  1. Open Test > Device Simulator and set the latency under Network on its toolbar.
  2. Swing deliberately into empty air and into the drone to compare whether miss vs hit feels distinct.

Testing hit confirm and accessibility without guessing

Putting hit-ID deduplication, hit-stop clamping, reduced-motion suppression, shake decay and pitch spread into one pure planner proves that rejected swings stay silent and reduced-motion players still get clear hit confirmation.

Level 3, Professional

Challenge

Start from m14-ship in the game repo and implement the pure hit-confirm feedback planner in challenges/work/feel_rules.luau, then verify with game.ServerScriptService.RunGameTests:Invoke("game-feel", "game-feel-confirm").

Start from
The game at milestone m14 (download)
Grade it
In Studio, press Play, then run game.ServerScriptService.RunGameTests:Invoke("game-feel", "game-feel-confirm") in the server command bar. Copy the pass code from Output.

Done means

  • challenges/work/feel_rules.luau fires hit feedback once per confirmed hitId and never on miss, rejected or duplicate IDs
  • Confirmed Drone hits plan 0.06 s hit stop and 0.45 shake; Crawler hits plan 0.3 shake; both format -34 damage text and layered clang
  • reducedMotion sets hitStopSeconds and shakeAmplitude to 0 while preserving playConfirm, damageText and playLayeredClang
  • shakeEnvelope decays exponentially and jitterPitch clamps unitRoll across [1 - spread, 1 + spread]
  • RunGameTests:Invoke("game-feel", "game-feel-confirm") passes all 8 checks

Hints

  1. Track seen hit IDs in tracker.seen[result.hitId] = true right after confirming outcome == "hit" and damage > 0.
  2. In jitterPitch, clamp unitRoll to [0, 1] and compute basePitch * (1 + (u * 2 - 1) * spread).

Suppose a client listener is accidentally connected twice and receives the same confirmed hitId = 42 twice. With a seen table guard, what does this print?

local seen = {}
local fires = 0
local function onConfirm(hitId)
	if seen[hitId] then return end
	seen[hitId] = true
	fires += 1
end
onConfirm(42)
onConfirm(42)
onConfirm(43)
print(fires)
  1. 2
  2. 3
  3. 1
  4. 0
Answer

2. Deduplicating by server hitId prevents double-stacked camera shakes and earsplitting doubled hit sounds.

Open this step in lesson mode · Link to this step · This confused me

8Recap

Retiring the analogy

You no longer need “a drum hit: raising the stick, striking the skin, letting the cymbal ring”. Combat feel splits local anticipation from server-confirmed impact. Every impact effect triggers once per confirmed hit id, never on a miss or rejected request, and suppresses camera shake and hit stop whenever Accessibility.reducedMotion() is true.

Recap

  1. Split combat into immediate local anticipation, server-confirmed impact and clean recovery.
  2. Fire hit confirm (60 ms local animation hit stop, damage numbers, layered clang and damped shake) strictly once per confirmed server hitId and never on misses or rejected swings.
  3. Respect Accessibility.reducedMotion() by dropping shake and hit stop to zero while keeping damage text, reduced sparks and audio confirmation clear.
  4. Layer impact audio with pitch jitter (Config.SFX_PITCH_SPREAD) so repeated hits stay punchy across long sessions.

Anticipation, impact and recovery in combat feel is a drum hit: raising the stick, striking the skin, letting the cymbal ring, until a real drummer always hits the drum in front of them; over a network, the client starts the swing immediately, while the server decides milliseconds later whether the raycast actually hit, so impact juice must wait for server confirmation.

Next Difficulty curves and balancing with data

Open this step in lesson mode · Link to this step · This confused me