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.

parallax camera

Problem it solves

You want background mountains or clouds to scroll slower than foreground tiles to create a 2.5D depth illusion.

What this block does

Automatically positions a background layer sprite based on the camera position divided by a parallax factor.

The block

Block ID: retro_parallax_camera

parallax camera layer $layer factor $factor block

Parameters

NameTypeDefaultMeaning
layerSpriteLayerThe background image sprite.
factornumber3Scroll divisor (higher numbers make the background move slower).

Example

let bg = sprites.create(img`.`, SpriteKind.Player)
Retro.parallaxCamera(bg, 4)

Add the extension

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