It's Sean!

UK freelance journalist, author
and writer Sean McManus

Printed from © Sean McManus.
Home > Books > Scratch Programming in Easy Steps > 10 block demos > How to make a sprite explode

How to make a sprite explode using graphic effects in Scratch

Sean McManus, author of Scratch Programming in Easy Steps and Cool Scratch Projects in Easy Steps, shows you how to make a sprite explode in Scratch

The graphic effects in Scratch can be used to distort the colour and shape of your sprites, as this picture shows:

An illustration of 8 graphic effects in Scratch

Graphic effects in Scratch, applied to a butterfly sprite to varying degrees.

In that example above, the brightness effect is using a negative number to darken the sprite to a shadow here.

To find the graphic effects, click the Looks button above the Blocks Palette. These are the blocks you use:

change color effect by 25 / set color effect to 0 / clear graphic effects

By default, the color effect is in the blocks, but you can choose the other effects using the menu in the block.

How to explode a sprite

If you use a loop together with a graphic effect to gradually apply it, you can make the sprite appear to transform. Here's an effect that uses the mosaic effect to make a sprite explode into smithereens.

when green flag clicked / show / clear graphic effects / wait 1 secs / repeat 10 / change mosaic effect by 10 / repeat ends / hide

You can make other great transitions and colour effects by changing the effect type from mosaic to one of the others.

Feel free to share that program card on your social networks, or to use this Scratch programming example in your classroom or Code Club.

Try the program

In this example, I've added a sound effect. Click the green flag to explode the spaceship after a 1 second delay.

Find out more...

Find more 10 block Scratch demos here. For more information on my Scratch books and more bonus content, visit the Scratch Programming in Easy Steps and Cool Scratch Projects in Easy Steps homepages.

Books by Sean McManus

Scratch Programming in Easy Steps

Scratch Programming in Easy Steps

Raspberry Pi For Dummies

Raspberry Pi For Dummies

Learn to program with the Scratch programming language, widely used in schools and colleges.

Set up your Pi, master Linux, learn Scratch and Python, and create your own electronics projects.

Coder Academy

Coder Academy

Cool Scratch Projects in Easy Steps

Cool Scratch Projects in Easy Steps

Learn to make games and other programs in Scratch 2.0, and make a web page in HTML, with this highly interactive book for 7-10 year olds.

Discover how to make 3D games, create mazes, build a drum machine, make a game with cartoon animals and more!

More books

Recommended articles

Stylised coloured photo of a synth

Discover my music and home recording articles

Interested in starting home recording? Follow me as I start recording, using instruments such as the Novation MiniNova and Korg Kaossilator, and share my synth and sample-based music online.

Scratch cat and rainbow circle

10-block demos for Scratch programming

Lots of people of all ages are learning to program with Scratch. Discover some useful tricks and techniques in my 10-block Scratch demos, including special effects you can drop into your games.

Paper Raspberry Pi case

Download free book chapters and more!

Download a free case for your Raspberry Pi, and free chapters from my books about the Raspberry Pi, Scratch, web design and more!

©Sean McManus.