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.

play variation

Problem it solves

You want to fire laser guns repeatedly but want each shot to sound slightly unique in pitch, volume, and length.

What this block does

Plays a synthesized chiptune tone with randomized variations in volume, duration, and pitch.

The block

Block ID: retro_variation_sound

play variation pitch $pitch duration $duration volume $volume block

Parameters

NameTypeDefaultMeaning
pitchnumber600Target base pitch frequency in Hertz.
durationnumber100Base duration in milliseconds.
volumenumber120Base volume (0 to 255).

Example

Retro.playSoundWithVariation(700, 120, 150)

Add the extension

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