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.

Credits

© Sean McManus. All rights reserved.

Visit www.sean.co.uk for free chapters from Sean's coding books (including Mission Python, Scratch Programming in Easy Steps and Coder Academy) and more!

Discover my latest books and music

Artificial: album cover shows a steampunk heart

Artificial

What happens beyond AI when the machines become emotional? Discover my new album of electronic music here.

Mission Python book

Mission Python

Code a space adventure game in this Python programming book published by No Starch Press.

Coder Academy book

Coder Academy

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

Cool Scratch Projects in Easy Steps book

Cool Scratch Projects in Easy Steps

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

Walking astronaut from Mission Python book Top | Search | Help | Privacy | Access Keys | Contact me
Home | Blog | Copywriting Services | Books | Free book chapters | Articles | Photos | Games | Shop | About