Programming a DJ Crab

Sumário

CONNECT

 

Animations are like stories in motion! They consist of many different images shown rapidly one after another. This creates the illusion that characters are moving and things are happening on the screen. You have probably seen animations in cartoons, movies, and even in some video games! They are fun to watch and help us tell stories in a special and exciting way.

 

CONTEMPLATE

 

DO YOU KNOW WHAT A PROGRAMMING LANGUAGE IS?

 

A programming language is a way to communicate with computers, allowing programmers to create programs and instructions for various tasks. It consists of a set of rules and symbols that define how commands should be written and interpreted by the computer. These languages are used to develop applications, websites, and automate processes in different fields, enabling programmers to solve complex problems efficiently and control specific computer actions.

One example is Scratch, a visual programming language developed by MIT, offering an accessible and fun approach to learning programming by replacing lines of code with colorful blocks in a graphical interface. It can be accessed at: https://scratch.mit.edu/.

 

 

Learning programming with Scratch is simple since it uses a graphical interface and blocks that fit together like LEGO pieces.

 

 

Watch the video and see some project examples:

WHAT CAN BE CREATED USING SCRATCH?

 

With Scratch, you can create a variety of projects, such as interactive stories, games, animations, educational projects, and interactive applications.

The platform offers a wide range of creative possibilities for users to explore.

 

GETTING TO KNOW THE PROGRAM INTERFACE

 

The program interface is quite intuitive and easy to use.

1 – Stage: The area where all the graphical and animated parts of the project will be displayed and where tests will be conducted.

2 – Scripts Area: The area where programming takes place. Here, the codes that will be developed and the blocks that will be dragged will be located.

 

 

3 – Blocks Palette: All the blocks used will be in this area. They are divided by color, and within each color, the blocks have different shapes. Each color represents a function, and depending on the shape, the block returns or reads a specific type of value.

In the Scripts Area, the blocks that will be compiled (transformed into a program) will be located, and the result will be displayed through the Stage.

4 – Actors List: An area that allows viewing, inserting, and modifying images that will appear on the Stage. Also known as “Sprites.”

 

 

BUILD

 

ACTIVITY PROPOSAL

 

PROGRAM A DJ CRAB

Access Scratch at https://scratch.mit.edu and add a Sprite that will perform a Beatbox, which is the art of reproducing drum sounds and electronic effects using the voice, mouth, and nose.

Follow the step-by-step guide below and at the end, watch the animation you created.

 

 

 

 

 

PROGRAMMING

 

a. Click on the indicated area in the list of sprites and backgrounds (Select a Sprite) to insert the Crab sprite. Then, click on the trash icon to delete the Cat sprite.

You can test some commands:

b. To rename sprites –

c. The position of sprites on the stage is indicated by the X and Y coordinates .

d. To make the sprite visible or invisible, click on the icons .

e. Change the sprite size .

f. Change the sprite direction .

g. Click on the indicated area to select a background and insert the Underwater 1 background as the new stage.

 

CREATING SPRITE MOVEMENT

 

h. Click on the Sprite, then on Events, and drag the block to the script area.

i. Click on Motion and drag the block to the script area and change the x and y values to 0.

j. In Motion, drag the block to the script area.

l. In Motion, drag the block . To change the sprite’s movement speed, go to Operators, drag the block to the empty space in the block and change the number 10 to 6.

m. In Motion, drag the block . Then, drag the block .

n. In Control, drag the block to the script area. Insert it below

the block . The blocks from steps l and m should be placed

inside the block .

o. At the end, check out the animation. Click on .

p. Modify the program so that the crab moves faster and spins in another direction.

 

FINALIZING THE PROJECT

 

Each sprite can have more than one costume. To change the current costume, simply click on the COSTUMES tab. Then, click on a different costume for the sprite. You can animate a sprite by switching between costumes.

Now that you have created the crab animation, change its costume and add a sound. To do this, you will need to insert new blocks into the same script.

 

PROGRAMMING

 

a. Click on the sprite, then on Events, and drag the block to the scripts area.

b. In Looks, drag the block . Then, in Events

drag the block , go back to Looks, and drag the block .

c. To select a sound, click on the Sounds tab, then on the Choose a Sound button, and select the sound “Human Beatbox1”.

 

d. In Sound, drag the block to the scripts area.

e. To make the music play continuously, go to Control and drag the block to the scripts area. The blocks from steps b, c, and d should be placed inside it.

 

 

 

 

 

CONTINUE

 

After creating the DJ crab, share your experience with your classmates.

 

• What was your favorite effect?

• Was it difficult to use the Scratch program?

• Did the DJ crab work correctly?