DEV Community

Alteca
Alteca

Posted on • Edited on

3 Scratch Smoothness tips

Hey,
Here I'll show you how to make your Scratch projects very smooth and crisp. I'm really obsessed with smoothness and I hope this tutorial will help you a lot. Note that I am using Scratch addons so my screen looks different from yours, but that's okay.

The Smooth Size Algorithm

The smooth size change algorithm

This is the first algorithm I'd like to show you, what it does is basically it makes the size of an object smoothly change to a target-size so that it doesn't do it immediately. In the example of this algorithm's use above the sprite with this code inside it will smoothly grow when it is hovered over by the mouse cursor. the "targetsize" input is the normal size of the sprite which you can set to anything you like.

The Smooth Flying Algorithm

The flying over algorithm

This is an algorithm so that an object smoothly zooms to your mouse cursor and doesn't just stick to it. The "Polish" variable is there so that you see that this isn't a value you have to copy from me, but modify according to your needs.

ALWAYS ROUND CORNERS

Squares with rounded corners
In UI/UX there is a rule, round corners whenever possible and so that it fits with the theme. If your theme is blocky keep it, but blockiness just doesn't fit with all the fancy algorithms you've learned here so stick to the rule and round your corners.

Top comments (0)