Skip to main content

Posts

Cloning sprites

 I guess that you already know what sprites in Scratch are, but have you been thinking whether it is possible to create a new sprite from the code blocks level? The answer is YES thanks to concept called clones. In the programming language Scratch, a clone is a copy of a sprite, which is an object that can be animated and interacted with. When you create a clone of a sprite, you essentially make a duplicate that can behave independently from the original.  To understand it better let's imagine we have a sprite called "Particle" in Scratch, and we want to create a particle effect. First, we'll create the code for the original particle. We can make it move randomly around the screen, change color, or do any other desired effect. The end result should looks like that: Let's start with creating variables for our particles. We need variable to store vertical and horizontal speed but also ghost effect (transparency) of the pieces. What is important here, when creating v...

How to create spinning fan in Scratch!

In today's post we will learn how to create one of the most popular animations used in games and applications called rotation. We will create a spinning fan that you probably remember from your childhood. Before we move on to the Scratch environment, we can take a look at the end result. Our animation will consist of two sprites: a fan and wings. You can imagine that the fan will act as a plastic stick that holds the paper fan wings. Let's create a fan sprite and draw it in a rectangular shape. We will create a total of four wings. To form the first one, we need to create a triangle. We need to use the Rectangle and Reshape tools. Once we have the first triangle, we need to clone it and move both close to each other. Once we have the first wing, we need to repeat the same operations to create a distinctive trio. Don't forget to change their colors to make the fan look more colorful and attractive. When our fan and wing sprites art will be ready. We need to move them so tha...

YouTube notification bar in Scratch!

Today we will create a YouTube notification bar. You've probably seen it hundreds of times while watching your favorite YouTube channels. The idea behind this notification bar is quite simple. It should remind users to click the subscribe and bell buttons. Technically, it consists of a few sprites and very simple animations. Excited? Let's get to Scratch! Our first sprite must consist of the YouTube logo, a subscribe icon and a bell, and our Franky mouse (without eyes and mouth, because we will animate them in separate sprites). We need to have 3 costumes, each of them will represent a different state of our animation: all buttons disabled subscribe button enabled subscribe and bell buttons enabled We need to prepare elements for animation in separate sprites. For now, we need to create eyes, a mouth (with the default state, mouth open and smiling) and a cursor. Now it's time for the code blocks. Let's add some code blocks for the first notification sprite. When launch...

What do operators do?

Hello everyone! Today I would like to explain to you what operators in Scratch are. How these could be described in the simplest way? Well, operators are symbols or characters that perform specific actions or make calculations on given values. In Scratch we have three main types of operators:  Arithmetic operators that are used to perform mathematical calculations. Examples of these can be: addition (+)  - adds two numbers substraction (-)  - substract second number from the first one multiplication (*)  - multiplies two numbers division (\) - divides one number by the other Comparison operators that are used to compare two values and return true or false (boolean value). Examples from that group are:  equal (=) - returns true if two values are equal, false otherwise not equal (<>) - returns true if two values are not equal, false otherwise greater than (>) - returns true if the first number is greater than the other, false otherwise less than (<) - ...

Broadcast - let’s start the communication!

We all remember our childhood and situations when our mother invited us to the table and informed us that the food was ready. All we were asked to do was sit down and enjoy our meal. Communication is a way of transferring information between different people, and in programming, between different objects. In Scratch, we can send messages using the broadcast component available in the Events section. Today we will create simple shapes and show/hide them as needed. Before we start, let's check what we will do today. Let's start by adding the first sprite called ground. As you probably guessed, this will be the lower part of our stage. When we run our program, we want to move it to the back layer so that the various sprites are not covered up. The next step is to draw a sprite called a square-button . We can treat it as a source of communication. After clicking, the message will be initialized and sent to our program. Drag and drop the broadcast component and set square-clicke...

Six-Pack recipe by Franky the mouse!

  Hey, we're happy to announce the Six Pack in a 5 minutes episode. Click below to watch and subscribe to our channel if you like it! 🐭

Franky makes his debut on YouTube!

We are happy to announce that our mouse Franky debuts on our YouTube channel @smallDevs . In the first episode, he will try to do a TikTok dance with his dad. P.S. Don't forget to click Subscribe if you like our buddy.

Franky makes a decision

In the real life we are constantly making different decision based on different factors. For example, making a decision based on weather:  if there will be raining I'll stay at home, otherwise I'll play outside . I guess that without any problems you could give some other examples making decisions based on various conditions. As you can see, every of these examples rely on a piece of information that will let us figure out whether condition (is it raining?) is fulfilled or not.  If there is a mess in my room I have to clean it up If I am hungry I have a quick snack. If I am sick I will stay in bed Similarly in programming - to make our program smarter, we let it decide how to act if certain situations. In Scratch we have if ... then and if ... then ... else command blocks which can be translated to the humans speach as in following example: To make our example way more colorful, lets move to the magical world of Franky the Mouse. I have provided you with a file containing a ...