Programming for kids: [lesson #3] Animating Your Sprite

in Steem Kids & Parents4 months ago (edited)

photostudio_1658007562289.jpg let's spend more time developing our Sprite jumping Game

Coding With Scratch

The jumping sprite Game

In our previous lesson, you saw how to make our Sprite jump when we tap on the screen, but that is not all because one may ask the question, is that all?, What is it jumping for?

Let's start with the fact that the jumping sprite is just a segment of a more complex whole. This class will be giving the cat something to jump over.

Our plan is to create a Sprite that will move towards the cat and the cat will have to jump over the moving object each time it comes close to it.

Now let's convert this plan into action using scratch.

Get to the address bar and enter and refer to our first lesson on how to get the scratch environment ready for use.

Create a new sprite

Here is the previous work we did and we are about to add a new sprite to the list.

Adding a new sprite
To add a new sprite
• we will go to the sprite info pane.
• Select the sprite button
• we want to select from existing sprites.
• Select the animal category
• Select the crab or any sprite you like.

We now have two sprites
The Cat and the Crab sprite. The crab is active at the moment. That is why we have a faint crab at the top right of the scripting Area.

Positioning the sprites
We will love to have the cat at the left and the Crab coming from the right. This block can be used to set the exact locations on for a sprite
Cartesian coordinate are used to position the sprite correctly on the screen. If you should drag the crab on the stage area to the location you will want it to be, the sprite info pane are will provide the Cartesian coordinate for the location which can be copied out.

Got the crab

To make the sprite move
The glide block will make the sprite move from one point to another within the specified time.
The glide block is assisted by a control and an event blocks. The forever control block makes sure the gliding movement hose on and on. The small move block is responsible for maintaining the position of the crap.

When the jump is not successful
This script will stop the game once the crab touches the cat. You can only play again if you restart using the green flag.
This block starts with the flag and will wait till the sensing part of it feels the crap touching the cat and only then will it go over to the next block that stops the whole processes. The sensor is created using the "wait until" control with a sensing block fitted inside it.
The sensing block is edited so it reacts when it touches the cat(sprite 1)

The final script

Script for the cat

Script for the crap

What next

In lesson 4, we will introduce a counter to record the number of successful jumps and after a specific number of jumps we should have another level.

Lesson 1Introduction
Lesson 2Getting Started
Lesson 3Animating Your Sprite


[1.] Create a post with screenshot and explanations showing the following

[2.] How you positioned a sprite

[3.] how to make a Sprite smaller

[4.] What were your challanges

You must be a verified kid (No parent assistance)
Your homework post should be at least 300 words.
Post in steemkids Community and set aside at least 10% beneficiary to @steemkidss.
You must belong to any of these clubs, club5050 #club75 and club100
Use the tags #learnwithsteem and #steemexclusive #yourcountry, #assignment and your club status as part of your hashtag.
Drop your entry link at the comment section.
All participants who perform well will be rewarded.


Written by @manuelhooks for steemkids

learnwithsteem steemexclusive nigeria club75 steem scratch technology

 4 months ago 

Another great post for the kids!
Thank you!

Thanks for appreciating my post.

Thank you for contributing to #LearnWithSteem theme. This post has been upvoted by @Reminiscence01 using @steemcurator09 account. We encourage you to keep publishing quality and original content in the Steemit ecosystem to earn support for your content.

Club Status: #Club75

Sevengers Comment GIF.gif

Team #Sevengers


Congratulations, your post has been supported by @steem4nigeria. This is the official community account of Nigerians on Steemit. You can reach us here on our community account.

Manual Curator : @Reminiscence01

Subscribe and Join Steem4Nigeria Telegram
Discord Facebook Twitter

Coin Marketplace

STEEM 0.18
TRX 0.05
JST 0.022
BTC 16902.43
ETH 1276.40
USDT 1.00
SBD 2.13