MakeCode Games!

A fan-made community library of MakeCode Arcade games. Visit MakeCode Arcade to make a game!

← Back to extensions

Retro FX

Add juicy 8-bit sound synthesizers, screen shakes, particle explosions, camera effects, and retro text displays to your games.

camera follow lag

Problem it solves

You want your camera to follow the player smoothly with cinematic easing rather than snapping rigidly to their center.

What this block does

Updates the scene camera on every frame to smoothly interpolate toward the target sprite position with configurable lag.

The block

Block ID: retro_camera_follow_lag

camera follow $sprite lag $lag block

Parameters

NameTypeDefaultMeaning
spriteSpritePlayerThe sprite the camera should track.
lagnumber4Smoothing divisor (higher numbers make the camera slower and floatier).

Example

let hero = sprites.create(img`.`, SpriteKind.Player)
Retro.cameraFollowLag(hero, 6)

Add the extension

Add github:CrzLe0723/RetroFx to your project, or open: Import RetroFx.