Activities Archives - CodeWizardsHQ The leading online coding academy for kids and teens ages 8-18 Fri, 29 Aug 2025 10:17:48 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.3 https://www.codewizardshq.com/wp-content/uploads/2019/10/cropped-cropped-blueHorizontal-32x32.png Activities Archives - CodeWizardsHQ 32 32 How to Make a Scrolling Background in Scratch https://www.codewizardshq.com/how-to-make-a-scrolling-background-in-scratch/ Thu, 24 Apr 2025 06:30:47 +0000 https://www.codewizardshq.com/?p=68748 Online coding academy for kids and teens ages 8-18. Enroll to learn real-world programming languages like Python, Java, HTML/CSS, JavaScript, and more!

There’s a way to make your Scratch game or project more immersive with just the addition of one or two sprites. A scrolling background is a fun and simple effect where sprites are used to create the illusion of movement and motion. It’s often combined with other effects to enrich a game or project and […]

The post How to Make a Scrolling Background in Scratch appeared first on CodeWizardsHQ.

]]>
Online coding academy for kids and teens ages 8-18. Enroll to learn real-world programming languages like Python, Java, HTML/CSS, JavaScript, and more!

There’s a way to make your Scratch game or project more immersive with just the addition of one or two sprites. A scrolling background is a fun and simple effect where sprites are used to create the illusion of movement and motion. It’s often combined with other effects to enrich a game or project and make it more visually appealing.

📌 [Download] Printable Scratch Coding Tutorials Get 2 printable Scratch tutorials, Rocket Landing and Flying Space Cat, to code your own games step by step. Download Now

In this tutorial, I’ll show you how to make a scrolling background in Scratch. Just like in the real world, backgrounds and locations change as we move. We’ll try to recreate this with our Walk In The Park project. It’s a great effect to add to any project, so give it a try!

A Walk in The Park Complete gif

View and remix the Walk In The Park project now.

What you need:

No coding experience is necessary for this scrolling background tutorial. Beginner-friendly for kids ages 8 and up.

How to Make a Scrolling Background in Scratch

Our project is comprised of three different parts: the walking cat, the floating cloud, and the rolling hills.

Step 1: Create a New Scratch Project

We always start in Scratch by creating a new project. 

create a scratch project
  • A new project will open, rename the sprite to “cat”
  • Rename your project to “A Walk In the Park”
rename your scratch project and sprite

You’re ready to code!

Scrolling background step 1 gif

Hint: Name your project anything you want and click on the orange “Share” button to make it available for others to remix.

Step 2: Draw the Background

The cat is walking in a basic setting with a blue sky and dirt path. We’ll create this scene as a backdrop.

  • Hover over the “Choose a Backdrop” icon and select “Paint”
paint a backdrop
  • Use the rectangle tool to draw a blue rectangle for the blue sky
  • Use the rectangle tool to draw a brown rectangle for the dirt path
use the rectangle to paint a background

In the preview screen, you will see your cat sprite and the background you drew. You can reposition your cat sprite around to fit your new scene. This backdrop is not part of the moving background.

Once you’re finished designing your backdrop, we can animate the cat to take a stroll! 

Scrolling background step 2

Hint: You can draw more details in the background to fit your game or project.

Step 3: Animate the Cat Walking

The cat sprite stays in place on the path, but appears to be walking. We animate the cat by changing its costume from having its foot down to up, then repeating that process.

  • Click on the “cat” sprite to add code to it
  • Start with a “when green flag clicked” block from the Events category
  • Add a “forever” loop to continuously run the code blocks inside
  • Inside the loop, add a “wait 0.5 seconds” from the Control category
  • Underneath the wait block, add “next costume” to change costumes
animate cat walking

This means that every 0.5 seconds, the cat’s costume will switch.

Press the green flag to test your code. It should look like your sprite is walking!

If it works, let’s move on to add a scrolling background. 

Scrolling background step 3 gif

Hint: See the different costumes in the “costumes” tab and add costumes to create your own walking effect.

Step 4: Draw the Scrolling Background Sprites

We need to draw two sprites to represent the hills that scroll in the background. These sprites will move across the screen to create the scrolling effect.

  • Hover over the “Choose a Sprite” icon and select “Paint”
paint a scratch sprite
  • Use the square tool to draw a green rectangle from one edge of the project screen to the other
  • Add a few points on the top of the rectangle using the “Reshape” tool
  • Drag the points up and down to create multiple hills. The only points you should not change are the corners of the rectangle, so that the two points line up in the animation.
draw the hills

In order for our sprite to go off the screen as it moves, we will add a transparent box behind it that increases the width of our sprite.

  • Use the square tool to draw a transparent rectangle from one edge of the artboard to the other.
  • Then, rename the sprite “hills1”
draw transparent box

Now, create the second sprite.

  • Right-click on the “hills1” sprite and select duplicate
duplicate hills1 sprite
  • Rename the new sprite “hills2”
rename hills2 sprite

In your preview screen, you can see both sprites. These two sprites are all you need to make a seamless scrolling background! 

Scrolling background step 4 gif

Hint: You can change the color of the “hills2” sprite so you can see how the effect is working in your preview screen. Later, change it back to match “hills1”.

Step 5: Animate Sprite 1 in the Hills Background

The background position of the hills sprites will move from right to left and then start that process again continuously like this:

how scrolling works in scratch

The “hills1” sprite starts in the center of the project. When we start the program, place it there.

  • On the “hills1” sprite, add a “when green flag clicked” block
  • In the preview screen, set the “hills1” sprite in the center. Use those x and y coordinates in a “go to” block. My sprite is positioned at x = 1 and y = 25 so I will use those coordinates.
go to block

Next, we want the sprite to scroll all the way to the left until it goes off the screen. 

  • In the preview screen, set the “hills1” sprite just off the left side of the screen. Use those x and y coordinates in a “glide 10 seconds to” block. My sprite is positioned at x = -480 and y = 25.
Go to and glide to position background
  • You might have noticed your “hills1” sprite covers the “cat” sprite. Under “when green flag clicked” add a “go to back layer” from the Looks category.
  • Wrap a “forever” loop around these blocks to repeat the actions.
loop the background movement

Click the green flag to see your “hills1” sprite moving to the left. Keep it up, only a few steps left! 

Scrolling background step 5 gif

Hint: Experiment with the timing and position of your sprite to fit your animation.

Step 6: Animate Sprite 2 in the Hills Background

The code for the second hills sprite will have the same format as the first sprite. However, the sprite will start at the right side of the screen and move to the center.

When we start the program, place “hills2” off to right side of the screen.

  • On the “hills2” sprite, add a “when green flag clicked” block
  • Next add a “forever” loop underneath it, since we want to repeat these actions
  • Inside the loop add a “go to back layer” block
  • In the preview screen, set the “hills2” sprite just off of the right side of the screen.
  • Use those x and y coordinates in a “go to” block. My sprite is positioned at x = 480 and y = 25.
go to x y position

Now, we want the sprite to move to the left until it gets to the center where the “hills1” sprite started. 

  • Add “glide 10 seconds” block and use the same coordinates that “hills1” sprite started with. 
glide to position

Click the green flag to see your hills moving to the left. Is everything working properly?

Scrolling background step 6 gif

Hint: If you are seeing a gap between your two sprites, increase or decrease the x position on the hills sprites.

Your scrolling background is complete! View and remix A Walk In The Park project.

A Walk in The Park Complete gif

This is just one way to create a scrolling background effect. You can test different designs, speeds, and timings to create a unique experience for your project or game. In the bonus steps, I will show you how to animate a cloud in the background scroll and add music to your project.

If you want to learn from the experts, join our top-rated Scratch classes for kids.

Bonus 1: Add and Animate a Scrolling Cloud Sprite

Let’s create a scrolling background animation with only one sprite.

  • Click on the “Choose a Sprite” icon
choose a spirte button
  • Search for the “cloud” sprite and click to add it
select the cloud sprite
  • Since we want this sprite to go offscreen, go to Costumes tab and use the square tool to add a transparent rectangle in the background. This will allow the sprite to go off screen.
add a transparent background

 Now, let’s add the code that moves the cloud object.

  • Click on the “Code” tab
  • Start with a “when green flag clicked” block
  • Add a “forever” block from the Control category
  • Add  a “go to” block inside the loop. Position your cloud to the right off-screen and use those coordinates, mine are x = 325 and y = 100
  • Then, glide the cloud to the left side of a screen with “glide 7 seconds to”. Position your cloud to the left off-screen and use those coordinates, mine are x = -325 and y = 100
forever go to and glide

Press the green flag to see your cloud floating in the sky. 

Scrolling background bonus 1 gif

Hint: Change the number of seconds in the glide block to make your cloud move faster or slower.

Bonus 2: Add Music to Your Scrolling Background Project

First, let’s set the background music we want to add.

  • Click on the cat sprite and go to the “Sounds” tab
  • Click on the “Choose a Sound” icon at the bottom
go to sounds tab
  • Select a sound from the “Loops” category. I’m using Dance Around.

Now, let’s add the code that plays the music in the background.

  • Go to the “Code” tab
  • Add another “When green flag clicked” block
  • Underneath that, use a “forever” block to continuously play the music
  • Inside the loop, use a “play sound until done” and select the sound you chose.
play sound until done

Hit the green flag to listen to the song. What a nice atmosphere you’ve created by adding background music to your scene! 

Scrolling background bonus 2 gif

Hint: You can upload a music file or even record a song to play in the “Sounds” tab. 

Learn More Scratch Effects with Tutorials

There are so many possibilities in Scratch! You can learn to code different effects, like the scrolling background, through tutorials or join a Scratch class to learn from the experts. 

Try one of these fun beginner tutorials next.

Download Free Printable Scratch Coding Tutorials PDF

Get the Rocketship Landing game and Flying Space Cat Scratch tutorials in a printable format.

Try a Scratch Coding Class for Kids

Now you know how to make a scrolling background in Scratch! It’s simple and you can include it in any game or project you code to make it better.

Kids can also learn Scratch from the experts in our elementary school coding program. It’s designed to teach kids, ages 8-11, how to think like programmers while building fun, interactive projects. Students learn fundamental programming concepts in Scratch and then advance to text-based languages like JavaScript and Python. It’s the best way for kids to learn Scratch.

Explore our programs and join our top-rated Scratch classes for kids.

The post Scratch Coding for Kids: Halloween Candy Collector Game appeared first on CodeWizardsHQ.

]]>
How to Make a Clicker Game on Scratch https://www.codewizardshq.com/how-to-make-a-clicker-game-on-scratch/ Tue, 15 Apr 2025 05:40:13 +0000 https://www.codewizardshq.com/?p=68452 Online coding academy for kids and teens ages 8-18. Enroll to learn real-world programming languages like Python, Java, HTML/CSS, JavaScript, and more!

Simple and addictive, the classic clicker game is easy and fun for everyone in the family Our party-themed Cookie Clicker shows kids how to make a clicker game on Scratch that displays a score counter. In this game, kids bake cookies with every click and watch their cookie count increase. The goal is to bake […]

The post How to Make a Clicker Game on Scratch appeared first on CodeWizardsHQ.

]]>
Online coding academy for kids and teens ages 8-18. Enroll to learn real-world programming languages like Python, Java, HTML/CSS, JavaScript, and more!

Simple and addictive, the classic clicker game is easy and fun for everyone in the family Our party-themed Cookie Clicker shows kids how to make a clicker game on Scratch that displays a score counter. In this game, kids bake cookies with every click and watch their cookie count increase. The goal is to bake 999 cookies. Try this easy Scratch tutorial for kids to customize your own clicker game.

📌 [Download] Printable Scratch Coding Tutorials Get 2 printable Scratch tutorials, Rocket Landing and Flying Space Cat, to code your own games step by step. Download Now

You can also learn to code from the experts in our top-rated Scratch coding classes

Cookie clicker game complete

Play and remix the Cookie Clicker game now.

Table of Contents

  • Step 2: Add a backdrop
  • Step 1: Create a new Scratch project
  • Step 3: Draw the cookie sprite
  • Step 4: Add game logic to increase the cookie count
  • Step 5: Animate the cookie click
  • Step 6: Create the ones counter
  • Step 7: Create the tens counter
  • Step 8: Create the hundreds counter
  • Step 9: Stop the counter at 999 cookies

What you need:

No coding experience is necessary for this Scratch tutorial. Beginner-friendly for kids ages 8 and up. Give it a try!

Step 1: Create a new Scratch project

Let’s start by creating a new project. 

Create a new Scratch project
  • A new project will open, rename your project to Cookie Clicker
  • Hover over the cat sprite and click the trash can to delete it

A new project will open up and you will see the Scratch interface.

Rename Scratch projectRem

Hint: You can also remix shared projects by clicking the green Remix button on the project page.

Step 2: Add a backdrop to your game

Now we can code our clicker game! In the new project, we can add a background to our game.

  • Click the “Choose a Backdrop” icon 
Choose a backdrop button
  • Search for the “Party” backdrop and click to add it
Find the party backdrop

The backdrop will appear in the preview screen and sets the scene for your game.

Clicker step 2 gif

Hint: Choose any backdrop from the library or upload your own to fit your game design.

Every clicker game needs a clickable object. For this game, draw a cookie sprite using the Paint option.

  • Hover over the “Choose a Sprite” icon and select “Paint”
Select paint icon
  • Draw the base of the cookie by clicking the circle tool. Click on the artboard and drag the mouse to create a circle. 
  • Change the color of the circle using the color selector
  • Draw smaller circles with the circle tool to decorate the cookie
Draw a cookie in costumes
  • Position the cookie on the background in the preview area
  • Click on the Code tab and rename the sprite to “cookie”

The cookie sprite should now be visible. However, nothing happens when we click the cookie. 

We’ll add that next, keep going! 

Draw the cookie sprite gif

Hint: Draw or select any sprite you want to fit your game design.

Every time we click on the cookie, we bake one cookie for the party. So, the number of cookies increases by one with every click. We’ll use a variable to represent the increasing number of cookies.

  • Go to the variables category and right-click the “my variable” block
  • Click “Rename Variable”
Rename variable
  • Rename the variable “cookies” and click ok
rename variable cookies
  • Check off the “cookies” variable 
Check off cookies variable
Add game logic to cookies gif

The variable counter will now appear in the preview screen. We should start the number of cookies at 0 when the game starts.

  • On the cookie sprite, add the “When Green Flag Clicked” block from the Events category
  • Add a “Set cookies to 0” block from the Variables category 
  • Go to the Events category and select a “When this sprite clicked” block
  • Underneath that, add a “Change cookies by 1” block from the Variables category
Set cookies variable

Click the green flag to test your game. The variable “cookies” should start at 0 and increase every time you click the cookie sprite. 

Good job so far, let’s keep going!

Add game logic to cookies gif

Hint: You can add other sprites that increase the number of cookies by different amounts.

The cookie is pretty boring, let’s animate the cookie when it’s clicked by making the size of the cookie change.

  • On the cookie sprite, add a “When this sprite clicked” block from the Events category
  • Go to the looks category and add a “change size by 5” block. Increase the size slightly when we click. 
  • Add a “wait” block from the Control category and update the time to 0.05 seconds
  • Return this sprite to its original size. Select “set size to 100%” from the Looks category.
Cookie animation

Try it out by clicking the Cookie sprite. Do you see the animation working? Great job!

Animate the cookie click gif

Hint: Change the animation by increasing the size or wait time.

Step 6: Create the ones counter sprite

The counter is made up of three different sprites. Let’s start with the sprite that represents the ones.

  • Click on the “Choose a Sprite” icon
Choose a sprite
  • Search for the “Glow-0” sprite and click to add it
Select glow 0 sprite
  • Rename this sprite “ones”
Rename the sprite
  • Position and resize it in the preview to fit your theme
position and resize sprite

Now,  we’ll add costumes for numbers 0 through 9 to the same sprite.

  • Click on the “Costumes” tab
  • Click the “Choose a Costume” button
  • Add a costume to represent numbers 1 through 9, we are using Glow-1 through Glow-9
Add costumes for 0 to 9
Create the ones counter sprite gif

Now we can add code to connect the “ones” sprite to the cookie clicks. Start with the cookie.

  • On the cookie sprite, add a “broadcast” block
  • Click “New message” in the dropdown and name it “count”
broadcast count

 The sprite changes costumes each time the cookie is clicked.

  • On the ones sprite, add a “when green flag clicked” block
  • Add “switch costume to Glow-0” to start with the 0 costume
  • Use the “when I receive count” block to get the message
  • Then, add “next costume”
switch costumes

You should see the first part of your counter on your screen. Click the cookie 9 times and watch it change! 

Create the ones counter sprite gif

But, it doesn’t go past 9, so we’ll add the rest of our counter in the next step.

Hint: You can draw or choose your own number sprite, just make sure to include costumes for numbers 0 to 9. 

Step 7: Create the tens counter sprite

We have a sprite to represent the ones, now let’s add another sprite to represent the tens.

  • Right-click on the “ones” sprite and click duplicate
Right click ones
  • Position the sprite in the preview and rename this sprite “tens”
Rename the sprite tens
  • Add an if-then loop from the Control category around the “Next costume” block.
  • Inside the loop, add the equals block from “operators”. On the left, add a “mod” block and, on the right, use 0
  • Inside the mod block, add the “cookies” variable on the left and use 10 on the right. The complete formula (cookies mod 10 = 0) means that if the number of cookies is divided by 10, the remainder is 0.
Add if then loop with condition
Create the tens counter sprite gif

Hint: Double-check that your counter matches the tens number in the “cookies” variable. 

Step 8: Create the hundreds counter sprite

After that, create one more sprite to represent the hundreds.

  • Right-click on the “tens” sprite and click duplicate
Right click tens sprite
  • Position the sprite in the preview and rename this sprite “hundreds”
Rename hundreds sprite
  • Inside the mod block, change the 10 to 100. The complete formula (cookies mod 100 = 0) means that if the number of cookies is divided by 100, the remainder is 0.
Change mod block

Click the green flag to reset your game, then click on the cookie to watch the numbers increase! 

Create the hundreds counter sprite gif

Hint: Double-check that your counter matches the hundreds in the “cookies” variable. Then uncheck the “cookies” variable to hide it from the screen.

Step 9: Stop the counter at 999 cookies

The goal is to bake 999 cookies, so when we reach that number the counter should stop. 

  • Select the cookie sprite
  • Add an if-then loop, before “change cookies by 1” 
  • Add an equals condition, use 999 on the left and cookies on the right
  • Inside the loop, add “stop all” from the control category
Add if then block

Click the sprite to watch the counter in action.

Stop the counter at 999 cookies gif

Hint: Use additional if-then statements to add effects and bonuses at different cookie counts.

Cookie clicker game complete gif

With that final step, your Cookie Clicker game is complete! Play Cookie Clicker game.

If you want to let other people see your project and remix it, click the “Share” button at the top.

Add upgrades to your clicker game!

Scratch has a number of sound effects and songs you can add to your project. Let’s play a sound each time we click on the cookie. 

  • Select  the cookie sprite and go to the “Sounds” tab
  • Click the “Choose a Sound” button on the bottom left
Click the sound tab
  • Find the sound “Suction Cup” and click to add it
Choose the suction cup sound

The sound has been created, now add the code the play the sound.

  • Click on the Code tab
  • Add the “start sound” block and choose “Suction Cup” under “when this sprite clicked”
start sound block

Press the green flag and click your cookie to hear the sound! 

Hint: Select any sound or even record your own to match your game’s theme.

Bonus #2 – Add a balloon animation at 999 cookies

Celebrate when the player successfully bakes 999 cookies! In this game, we show a floating balloon animation.

Every time we click, we’ll check to see if we’ve made enough cookies. Once we reach 999, we will send a message that the cookies are done and the party is on.

  • Select the cookie sprite
  • Inside the “if 999 = cookies” loop, add a broadcast block 
  • Click “New message” in the dropdown and call it “party”
  • Underneath that add a “wait” block and change it to 2 seconds. This is how long our animation will play.
broadcast block

Next, add the balloon sprite that receives the message and performs an action.

  • Click the “choose a sprite” icon, find the “Balloon1” sprite, and click to add it
choose balloon 1 sprite
  • Rename it “balloons” and resize it in the “Size” field to 300
Rename and resize balloons
  • Add a “when green flag clicked” block
  • Then, use a “hide” block from the Looks category
When green flag hide

Finally, add the code that makes the balloon float.

  • Add the “When I receive” block and select “party”
  • Add “start sound” and select “Clapping”
  • Position the sprite with  “go to x: 0 and y: -275”
  • Underneath, add the “show” block to make the balloon visible
  • Move it to the top using “glide 2 seconds to x: 0 and y: 275”
When i receive party

Your animation should work now!

To test it, update “if 999 = cookies” on the cookie sprite to “if 2 = cookies”. Then click the cookie to view the animation play. Change it back when you’re sure it works.

Hint: You can add any effect when you reach 999 cookies, just add it inside the “if 999 = cookies” loop.

Discover More Clicker Games on Scratch

You can find a lot of clicker games in Scratch to use for ideas and inspiration. You can also remix them to see the code inside. This is a great way to expand your knowledge and the kinds of games you can build in Scratch.

These are some of the top clicker games in Scratch.

Pokemon Clicker (51834 hearts)

Click your way to getting every pokemon in this popular Scratch clicker game. Keep clicking to get points that you can use to upgrade your pokeballs, and collect popular pokemon to become the very best.

Planet Clicker (31326 Hearts)

Click on the planet to generate energy. This game features a store to buy upgrades and add energy. Through your username, it also keeps tracks of your stats like clicks and time played that you can access in the menu.

Roblox Clicker #Games #All (25716 Hearts)

This Roblox Clicker in Scratch lets you generate dummy Robux with every click. You can use in-game codes for more Robux and even customize your clicker with different skins. 

Cookie Clicker (24525 Hearts)

A simple cookie clicker with upgrade options all on one page. The game uses cloud variables for an auto-save functionality that lets you save your game and come back to keep clicking.

Money Clicker (23267 hearts)

Click your way to a fortune in the Scratch Money Clicker and get help by hiring employees, building companies and factories, and digging mines. This game has a clean design and scrolling feature for the upgrades.

Minecraft Clicker (17770 hearts)

Minecraft-themed clicker game where you click a building block to earn points. You can also buy upgrades to earn points quicker, like hiring the miner for help.

See more of the best Scratch games.

Get More Fun Scratch Tutorials

Keep coding with more fun Scratch tutorial for kids.

Download Free Printable Scratch Coding Tutorials PDF

Get the Rocketship Landing game and Flying Space Cat Scratch tutorials in a printable format.

Try a Scratch Coding Class for Kids

Once kids complete the Cookie Clicker game they can customize it endlessly. Completing this tutorial is just one way that kids can learn about coding in Scratch. 

If this tutorial inspired your child to learn more coding, try a Scratch coding class at CodeWizardshQ. Our elementary school coding program is designed to teach kids, ages 8-11, how to think like programmers while building fun, interactive projects. It starts by teaching fundamental coding concepts in Scratch and then advances to text-based languages like JavaScript and Python. Classes are live, online so they’re fun and engaging for kids while being convenient for parents. 

Learn more and join our top-rated Scratch classes for kids.

The post Scratch Coding for Kids: Halloween Candy Collector Game appeared first on CodeWizardsHQ.

]]>
The Spring 2025 Logic Challenge starts February 24 https://www.codewizardshq.com/the-spring-2025-logic-challenge-starts-february-24/ Mon, 03 Feb 2025 06:31:57 +0000 https://www.codewizardshq.com/?p=67940 Online coding academy for kids and teens ages 8-18. Enroll to learn real-world programming languages like Python, Java, HTML/CSS, JavaScript, and more!

Kids don’t always make the best decisions, as parents we know that. They’re more likely to act than to think through the options and consider important factors. However, making good decisions is a building block for success, even at a young age. So, it benefits kids to build and practice the related skills early and […]

The post The Spring 2025 Logic Challenge starts February 24 appeared first on CodeWizardsHQ.

]]>
Online coding academy for kids and teens ages 8-18. Enroll to learn real-world programming languages like Python, Java, HTML/CSS, JavaScript, and more!

Kids don’t always make the best decisions, as parents we know that. They’re more likely to act than to think through the options and consider important factors. However, making good decisions is a building block for success, even at a young age. So, it benefits kids to build and practice the related skills early and often. 

If we want kids to think for themselves and make good decisions, they need the opportunity to practice their logical reasoning skills. This involves arriving at the best conclusion using a given set of criteria. Logical reasoning is rarely taught alone rather, kids get these skills from other subjects like coding, math, and science. Kids need more ways to hone and master their logical thinking.

That’s why we’re bringing you the 6th Annual CodeWizardsHQ Logic Challenge (Spring Semester).

The Spring 2025 Logic Challenge starts on February 24, register to join! 

It’s a FREE nationwide competition where students, between the ages of 8-18, solve engaging logic puzzles, develop problem-solving skills, and win exciting tech prizes.

The event is a fun and rewarding way for young minds to develop valuable 21st-century skills, preparing them for success in a digital world.

Students will complete 10 puzzles in total, one a week from February 24th to May 4th, 2025. Throughout the 10 weeks, participants will tackle a range of enriching challenges tailored to their age group—Elementary, Middle, or High School level. 

Join the Logic Challenge Now!

Kids Learn 21st-Century Skills

While completing these fun weekly challenges, students will learn to think like a programmer and build important 21st-century skills like:

  • Problem Decomposition – Breaking down complex problems into smaller, more manageable parts.
  • Pattern Recognition – Identifying trends and patterns that aid in problem-solving.
  • Abstraction – Simplifying complex systems by reducing the problem to its core components.
  • Algorithmic Thinking – Developing step-by-step instructions for solving a problem or accomplishing a task.
  • Sequencing – Determining the correct order of steps in a problem-solving process.
  • Logical Reasoning – Using rational thinking and systematic principles to arrive at a logical conclusion or solve a problem.

Join the Logic Challenge Now!

A Chance to Win Top Tech Prizes

Besides the skills they gain, every participant has a chance to win top tech prizes including Apple Airpods Pro, Nintendo Switch, GoPro Mini, and more. With each challenge kids complete, they’ll earn points and bonuses bringing them closer to these rewards.

Learn more about the bonuses and view all prizes.

How the Logic Challenge Works

1. Join the Challenge – It’s Free

Join the challenge by signing up. Parents can directly register their child. If you are a teacher wanting to get your students registered, please see our teachers page.

2. Complete One Challenge Each Week for 10 Weeks

A new challenge will drop every Monday on our challenge platform and participants will have until Sunday that week to answer the question. The competition will run for 10 weeks with a total of 10 challenges (1 per week).

3. Earn Points for Entries into the Final Prize Drawing

Participants will earn points after each challenge completed. They will also earn bonus multipliers based on attempts, streaks, & quickness. Every 50 points earned gives them 1 entry into the final drawing. See point and multiplier details.

The Logic Challenge for Teachers

Teachers, we have something for you too. Encourage your class to sign up for a chance to win part of $500 in classroom grants. Your students get to participate in a fun, educational activity that builds important skills while giving you a chance to secure extra funding for your classroom. It’s a win-win! 

As soon as you register, you will get a class code to distribute to your students so your entire class can compete individually and as a team. For every 50 points a student earns in the challenges, your class earns one entry into the drawing for the classroom grant. See more details for Logic Challenge Teachers.

So, why wait? The Logic Challenge is free and open to kids and teens, ages 8-18.

Join the Logic Challenge Now!

The post The Spring 2025 Logic Challenge starts February 24 appeared first on CodeWizardsHQ.

]]>
How to Make a Maze in Scratch in 7 steps https://www.codewizardshq.com/how-to-make-a-maze-in-scratch-in-7-steps/ Mon, 18 Nov 2024 02:35:31 +0000 https://www.codewizardshq.com/?p=66538 Online coding academy for kids and teens ages 8-18. Enroll to learn real-world programming languages like Python, Java, HTML/CSS, JavaScript, and more!

A maze is a simple puzzle where you try to find your way from the beginning to the end. Completing a maze tests your memory, problem-solving skills, and patience. Coding does the same! Both require having to think logically and in order.   In this tutorial, I’ll show you an easy and fun way to code […]

The post How to Make a Maze in Scratch in 7 steps appeared first on CodeWizardsHQ.

]]>
Online coding academy for kids and teens ages 8-18. Enroll to learn real-world programming languages like Python, Java, HTML/CSS, JavaScript, and more!

A maze is a simple puzzle where you try to find your way from the beginning to the end. Completing a maze tests your memory, problem-solving skills, and patience. Coding does the same! Both require having to think logically and in order.  

In this tutorial, I’ll show you an easy and fun way to code a maze in Scratch where you control the player with your arrow keys. As a bonus, I’ll also teach you how to animate your character and add a timer. 

You can learn to build a maze and other fun Scratch games with a live instructor in our top-rated coding classes. My elementary school students really enjoy how engaging and easy Scratch coding is. They just have to drag and drop to create cool games and programs. By coding a maze, we’ll learn about loops, collision detection, and events. 

Complete this tutorial to code a maze Scratch!

Completed maze game

Play and remix the complete maze game now. 

In this game, the baby penguin, Pesto, has lost his hat. Mom is going to be mad! Help him find his winter hat to win.

We can break down this game into 3 main components: 

1. The maze: A drawing of a maze obstacle players have to avoid and make their way through.

  • Draw the maze

2. The player: the player, the penguin, moves around the maze and returns to the beginning when they touch the edge.

  • Add and position the player
  • Move the player around the maze
  • Detect player collision with the maze

3. The goal: the goal, the winter hat, is placed at the end of the maze and the player wins when they reach the goal.

  • Add and position the goal
  • Detect player collision with the goal

What you need:

Scratch account: Create a free Scratch account

No coding experience is necessary for this Scratch tutorial. Beginner-friendly for kids ages 8 and up. Give it a try!

Steps to Make a Maze Game in Scratch

Let’s turn each of the parts we discussed previously into steps:

  1. Create a new Scratch project
  2. Add a backdrop
  3. Draw the maze
  4. Add and position the player 
  5. Move the player around the maze
  6. Detect player collision with the maze
  7. Add and position the goal
  8. Detect player collision with the goal

Step 1: Create a New Scratch project

First, we need to set up a new project in Scratch where we will edit our code. 

  • Visit scratch.mit.edu
  • Login to your Scratch account
  • Click on the Create button
Create a new Scratch project
  • A new project will open, rename your project to Penguin Maze Game
  • Hover over the cat sprite and click the trash can to delete it
Name Scratch project Penguin maze game

Now we have a fresh new project to code our maze game!

Hint: You can also remix the Penguin Maze project to see the completed code.

Step 2: Add a Backdrop

Set the stage for your game by adding a background image.

  • Click the Choose a Backdrop button
Choose a backdrop button
  • Select the Arctic backdrop
select the arctic backdrop in scratch

You should now see the backdrop in your preview area. 

see the backdrop in Scratch preview

Hint: Get creative and select a backdrop that matches your theme. You can also select Surprise to let Scratch choose for you. 

Step 3: Draw the maze

A maze is simple to draw with just horizontal and vertical lines. We’ll draw our own maze, make sure you leave enough room for your player to get through. 

  • Hover over the choose a sprite button, select Paint
select paint button
  • Click on the line icon
  • Select an outline color and change the size of your lines to 20
  • Click and drag lines to represent the maze. Adjust it to fit the game preview.
outline maze sprite
  • Click the Code tab and rename the sprite to Maze.
rename the maze sprite

Do you see your maze in the preview screen like this? Great!

see the maze in the preview

Hint: You can make the maze as easy or hard as you want. Add more lines and dead ends to make the maze harder. 

Step 4: Add and position the player

We want to add our player, the penguin. The penguin is going to start at the top left every time the game starts. Before we move the penguin, position it at the top with our code.

  • Click the Choose a Sprite button in the right corner
choose a sprite button
  • Select the Penguin 2 sprite from the library
select the penguin sprite
  • Change the size to fit your maze, my penguin is 20.
change the penguin sprite size

Next, add this code to the penguin so that it goes to the starting position every time the game starts. 

  • Add a When green flag clicked block from events category.
  • Add Go to x y position block from motion category. Use the x and y value of your sprite at the starting position.
go to x y
see the penguin move

Now, try moving your player away from the starting position. When you click the green flag, it should return there. If your test works, you’re ready for the next step. 

Hint: You can get creative and draw your own sprite, just hover over the add a sprite button and go up to Paint.

Step 5: Move the player around the maze

The penguin is on the screen, but he can’t move. The penguin needs to move up, down, right, and left when we press the arrow keys. We need to control him with the arrow keys.

Let’s add the logic to the arrow keys. To move the sprite right and left, add this code: 

  • In the Events category, add When right arrow key pressed block
  • Add a Change x by block from the motion category and change the value to 10
  • Right click on When key pressed block and Duplicate the entire code block
  • Then change the dropdown to When left arrow key pressed and change x by to -10
when right or left arrow key pressed blocks

To move the sprite up and down, add this code: 

  • In the Events category, add When right arrow key pressed block
  • Add a Change y by block from the motion category and change the value to 10
  • Right click on When key pressed block and Duplicate the entire code block
  • Then change the dropdown to When left arrow key pressed and change x by to -10
when up or down arrow key pressed blocks
complete code for penguin movement

Your penguin can move now! Try pressing the arrow keys and make sure the penguin is moving in the right direction.

Hint: To move the player faster or slower, change the x and y values. 

Step 6: Detect player collision with the maze

We need to code what happens when the player touches the maze. The penguin should say ‘Oh no!’ and go back to the starting position.

  • On the player sprite, add a Forever block.
  • Inside the Forever block, add an If then block
  • From the sensing category, add the Touching block inside the if then block. Change the dropdown to the Maze sprite.
  • From the looks category, add a say block and update the message to “Oh no!”
  • Finally, add a go to block and use the same x y position as the starting position 
detect a collision with if then block
detect a collision final code

Now, you can try touching the maze with your player sprite. Does it return to the starting position?

It’s working, let’s keep going! 

Hint: You can customize the message your sprites says or change what happens after the sprites touch. 

Step 7: Add and position the goal

Our player is in place and can move around the maze. Now, let’s place the goal at the end of the maze. 

  • Click the Choose a Sprite button in the right corner
  • Select a sprite from the library. I’m using one from the Scratch library called Winter Hat.
choose the winter hat sprite
  • Change the size to fit your maze. Mine is size 40.
change your maze to size 40
  • Add a “when green flag clicked” block
  • In the preview, position the hat at the end of the maze. Then add a Go to x y position block using those coordinates. Mine is positioned at x = 195 and y = -135.
position the hat
position the hat code

Once you’re done, click the green flag to test your game. Your hat should go to the end of the maze when the green flag is clicked.

Hint: You can customize the goal sprite to fit your theme by drawing or uploading a sprite.

Step 8: Detect player collision with the goal

To win the game, the player needs to reach the goal. When the player teaches the goal, they say “I found it!” and the game ends.

  • On the player sprite, inside the forever block, add an if then loop
  • From the sensing category, add the Touching block inside the if then loop. Change the dropdown to “Winter Hat”
  • Add say block and update the message to “I found it!”
  • From the control category, add a stop all block to end the game
detect a collision with the goal
penguin code for collision detection

Hint: You don’t have the complete the maze to test your game. Just drag your character sprite to the end in your game preview.

Your maze game is complete! Play the maze game.

Click the green flag and give it a try. If you want to share it with other people and let them remix it, click the “Share” button at the top. 

completed maze game gif

You can “see inside” the completed maze game to view the full Scratch code. 

Challenge yourself by adding the bonus features to your maze. 

Bonus: Animate the player 

We can animate the penguin by making it look left and right when it moves. To do this, we’ll create a costume for each look.

1. Create the costumes

  • Click on the costumes tab, you will see different poses for the penguin on the left
costumes tab in scratch
  • Rename the first costume, penguin2-a to look front 
  • Rename the last costume, penguin2-d to look right
choose the look front penguin costume
  • To create a penguin looking left, right click and duplicate the look right costume
duplication the look right costume
  • Highlight the new costume in the paint canvas and click flip horizontal. You should now have a penguin looking left.
  • Rename this new sprite to look left
flip the costume horizontal

The final costumes will look like this:

rename the costume look left

Your penguin now has different costumes to show which direction he’s facing.

2. Change the costume with arrow keys

Go back to the Code tab to add code to the penguin sprite. Under each key press, we will switch the costume to match the direction the penguin is facing.

  • Under the when right key pressed, add a switch costume to look right
  • Under the when left key pressed, add a switch costume to look left
  • Under the when up key pressed, add a switch costume to look front
  • Under the when down key pressed, add a switch costume to look front
switch costumes block added to arro key blocks

Try pressing the arrow keys and see if your penguin is facing the right direction.

3. Set the costume when the game starts

But, when we press the green flag the penguin isn’t always facing forward.

  • Under the when green flag clicked block, add a switch costume to look front
switch costume to look front
completed code to switch costumes

Start the game over by pressing the green flag. Your penguin should start looking forward, then look right or left depending on which direction it’s moving. 

Now your penguin is animated to look like it’s walking.

Bonus: Add a timer 

We can add a timer to make the maze more challenging. Let’s give the player 60 seconds to complete the maze game before the penguin disappears.

1. Create a Time variable

A variable is used to hold information that changes. Our time decreases every one second, so we can use a variable to save that value.

  • Go to variable category, right-click my variable and rename it to Time
  • Check off the box next to the Time variable

You should see the Time variable in your game preview now.

2. Start the Timer 

If we want the player to have 60 seconds to play, we should set the timer to start at 60. 

  • Add a When green flag clicked block
  • From the variable category, drag a set Time to 60
set time to 60

Press the green flag to see the time reset.

3. Count down the timer

Use a loop to count down the timer every 1 second. 

  • Add a Repeat until loop under the set Time block
  • In the operators category, add a less than block in the repeat until loop. Repeat until Time < 1.
  • Add a wait 1 second block inside the loop
  • Then decrease the time variable using change Time by -1
loop to count down the timer
showing timer in game preview

Press the green flag to see the time counting down.

4. Show and hide the penguin

The penguin should show when the game starts, but hide after the time runs out. 

  • After the When green flag clicked block, add a show block
  • After the Repeat until loop, add a hide block
add show and hide blocks
show and hide penguin

That’s it! Press the green flag to test your timer one more time. It should be counting down the time and hiding the penguin once the time runs out.

Give yourself a pat on the back. You completed the maze game tutorial. See the complete game with bonuses and remix it

More Scratch Tutorials for Kids

Try making another Scratch game using a fun step-by-step tutorial:

Download Free Printable Scratch Coding Tutorials PDF

Get the Rocketship Landing game and Flying Space Cat Scratch tutorials in a printable format.

Code more games in Scratch!

Continue coding games in Scratch with the guidance of a live, expert instructor. We teach kids how to code and practice analytical thinking, computational thinking, problem-solving, and logical reasoning.

Kids, ages 8-10, who want to learn more about Scratch coding can join the Elementary School Core Track. We offer a structured Scratch curriculum with project-based learning for hands-on practice. Enroll today to get started.

Learn to make games in Scratch in our top-rated coding classes for kids.

The post How to Make a Maze in Scratch in 7 steps appeared first on CodeWizardsHQ.

]]>
7 Educational AI Activities for Kids to Explore  https://www.codewizardshq.com/7-educational-ai-activities-for-kids-to-explore/ Fri, 18 Oct 2024 05:50:27 +0000 https://www.codewizardshq.com/?p=65806 Online coding academy for kids and teens ages 8-18. Enroll to learn real-world programming languages like Python, Java, HTML/CSS, JavaScript, and more!

From self-driving cars to delivery robots to Siri on their phones, kids see the results of AI around them daily. Artificial Intelligence is shaping the future and presenting new ways for kids to interact with technology. Educational AI activities for kids familiarize them with artificial intelligence, machine learning, and coding as well as build computational […]

The post 7 Educational AI Activities for Kids to Explore  appeared first on CodeWizardsHQ.

]]>
Online coding academy for kids and teens ages 8-18. Enroll to learn real-world programming languages like Python, Java, HTML/CSS, JavaScript, and more!

From self-driving cars to delivery robots to Siri on their phones, kids see the results of AI around them daily. Artificial Intelligence is shaping the future and presenting new ways for kids to interact with technology. Educational AI activities for kids familiarize them with artificial intelligence, machine learning, and coding as well as build computational thinking and problem-solving skills so they are future-ready. 

Help your child learn about artificial intelligence with these seven educational AI activities for kids. I’ll focus on hands-on experiences that are easy to understand, enjoyable, and impactful.

Artificial Intelligence Activities for Kids

  1. Join an AI Camp For Kids
  2. Make a Robot
  3. Create AI Images & Art
  4. AI Music Production
  5. Code AI In Scratch
  6. Play AI Games
  7. Train an AI Model

1. Join an AI Camp For Kids

Two boys in the artificial intelligence camp

Summer is an excellent time for kids to build valuable skills that aren’t prioritized during school, like problem-solving and analytical thinking. AI camps do this through specialized programs that introduce kids and teens to artificial intelligence and the technologies related to it like coding, robotics, machine learning, and more. During the summer, there’s more time to absorb new concepts and ideas. Once the fundamental concepts are solidified, kids can keep up their learning throughout the year.

Just like camps on any other topic, there are a wide variety from in-person to virtual and self-paced to teacher-led. Ideally, you want to find an AI camp that is fun, interactive, and provides hands-on learning for your child. Think about what really interests them and how they learn best. 

CodeWizardsHQ’s top-rated AI coding camps teach kids how AI works and how to code their own AI application. They’ll learn to build AI models that solve real-world issues using Google’s Teachable Machine. Kids collect pictures to help their AI model learn. Then they use the CodeWizardsHQ platform to integrate their AI model into a web app that can recognize what it sees in pictures! Through the AI camp, they learn AI fundamentals, coding, computational thinking, and problem-solving. Enroll today to get started.

2. Make a Robot

Mbot 2 robotics kit

Robotics kits bring artificial intelligence to life by combining engineering, coding, and AI. Kids get the hands-on experience of building a robot and then using code and AI technology to control them. Robotics is a very tangible, real-world application for kids and teens of how AI works. They get to see abstract concepts like pattern recognition, decision-making, and reasoning in action.

Robotics kits are available for all ages and experience levels. Some kits are more focused on the programming or engineering aspect of robotics. Not all kits utilize AI, but many do so look for those. Most companies also provide educational tutorials and games that kids can use to learn with their robot. 

Makeblock’s Mbot 2 is a good choice for beginners ages 6 and up. This educational toy combines engineering, coding, and AI in a robotics kit. It’s easy to assemble and comes with graphical programming software that teaches basic coding concepts. Mbot 2 requires kids to assemble the robot and then use block coding or Python to guide the robot through different tasks. The robot has AI features including built-in sensors, voice control, and much more that kids can program around. This teaches kids how AI works and how to control it. 

3. Create AI Images & Art

ai generated artwork

Artificial intelligence can be used as a creative tool for students with (or without!) artistic flair. Creating AI art is using artificial intelligence algorithms to generate or assist in creating artwork. Generative AI platforms can fully great AI images for you. One part of the AI generates images while another part evaluates them against real artwork. Other AI platforms assist artists by suggesting edits, modifications, or alternative versions of their work. 

There are many AI image generation tools, but many were not created for kids so check for safety features like censoring graphic images. When creating their AI artwork, kids learn how to prompt AI and how the AI reacts and responds to different inputs. Kids can use the artwork they create personally or within websites and games that they’re coding.

AI tools like Adobe Firefly, a generative AI application, fully creates unique images and artwork. Firefly is safe for kids and has gained popularity among schools and students because of its user-friendly interface and helpful editing tools. Adobe has even partnered with a number of states to give students and educators free access to Firefly. 

4. AI Music Production

AI music production activity

AI art doesn’t stop at images and drawings. Kids can easily create their own custom tracks with AI music assistance, a collaboration between humans and AI. There are AI music apps that produce entire songs from lyrics, give suggestions on your original music, or provide inspiration for something new. Artificial intelligence learns from a vast dataset of different songs and then generates new music. 

Producing music with AI teaches kids about generative AI, pattern recognition, algorithms, and much more. Some platforms may also use block or text-based coding to edit and modify the music. Kids will also learn how to use AI to enhance and express their creativity. As they use AI tools to compose music, kids gain a deeper understanding of how coding and AI technologies can be applied in creative and practical ways.

Suno AI is a popular music generator that kids can use to produce songs for free. This platform can create everything, from song lyrics to vocals and instrumentation, from a simple text prompt. Any song created by the user can be downloaded, either as an audio or video version. Although Suno has mechanisms in place to prevent music creation with explicit or offensive material, parents should monitor the content because this could still result in content that is not suitable for younger audiences. 

5. Code AI in Scratch 

Coding AI in RAISE playground

Scratch is a free block coding language and online community that allows kids to create programs and games using drag-and-drop. It works by taking snippets of code and grouping them into colorful blocks to create programs. Scratch is used to build interactive stories, games, apps, and animations. While the application doesn’t have built-in AI capabilities, it has multiple extensions utilizing artificial intelligence.

Even if they’re beginners, kids will find coding in Scratch fun and simple. As they build their games and applications students learn AI fundamentals like how to train a model, algorithms, and pattern recognition. They’ll also practice coding fundamentals like variables, loops, and functions.

RAISE AI playground is a programming platform based on Scratch language with AI extensions. There are activities where kids engage with machine learning, computer vision, voice recognition, and AI ethics. For example, a child might train an AI to differentiate between different shapes or animals. This allows kids to explore real-world applications of AI in an interactive, hands-on way.

6. Play AI Games

AI for oceans game

Games are always a great way for kids to learn while they play. AI games use artificial intelligence to enhance gameplay or to teach AI concepts. Educational AI games can have adaptive learning systems that will adjust a learning experience to meet your child’s needs. 

Playing educational AI games is an inviting way for kids to discover machine learning and coding. They can experiment with different datasets to understand how AI can learn and apply what it learns to solve real problems, like recognizing objects in a game. AI covers some difficult concepts that kids will be much more likely to stick through if they’re having fun. 

AI for Oceans is an educational game from Code.org that lets kids help an underwater AI clean the ocean. The AI needs to be trained to differentiate between fish and trash. Kids give input to help the AI get better at sorting through the data. The story is relatable and the lesson is simple even for younger kids. 

7. Train an AI Model 

Train an AI model

Training an AI model refers to the process of teaching an artificial intelligence system to perform a specific task by feeding it data, allowing it to learn patterns, make decisions, and improve its performance over time. This is a key concept in AI, but may be a little confusing to kids conceptually. So, let them do it for themselves by training their own AI model. 

Through this activity, kids and teens experience foundational AI skills like data labeling, pattern recognition, supervised learning, algorithms, and much more. They’ll learn technical skills but also equip themselves with critical thinking, problem-solving, and computational thinking skills.

Google’s Teachable Machine is a web-based tool that makes creating machine learning models fast, easy, and accessible to everyone. With Teachable Machine, kids teach the AI to recognize images, sounds, or poses to see how AI “learns.” It takes only 3 easy steps: gather data, train the model, and export the model. They can then use their learning models in other projects, sites, apps, and more. It’s the tool of choice for our AI classes where students create a game using Teachable Machine that recognizes and responds to the player’s hand gestures. For example, the game character jumps when you make a fist. Kids love seeing the connection between the physical and digital world.

Benefits of Artificial Intelligence Activities for Kids

AI is expected to see an annual growth rate of 37.3% from 2023 to 2030, according to Forbes. Companies like Amazon, Google, and Facebook all use AI to enhance our experience. AI is no longer a future concept, it’s pervasive in the daily lives of our families and our children. 

As it continues to evolve and grow, we need to prepare the next generation to use artificial intelligence responsibly. It is a tool they need to thrive in a technology-driven world. So, understanding how AI works and, beyond that, being able to work with AI is a necessary skill for kids and teens.

A few reasons to teach AI to kids:

1. Develop computational thinking skills

Computational thinking is a fundamental skill in computer science that focuses on decomposition, pattern recognition, pattern abstraction, and algorithmic design. AI projects require students to break down large tasks into smaller, manageable parts and use these same skills. Kids learn that AI follows specific rules or steps to process information and make decisions.

2. Enhance problem-solving and critical thinking skills

Debugging, finding, and fixing errors when the AI model doesn’t work as expected, is part of the process. This builds problem-solving and critical thinking skills as well as resilience and perseverance. Kids learn how to dissect problems and apply a process to finding the right solution.

3. Prepare them for future career opportunities

Artificial intelligence is expected to be one of the fastest-growing fields in the future job market. The US Bureau of Labor Statistics projects that careers in AI will grow 21% from 2021 to 2031. Familiarity with AI tools and concepts will give kids a head start in developing skills relevant for tomorrow’s workforce.

4. Make them safer when interacting with technology

As kids interact with AI, they begin to understand that AI can impact people’s lives and that using it responsibly is important. This introduces the idea that AI decisions should be fair, unbiased, and transparent. It also teaches them about safety and privacy and that they should not trust everything they read online or receive in messages on social media.

Tips for Parents Introducing AI & ML Concepts to Kids

Even some adults don’t fully understand artificial intelligence and machine learning. While they are complicated subjects, there are ways to make it more accessible for children:

  • Start with Simple Concepts: Begin with basic ideas like “What is AI?” or “How do machines learn?” using real-life examples.
  • Relate it to Everyday Life: Show them how AI is used in devices they interact with daily (e.g., voice assistants, recommendation systems).
  • Make it Fun: Use games and other AI activities to incorporate AI learning. 
  • Use Visual Aids: Visual tools, like images and diagrams, help kids understand how AI processes data.
  • Encourage Curiosity: Let kids ask questions and explore AI on their own through experiments and play.

As parents, we can introduce them early so the concepts are approachable and fun. Kids will feel less intimidated and have the confidence to continue learning and exploring.

More AI Activities with CodeWizardsHQ

If your child is curious about AI and has more questions than you can answer, check out the top-rated AI camps at CodeWizardsHQ. Students will dive into the world of Artificial Intelligence, learning to use Machine Learning to solve fun, real-world issues.

The AI camps are developed for kids and teens ages 8-18. Using a project-based curriculum, kids learn about artificial intelligence and machine learning with hands-on activities. They build their own AI game while studying basic AI concepts and practicing their computational thinking, problem-solving, and logical reasoning skills. The camp is fun and engaging and will spark your child’s interest in coding and artificial intelligence.

Join our top-rated AI camps for more fun AI activities!

The post 7 Educational AI Activities for Kids to Explore  appeared first on CodeWizardsHQ.

]]>
7 Easy Games to Code for Beginners and Kids https://www.codewizardshq.com/7-easy-games-to-code-for-beginners-and-kids/ Tue, 08 Oct 2024 19:28:06 +0000 https://www.codewizardshq.com/?p=65630 Online coding academy for kids and teens ages 8-18. Enroll to learn real-world programming languages like Python, Java, HTML/CSS, JavaScript, and more!

You want to build your first game, but you need to find a game simple enough for beginners to complete and not get lost. This list of easy games to code is a good place to start. Beginners and kids can code these simple games and continue to expand on them. There are plenty of […]

The post 7 Easy Games to Code for Beginners and Kids appeared first on CodeWizardsHQ.

]]>
Online coding academy for kids and teens ages 8-18. Enroll to learn real-world programming languages like Python, Java, HTML/CSS, JavaScript, and more!

You want to build your first game, but you need to find a game simple enough for beginners to complete and not get lost. This list of easy games to code is a good place to start. Beginners and kids can code these simple games and continue to expand on them. There are plenty of ways to customize and add features to these basic games.

This project-based approach ensures lasting learning for any coder. In our coding classes, kids build projects and games every week and bigger projects at the end of each course. Learning how to code games also help kids practice their problem-solving, critical thinking, and logical reasoning skills.

These are easy games that beginners and kids can code with little or no experience. Start with these games for ideas and inspiration, then see where it takes you! 

List of Easy Games to Code

Using this list, you can start coding a simple game that will help you practice and learn. One way to think of simple game ideas you already know and translate them into code. Think about tic-tac-toe, how would you write that in code? 

Many of these examples are taken from games you’re familiar with. Try building one of these easy games in Scratch, JavaScript, or Python. Most of these games utilize only a few coding concepts and you can translate them to whichever language you are learning. Practice understanding the game logic and visuals, then you can add your own touches to it. 

7 Easy Games to Code

  1. Guess The Number
  2. Rock, Paper, Scissors
  3. Flappy Bird
  4. Frogger
  5. Disappearing Snowman
  6. Match Game
  7. Mad Libs

1. Guess the Number

Guess the number python game

We’ve all played this game with friends and it doesn’t even require a paper and pen. Guess the Number is a simple guessing game that’s easy for beginners at any age to code. The goal is for one player to think of a number and the other to guess it. In our game, the computer picks a random number and the player inputs one guess at a time. After 3 incorrect guesses, the computer reveals the answer. At the end, the user is also told how many turns it took them to guess the number.  This is an easy game to code because the logic is very straightforward.

Coding a number guessing game teaches kids how to work random numbers, loops, and conditionals. These are important programming concepts that are used in all coding languages. Students will be able to logically think through the steps of the game and write them in code. 

The game can be customized by adding features like telling the player if they’re too high or too low. It could also provide additional guesses or have an option to restart the game once it’s ended.

Play Guess the Number

Download Source Code

2. Rock, Paper, Scissors

rock paper scissors javascript game

Rock, paper, scissors is another classic game that kids and adults have all played. Whether you’re trying to break a stalemate or just prove your quick reflexes, it’s a fun game that can be played anywhere. There’s even a professional rock, paper, scissors tournament that happens internationally! This is an easy game to code due to the simple ruleset and limited number of choices and outcomes. 

This game will test kids’ computational thinking skills and teach them about arrays and if-then logic.  This game doesn’t require a lot of code, but it will help solidify some really important foundational coding concepts. It’s a perfect place to start for kids and beginners with no coding experience.

Kids can get creative with the visuals of the game or add more options to make it more difficult. Customize it by creating a scoring system for the best out of five games so the player can play multiple times. 

Play Rock, Paper, Scissors

Game Tutorial

3. Flappy Bird

flappy bird easy scratch game

Flappy Bird is a version of a popular mobile game application. The player controls the bird while it flies through the air avoiding the pipe obstacles. The goal is to navigate the bird through the pipes without hitting them. The game stops if the bird collides with one of the pipes. This is an easy game to code because it has limited features and simple game mechanics. 

Kids who code this game learn about loops, events, and conditionals. Creating the repeating obstacles is one of the harder parts of this game. In Scratch, this game only requires two sprites and easy game logic to execute. 

For those who want more of a challenge, they can customize this game by changing the speed of the obstacles. If they want to focus on the design, they can try animating the main character or the background. 

Play Flappy Bird

Game Tutorial

4. Frogger

Frogger python game to code

Frogger is a classic video game that has many features and levels that make it so fun to play. We’ve created a simplified version of this game in Python for beginners to code, called Traffic vs. Zombie. The player is a zombie with the goal of crossing the road to the finish line without being hit by a car. This is an easy game to code because it has a clear structure and simple rules.

Traffic vs Zombie utilizes events and object-oriented programming. Each moving object, like the cars and zombies, can be represented as separate entities or classes, giving you a good introduction to object-oriented programming principles. Kids will also practice collision detection which is a popular feature of many games. When the zombie is hit by a car, this triggers a loss.

Kids can make their game unique by adding levels with new obstacle, a scoreboard, or timer. Bonus items the zombie can collect would also be a fun addition.

Play Traffic v. Zombie

Game Tutorial

5. Disappearing Snowman

snowman javascript game

Guess the word before the snowman melts away! Disappearing Snowman is a word game where players try to guess a word by guessing each letter. For every wrong letter, part of the snowman disappears. The goal is to guess the word before that happens. This is an easy game to code because it uses basic logic and data structures. It can even be completely text-based.

By coding this game, kids learn to manipulate strings and lists. The main component of the game is guessing the word which entails handling the word to be guessed, the letters guessed so far, and the hidden word display. This core logic involves basic operations like comparing user input with a list of letters in the word and updating the display.

This game uses simple JavaScript code to power the game functions. To increase the difficulty of the project, kids can use longer, more complex words. Another feature could be to add a timer that limits the time players have to guess.

Play Disappearing Snowman

Game Tutorial

6. Match Game

thanksgiving match game in html css javascript

This is a classic board game where players try to match pairs of images by turning only two up at a time. The objective is to match all pairs in as few moves as possible. A digital version is an easy game to code because it has very basic instructions and rules.

This game doesn’t require difficult game logic. It can be done in JavaScript or any other front-end language. Kids learn about state management, as they have to convey if the cards are face up or down. They also learn about event handling when players interact with the cards through mouse or keyboard clicks.

Students can customize this game with their images and design or make it more difficult with more cards. They can also only allow a certain number of attempts. Making this a multiplayer game with players taking turns is also a good challenge.

Play Match Game

Game Tutorial

7. Mad Libs 

mad libs python game

Mad Libs is a popular game where you fill in the blanks in a sentence with a type of word (verb, noun, adjective, etc.) and the sentence changes depending on which word you pick for each type. In this online game, kids create their own Mad Libs stories and prompt a user to fill in the blanks. It’s an easy game to create with text only and utilizes very simple data structures.

Kids can code this game to master getting user input since it requires multiple prompts for the user. If they’re building their game in Python, they also learn about multiline and F strings.

It’s easy to customize Mad Libs with different stories, phrases, or prompts to the user. You could use mad libs to write a book and prompts to go to the next page. Another idea is to add a menu for the user to select the type of prompt.

Play Mad Libs

Download Source Code

Tips for Coding Games

If your child is just starting to code games here are some tips to be successful:

Start small

Coding easy games is a good way to start small. Students don’t need to rush into complex game mechanics right away. Begin with a solid base game and gradually add features to make it more complex. This progressive approach will allow kids to practice a few skills at a time and also bring multiple skills together. Using small steps also helps prevent erorrs and makes debugging easier.

Do projects

You can learn different skills by following step-by-step guides and tutorials. But the best way to advance your skills is to challenge yourself to use those concepts in a project. Doing a project from scratch, like the ones listed, will test the skills that are learned in the tutorials.

Debug and iterate 

Testing and fixing your code is a big part of game development. This doesn’t have to be done on your own. You can ask friends and family to play your game and give you feedback. 

Join a community

Platforms like GitHub, Reddit, and Stack Overflow offer great support for beginner developers. Connecting with other developers can help kids learn much faster and get help when they really need it. Learning to code alone is much more difficult. However, these platforms are created for adults so parents should monitor kids usage. 

Learn more about how to code a game.

Learn to Code Games

After trying these easy games, kids can advance their skills in our top-rated kids coding classes

Kids will learn game development most effectively if they are having fun and build a solid foundation in coding concepts. CodeWizardsHQ’s coding programs are designed to provide everything students needs to learn how to code in and outside of the classroom. They are tailored to kids’ age group with a progressive project-based curriculum so that kids advance in their coding skills with every class. 

Kids in our program are building websites, games, and apps. These coding projects practice more than the language itself, they also hone problem-solving and critical thinking skills which are used in real life. At the end of the program, they leave with a portfolio of coding projects. Learn more and enroll today.

These easy games are just a starting point for beginners and kids. Use your new skills and your imagination to develop the next big game!

The post 7 Easy Games to Code for Beginners and Kids appeared first on CodeWizardsHQ.

]]>
How to Make a Timer in Scratch https://www.codewizardshq.com/how-to-make-a-timer-in-scratch/ Mon, 19 Aug 2024 22:58:28 +0000 https://www.codewizardshq.com/?p=64658 Online coding academy for kids and teens ages 8-18. Enroll to learn real-world programming languages like Python, Java, HTML/CSS, JavaScript, and more!

Scratch is a fun and creative learning platform for kids who are curious about building games and applications. They can use their imagination to add and customize their projects.  In this tutorial, I’ll show you how to make a timer in Scratch. We will code a countdown timer and a stopwatch. You can add these […]

The post How to Make a Timer in Scratch appeared first on CodeWizardsHQ.

]]>
Online coding academy for kids and teens ages 8-18. Enroll to learn real-world programming languages like Python, Java, HTML/CSS, JavaScript, and more!

Scratch is a fun and creative learning platform for kids who are curious about building games and applications. They can use their imagination to add and customize their projects. 

In this tutorial, I’ll show you how to make a timer in Scratch. We will code a countdown timer and a stopwatch. You can add these timers to existing projects or your new project for a dynamic experience.

To learn Scratch with the experts, join our top-rated Scratch classes for kids

What is Scratch?

Scratch is a drag-and-drop coding language that helps kids learn coding fundamentals as well as develop critical thinking, problem-solving, and logical reasoning skills.

It’s a coding playground that teaches kids in a hands-on and accessible way. It’s safe, fun, and completely free.

Scratch is easy to access through any browser and has a supportive community where students can share and remix projects and games. It’s one of the best ways, especially for young kids, to learn the foundations of programming.

What is a timer in Scratch?

Timers are a component of a program or game that measures time in specific intervals. 

A timer can be used to delay actions, limit the duration of actions, or allow actions to continue for a total amount of time.

You can add a timer to count up or count down. Timers can be used in various projects, from simple games to complex animations. Each project may require a different type of timer.

In Scratch, timers are used to control the execution of command blocks or schedule actions to occur at specific intervals. 

Timers require a trigger to start or stop. For example, your timer may start when the green flag is clicked and stop once it reaches a certain amount of time. Or maybe your timer starts with a new level and stops when the sprite is clicked.

Timers in Scratch can be created using custom variables or the built-in timer variable.

Custom variable

You can create a timer in Scratch by creating a custom variable to store the time. 

create a custom variable in Scratch

Built-in variable

The timer variable is a feature in Scratch that records how many seconds have passed since the last time the green flag was clicked or the timer was reset. 

Built-in timer variable

Why add a timer? 

Timers are a way to make your game or project more dynamic and engaging. 

In a game, a timer can present a challenge. Let’s say you only have 5 minutes to complete a level, this helps structure the game and adds difficulty.

For apps, a timer may be used to track goals. Think of a running app where you track the number of miles you can in one day. 

There are a variety of ways timers are useful in a project or game including:

  • Scheduling actions
  • Breaking down tasks
  • Adding stakes
  • Monitoring performance

Scheduling actions

Timers can schedule specific actions to happen at predetermined intervals, such as executing code or triggering an event.

Breaking down tasks

Timers help break down challenging tasks into smaller, more manageable chunks. This prevents users from getting overwhelmed and maintain a sense of progress.

Adding stakes

Timers add stakes to a game such as by making players lose if they run out of time. For example, players could try to get as many points as possible or solve a puzzle before the timer runs out.

Monitoring performance

Timers can be used to monitor the performance of code, such as measuring how long it takes to run. 

How to Make a Countdown Timer in Scratch

A countdown timer starts at a certain number and counts down, usually ending at 0.

In our Flying Space Cat game, we can make the game more difficult (and fun!) by limiting the amount of time players have to accomplish the goal of collecting crystals. 

Remix this project to add a timer to it. You can also try the full Flying Space Cat tutorial

Let’s add a countdown timer to limit the players to 60 seconds.

  1. Start the timer
  2. Countdown every 1 second
  3. Add the next action
  4. Customize your timer

Step 1 Start the timer

We will set the timer to start when the game starts, when we click the green flag. 

  • Add a “When Green Flag Clicked” block to your sprite.
when green flag clicked block

The time starts at 60 seconds. Since the time changes, use a variable to hold this value. 

  • In the variables blocks, make a variable called Time and check it off
  • Under the “When Green Flag Clicked” block, add a set variable block. Update the dropdown to your Time variable and enter a number of seconds to start your timer. Here we are using 60.
make a variable block

Press the green flag to see the time displayed.

Step 1 start scratch timer

Step 2 Countdown every 1 second

Every second, the time decreases by 1 until it reaches 0. Then the game is over.

  • Add a “repeat until” loop with an operator for “Time < 1”. 
  • Inside the loop, add a “wait 1 seconds” block 
  • Below that, add a “change Time by -1”
repeat loop

Click the green flag to watch your timer countdown!

Step 2 timer counts down

Step 3 Add the next action

When the time runs out, or reaches 0, the loop and the game ends.

Decide what happens when the time runs out. In our game, the “Game Over” message displays.

  • After the loop, add a “Broadcast game over” block.
broadcast game over
completed time block

Run down the time to see the Game Over message.

Step 3 game over message

Your timer is complete. See and remix the full game code here

Step 4 Customize your timer

You can easily customize this timer by changing these features:

How long is the countdown? 

Change the 60 in “Set Time to” block to another number.

What happens in your app after the time runs out? 

Add that code beneath the “Repeat Until” block.

How fast does the timer countdown? 

Change the time in “wait 1 seconds” and “change Time by -1” to countdown faster or slower.

How to Make a Stopwatch in Scratch

We can also create a stopwatch in Scratch. A stopwatch measures the time that has elapsed from when it’s started. It’s often used when we need precise time measurements like in a race where only seconds separate the winners and losers.

Scratch has a built-in timer variable that tracks to the microsecond how much time has passed since the last time the green flag was clicked or the timer was reset. 

I’ll show you how to start and stop a timer here. 

Add a Stopwatch To “A Unicorn Sighting”

You are hanging out at the beach and see an incredible sight, a white unicorn running across the beach! Build a timer to track how long your unicorn sighting is, it will be different every time. Start the timer when you see the unicorn and stop it when it disappears.

Remix this project to add a stopwatch to it. You can also see the completed A Unicorn Sighting.

Now, let’s add a stopwatch to track the time.

  1. Create a button sprite
  2. Set the stopwatch to 0 to start
  3. Change the button when it’s clicked
  4. Control the start and stop button

Step 1 Create a button sprite

We need one sprite, this is a start and stop button. 

  • Click the “Choose a Sprite” button. I’ve customized the Button2 sprite in the Scratch library.
Choose a sprite
  • Create two costumes called start and stop. 
create a start and stop costume
completed start and stop costume in scratch

You should see the button in your preview screen!

Step 2 Set the stopwatch to 0 to start

Add this code to your button sprite. We will set the stopwatch to 0 when the application is started.

  • Add a “When Green Flag Clicked” block to your sprite.
when green flag clicked

Since the time changes, use a variable to hold this value. 

  • In the variables blocks, make a variable called time and check it off.
make a time variable in scratch
  • On the preview screen, double-click the time display to show a large readout and move it near your button.
  • Under the “When Green Flag Clicked” block, add a “set time to” block and use 0. 
  • Add “switch costume to” block and start with the Start button

Press the green flag to see the stopwatch set to “start” and time variable to 0. Make sure you are seeing the right button and time.

set time and button

Step 3 Change the button when it’s clicked

When the start button is clicked, it will change to stop and vice versa.

  • Control this with a “When this sprite clicked” block
  • Change the costume using “next costume”
next costume block

Try clicking on the sprite, the costume should change when you click it. 

step 3 start and stop button

Step 4 Control the start and stop button

Now, we need to control the time using the start and stop buttons.

Create two if statements based on what the button is showing. The first if statement is when the start button is clicked.

  • Add an if then block 
  • Use the condition “costume name” equals stop (remember this is the costume that shows after the button is clicked)
  • Inside the if then, add a reset timer
  • Use a repeat until loop with the condition “costume name” equals stop
  • Inside the loop, set the time variable equal to the timer variable
if then block
start costume if then code block

The second if statement is when the stop button is clicked.

  • Add an if then block 
  • Use the condition “costume name” equals start 
  • Inside the if then, show the variable time (this is the time when the button is pressed)
stop if then code block
completed stop if then code block
Step 4 start and stop loop

Click the start button and see if it works! Watch the unicorn run across the screen and capture the time.

Now, you have a simple stopwatch to track the time. 

Try creating your own stopwatch or adding one to your next project. There are plenty of ways to customize it and improve on this simple stopwatch. 

Download Free Printable Scratch Coding Tutorials PDF

Try adding a timer to these Scratch games. Download a full PDF tutorial for the Rocketship Landing game and Flying Space Cat game.

Learn How to Make Games in Scratch

Making games in Scratch is a great way for kids to build a foundation in programming and also practice analytical thinking, computational thinking, problem-solving, and logical reasoning. 

Kids, ages 8-10, who want to learn more about Scratch coding will love the live, online classes at CodeWizardsHQ. We offer a structured curriculum with project-based learning and expert instructors who support students every step of the way. Enroll today to get started.

They’ll build the coding fundamentals they need to move on to text-based programming in Python and JavaScript. It’s a complete coding program that provides everything your child needs to learn to code.

Learn to make games in Scratch in our top-rated coding classes for kids.

The post How to Make a Timer in Scratch appeared first on CodeWizardsHQ.

]]>
How to Make a Game on Scratch with Levels https://www.codewizardshq.com/how-to-make-a-game-on-scratch-with-levels/ Tue, 16 Jul 2024 02:16:31 +0000 https://www.codewizardshq.com/?p=63882 Online coding academy for kids and teens ages 8-18. Enroll to learn real-world programming languages like Python, Java, HTML/CSS, JavaScript, and more!

When kids develop their own games in Scratch, they can add different levels to make their game more fun and engaging. In this tutorial, I’ll show you how to create a game with levels in Scratch based on points. Leveling up in a game is one of the most satisfying feelings for any player. It’s […]

The post How to Make a Game on Scratch with Levels appeared first on CodeWizardsHQ.

]]>
Online coding academy for kids and teens ages 8-18. Enroll to learn real-world programming languages like Python, Java, HTML/CSS, JavaScript, and more!

When kids develop their own games in Scratch, they can add different levels to make their game more fun and engaging. In this tutorial, I’ll show you how to create a game with levels in Scratch based on points.

Leveling up in a game is one of the most satisfying feelings for any player. It’s a sense of achievement and accomplishment that makes playing games so addictive!

📌 [Download] Printable Scratch Coding Tutorials Get 2 printable Scratch tutorials, Rocket Landing and Flying Space Cat, to code your own games step by step. Download Now

Popular games like Super Mario, Legend of Zelda, or Final Fantasy all use levels to challenge players and present new skills, worlds, and opponents.

Kids can also learn Scratch coding in our top-rated coding classes for kids. They’ll code games with a live instructor and build projects in every class.

What is a game level in Scratch? 

A game level is part of a game that players must complete before advancing. Many games have progressive levels where players must complete every level to finish the game. 

Anything can happen in a new level! 

A new level can signal changes like increased difficulty, new challenges, location, characters, or gameplay. Levels can be represented in maps, stages, missions, courses, or rounds.

Leveling up in a game can depend on different factors too. Players may level up based on points, experience, goals, etc.

Some games use level as a ranking method. Players or characters have individual levels, like Pokemon cards and Minecraft. As the player gains experience, they level up, acquiring new abilities and access to new content.

Why add levels to your Scratch game?

Levels are a common feature in all types of computer, mobile, and online games. Some games even have hundreds or unlimited levels for players to conquer.

Game levels motivate players to keep playing. Adding levels to a game is a way to challenge players, give them a goal to work towards, and explain how to progress in the game. 

For game developers, adding levels helps control the gameplay and design. Levels can also carry forward the story or narrative of the game, immersing the players in the storyline. 

How do you add levels to a Scratch game?

There are many different ways to add levels in Scratch. You first need to decide on the game logic.  

How will players advance levels? 

Decide which factors will allow players to advance, such as time, points, actions, etc. In the Dragon Jam game, players advance by collecting a specific amount of strawberries.

What happens when a player advances levels? 

Decide what features will change at each level. This can include the location, characters, goals, etc. In our tutorial game, a new level signals a change in the location and the goal to reach the next level.

Once you’ve decided on the game logic for your levels, you can write the code to execute it.

Steps to Make a Game on Scratch with Levels

Complete this Scratch tutorial for kids to build a game with levels.

Scratch dragon game with levels

Play and remix the Dragon Jam game now.

What you need:

No coding experience is necessary for this Scratch tutorial. Beginner-friendly for kids ages 8 and up. Give it a try!

Step 1: Create a new Scratch project

Get started by creating a new project in Scratch. 

create a new scratch project

A new project will open up and you will see the Scratch interface.

scratch project interface

Now, we can code your game! 

Hint: You can also remix this project and others to see the code.

Step 2: Add Sprites

We need a player (dragon) sprite and a loot (strawberries) sprite for our game.

  • Delete the cat sprite first. Click on the cat sprite and the trash can icon.
add sprites
  • Click on the “Choose a Sprite” button and select “dragon”. Resize it to 30.
  • Click on the “Choose a Sprite” button and select “jar”. Resize it to 30.
add sprites
resize sprites

Your player and your loot are all set! Next, add a backdrop.

Hint: Choose or paint your own sprites to create a different theme for your project. 

Step 3: Add a backdrop

Let’s start by adding one backdrop, when we switch levels we can add additional backdrops to each level.

  • Click the “Choose a Backdrop” icon and add the “Castle2” backdrop
add backdrop
choose a backdrop

You should now see your game background in the preview.

Add backdrops gif

Hint: Choose or paint your own backdrop to match the theme of your project. 

Step 4: Move the Dragon

Your player, the dragon, needs to move from side to side to catch the strawberries. 

Let’s add code to move the dragon right and left using arrow keys. We will use the “Events” blocks.

  • Click on the dragon sprite to add code to it
  • Add the “When space key pressed” block and change the dropdown to “right arrow”
  • Underneath that, add a “Change x by” block and use 15 to move right
  • Add the “When space key pressed” block again and change the dropdown to “left arrow”
  • Underneath that, add a “Change x by” block and use -15 to move left
arrow keys
move the dragon gif

Test it out, your dragon should move when you press the arrow keys! 

Hint: Change the 15 and -15 values to move your player faster or slower. 

Step 5: Make Falling Strawberries

Now, let’s make it rain strawberries. We need a lot of strawberries, so we will be making clones of the one strawberry sprite.

  • Click on the strawberry sprite to add code to it
  • Add a “When green flag clicked” block that will start our code
  • Add “Hide” block to hide the original sprite
  • Add a “Forever” loop 
  • Inside the loop, use the control blocks to “Wait 1 second” and “Create a clone of myself”
forever loop
make falling strawberries gif

Each new clone will fall towards the dragon from a random position at the top of the game screen.

  • Since the x position of the sprite changes every time, first make a new variable called x position to store it.
  • Uncheck the variable so it doesn’t show in your game screen.
update sprite positions
  • Add a “When I start as a clone” block
  • Add “Show” block so we can see the clone 
  • Go to x and y block, use the x position variable and 150 for the position
  • Use a “Glide” block to bring the strawberry down to a y position of -150
  • Delete the clone once it is off the screen
scratch blocks for glide
variables gif
variables gif

Click the green flag to watch your strawberries falling from the sky.

Hint: Change the number of seconds in Glide to make your strawberries fall faster or slower.

Step 6: Add a Score

Our player levels up based on the score, so we need to calculate a score in our code.

  • The score changes, so make a new variable called “score” to store it.
  • When a new game starts the score should be 0. Under “When green flag is clicked” add a “Set score to 0” block. 
add score in scratch

Next, increase the score every time the sprites touch. 

  • Add “When I start as a clone” block
  • Then, add a “Wait until” block and use the sensing block for “touching”. Change the dropdown to “Dragon” or your player sprite. 
  • Add a “Change by” block from variables to change the score variable by 1.
  • Finally, add a “Delete this clone” block to make the strawberry disappear
scratch blocks for touching
Add score gif

Move your dragon around to collect the strawberries and watch as the score increases!

Hint: Try adding different loot with higher or lower scores to make the game more interesting.

Step 7: Add Levels

Now, let’s make the game more challenging by adding levels. In each level, the player needs to collect more strawberries (or more points) to advance. So, think about the game logic.

How many strawberries does the player need to advance in each level? 

  • Level 1 Score 3 points to advance (total of 3 points)
  • Level 2 Score 5 points to advance (total of 8 points)
  • Level 3 Score 7 points to advance (total of 15 points)
  • Level 4 Score 10 points to advance (total of 25 points)
  • Level 5 Win!

What happens after the player advances a level? The backdrop will change. 

You’ve already added the backdrop for level 1. We will add 4 more backdrops for the other levels.

  • Click the “Choose a Backdrop” icon and add another backdrop. 
  • Repeat this 4 times with a different image each time. We are using the Savanna, Underwater 1, Mountain, and Metro backdrops

  • You can see all of the backdrops you chose in the “Backdrops” tab. If you have a default white background, click the trash can icon to delete it.
Add backgrounds for scratch levels
Add backgrounds for scratch levels gif

The location, or background, changes when players pass a level. We can write that in code like this:

  • First, click on the Dragon sprite to add code to it
  • The level changes, so make a new variable called “level” to store it.
  • Add a “When green flag is clicked” and a “Set level to 1” block. When a new game starts the level will begin at 1. 
  • Use “Switch backdrop to” and choose the backdrop you want for the first level.
  • Add a “forever” loop
  • Inside the loop, we will add an if statement for each change in level. For example, if the score is greater than 2, set the level to 2 and switch the backdrop to Savanna.
  • Copy the If statement and add the change in score, level, and backdrop for each level you have.

Press the green flag to play! You should see the levels increasing and the backdrop changing.

Hint: Customize your levels by changing the scores or backgrounds. 

Step 8 Win Logic

Players can collect strawberries and level up, but they don’t know when they win or lose. Let’s display a message to the player when they win.

On the Dragon sprite, we will add code inside the level 5 if statement.

  • Add a “Broadcast” block and change the message to “you win”
  • Add a “Stop all” block to end the game

Create a message to the player that they win.

  • Click on the cat icon, select “Paint” 
  • Select the rectangle option to draw a white rectangle
  • Then, select the text option and type “You Win” in red on top of the rectangle
  • Right-click on the sprite to name it “You Win”

We only want to show the “you win” sprite when the message is received.

  • On the “you win” sprite, add a “When Green flag is clicked” block and a “hide” block
  • Add a “When a receive” block and change the message to “you win”
  • Add a “show” block and “stop all” to end the game.

You should now see the win message when you reach a score of 25!

Hint: Test your win message by setting the score to start at 24 instead of 1. 

Step 9 Lose Logic

Now, display a message to the player when they lose.

On the strawberry, send a losing message when a strawberry reaches the floor.

  • Under the “glide” block, add a “forever” loop
  • Inside the loop, add an “If” statement with an operator for y position is less than -149.
  • Add “broadcast” and create a new message called “game over”
  • After the loop, add “delete this clone” block.

Create a message to the player that they lost,

  • Right-click on the “You Win” sprite and duplicate
  • Go to the Costumes tab and edit the text to “Game Over”
  • Right-click on the sprite to rename it “game over”

We only want to show the “game over” sprite when the message is received. Since you duplicated a sprite, the same code will also be on this sprite.

  • Update the “when I receive” block and change the message to “game over”

All of your game logic is complete! Play the Dragon Jam game.

Click the green flag to play your game. If you want to let other people see your project and remix it, click the “Share” button at the top. 

You can “see inside” our completed Dragon Jam to get a peek at the full Scratch code.

Download Free Printable Scratch Coding Tutorials PDF

Get the Rocketship Landing game and Flying Space Cat Scratch tutorials in a printable format.

More Scratch Tutorials for Kids

Try making another game with levels. Pick one of these fun Scratch game tutorials and add levels.

Learn How to Make Games with Levels in Scratch

Coding games in Scratch is a great way for kids to learn about programming fundamentals and game development. 

If your child wants to dive deeper into Scratch, join our top-rated Scratch classes for kids. Students in our elementary school coding program learn to code with Scratch and advance to other languages like HTML/CSS, JavaScript, and Python. Learn from live, expert instructors while building fun projects and games that your child personalize and share.

Enroll today to start coding in Scratch!

The post How to Make a Game on Scratch with Levels appeared first on CodeWizardsHQ.

]]>
Free Coding Projects for Kids & Teens https://www.codewizardshq.com/free-coding-projects-for-kids-teens/ Sun, 02 Jun 2024 02:39:25 +0000 https://www.codewizardshq.com/?p=63086 Online coding academy for kids and teens ages 8-18. Enroll to learn real-world programming languages like Python, Java, HTML/CSS, JavaScript, and more!

Kids and teens can start coding right now using these free and engaging coding projects. They’ll discover the fun of creating websites, apps, and games where they can express their ideas and creativity. Coding projects are a great way to practice coding skills or learn new ones, that’s why our students build projects in every […]

The post Free Coding Projects for Kids & Teens appeared first on CodeWizardsHQ.

]]>
Online coding academy for kids and teens ages 8-18. Enroll to learn real-world programming languages like Python, Java, HTML/CSS, JavaScript, and more!

Kids and teens can start coding right now using these free and engaging coding projects. They’ll discover the fun of creating websites, apps, and games where they can express their ideas and creativity.

Coding projects are a great way to practice coding skills or learn new ones, that’s why our students build projects in every class. We’ve compiled a list of tutorials and student projects for your child to use. There’s room to personalize and expand on these projects too.

Kids and teens can use these project ideas and tutorials as inspiration for their own! 

Try Coding With a Step-by-Step Project Tutorial

These projects have step-by-step instructions for coding a game in Scratch, HTML/CSS, JavaScript, and Python. They are all beginner-friendly so kids and teens can start with no experience. Choose a project by language or age:

Scratch Coding Projects (Ages 8-10)

How to Make a Platformer on Scratch

How to make a platformer game coding project

Code this interactive game called “A Chick’s Adventure”  in Scratch. As the baby chick flies through the air, make sure she stays safe and doesn’t fall.

Project Skills: Loops, positions, conditional logic, events

View Project

How to Make Flappy Bird on Scratch

How to Make Flappy Bird in Scratch

Drag and drop your way to a simple Flappy Bird game. Fly through the air avoiding obstacles. The game stops when the bird collides with the pipes.

Project Skills: Loops, game logic, events, animation, randomize

View Project

Flying Space Cat Project

flying space cat scratch project

In this project, Space cat collects crystals in a galaxy far far away. Collect as many crystals as possible to fuel his spaceship!

Project Skills: Loops, conditional logic, events, animation, sounds, scores

View Project

Valentine’s Day Card Scratcher Activity

Valentine Scratcher coding project

Make your loved one’s Valentine’s Day with a handmade, hand-coded card. Add a personal touch with your own messages.

Project Skills: Loops, positions, events, animation, sounds

View Project

Holidays Advent Calendar Project

Christmas Advent Coding Calendar

Create a digital advent calendar you can personalize and share with someone you care about. 

Project Skills: Loops, conditional logic, events 

View Project

Halloween Candy Collector Game

Scratch Coding Project for Kids Halloween

Your ghost collects as much candy as possible in different settings. Code and play this game and customize it for any season.

Project Skills: Loops, game logic, events, animation, randomize

View Project

More Scratch project ideas for kids and beginners.

HTML/CSS Projects (Ages 11-13)

Thanksgiving Matching Game

Thanksgiving Coding Activity

Code a Thanksgiving matching game in HTML and CSS and play it with your family and friends. It’s a memory challenge game and also comes with printable coloring pages.

Project Skills: jQuery, images, CSS styling, 3D transformations

View Project

Holiday Card Project

html css holiday coding project for kids

Personalize a holiday card with your style or match the gift you’re sending. Dazzle your friends and family with your coding skills and a thoughtful card too. 

Project Skills: Images, CSS styling, Google Fonts

View Project

JavaScript Projects (Ages 11-13)

Disappearing Snowman Project

Disappearing Snowman JavaScript tutorial

This is a guessing game that uses simple JavaScript code to power the game functions. Add your own words to test your players.

Project Skills: Functions, CSS styling, events, variables, loops, conditional logic

View Project

Rock, Paper, Scissors Game

RPS javascript tutorial

Make a digital version of the classic Rock, Paper, Scissors game using emojis. You can also level up this game by adding additional features. 

Project Skills: Functions, arrays, events, loops, conditional logic

View Project

Easter Egg Hunt Game

JavaScript Easter game

Easy tutorial using JavaScript and jQuery. Players find the Easter eggs for a fun surprise. Project Skills: jQuery, animations, events, variables, conditional logic

View Project

Recommended: JavaScript Classes for Kids

Python Projects (Ages 11-18)

Random Dad Jokes Generator

random dad joke project

Everyone loves a good dad joke, right? This app uses API data to select a random dad joke that makes you smile.

Project Skills: Functions, APIs, dictionaries, Loops, Conditional statements, User input

View Project

Pig Dice Game

Pig python coding project

Pig is a dice game that you can play with friends or against the computer Build this easy arithmetic game from an empty Python file.

Project Skills: Functions, variables, f-strings, loops, Conditional statements, game logic

View Project

See more Python project ideas for kids.

Download Free Coding Project PDFs

1-Week Python Lesson Plans

Kids can start learning Python in a structured way. Teachers and parents use this 1-week Python lesson plan with activities and slides to teach coding for ages 11-13.

Free Printable Scratch Coding Tutorials PDF

Get the Rocketship Landing game and Flying Space Cat Scratch projects in a printable PDF format and build your first Scratch game.

JavaScript Projects Source Code

Download the complete source code for 7 different JavaScript projects that kids can use as a template.

Featured Student Coding Projects

Magic 8 Ball by Ted (age 14)

Magic 8 ball student project

Let’s Paint Project by Hollace

Painting code project

Harmony Wildlife Sanctuary by Akshith (age 12)

Wildlife sanctuary student project

Mining Project by Jonah (age 12)

Craft mining project in Python

Recommended: How to Code a Game

Learn to Code With a Project-based Curriculum

At CodeWizardsHQ, we build projects in every class! Here’s what you’ll build in just the first class of our core tracks.

Elementary School Core Track Ages 8-10

See the class projects in the first class of the elementary school core track, Animation and Interactive Games with Scratch. 

View Projects 

Middle School Core Track Ages 11-13

See the class projects in the first class of the middle school core track, Intro to Programming with Python. 

View Projects 

High School Core Track Ages 14-18 

See the class projects in the first class of the middle school core track, Intro to Python.

View Projects

CodeWizardsHQ’s live, online coding classes feature a project-based curriculum. Kids and teens learn hands-on by completing a project in every class and capstone projects at the end of each Wizard Level. Not only will they learn to code, but they also build problem-solving, critical thinking, and communication skills. Kids will become proficient developers by the end of the program and have the opportunity to join a high school coding internship. 

Start your child’s coding journey. Join the most fun and effective coding classes for kids. Enroll today.

The post Free Coding Projects for Kids & Teens appeared first on CodeWizardsHQ.

]]>
How to Make a Jumping Game on Scratch https://www.codewizardshq.com/how-to-make-a-jumping-game-on-scratch/ Wed, 28 Feb 2024 07:45:23 +0000 https://www.codewizardshq.com/?p=60835 Online coding academy for kids and teens ages 8-18. Enroll to learn real-world programming languages like Python, Java, HTML/CSS, JavaScript, and more!

Hey there, young explorers! Ready to learn how to make a jumping game on Scratch? We’re building a Rocket Jump game where you’ll zoom through space going from platform to platform. Before we start building our game, let’s talk about Scratch. Scratch is a super cool place where you can make your own stories, games, […]

The post How to Make a Jumping Game on Scratch appeared first on CodeWizardsHQ.

]]>
Online coding academy for kids and teens ages 8-18. Enroll to learn real-world programming languages like Python, Java, HTML/CSS, JavaScript, and more!

Hey there, young explorers! Ready to learn how to make a jumping game on Scratch? We’re building a Rocket Jump game where you’ll zoom through space going from platform to platform. Before we start building our game, let’s talk about Scratch. Scratch is a super cool place where you can make your own stories, games, and animations — like a digital LEGO set that’s all about your ideas!

📌 [Download] Printable Scratch Coding Tutorials Get 2 printable Scratch tutorials, Rocket Landing and Flying Space Cat, to code your own games step by step. Download Now

It’s like learning to speak the language of computers! And the best part? You don’t have to type any words or numbers. Instead, you snap together colorful blocks that look a bit like puzzle pieces. Each block is a command that tells your characters and objects what to do.

In our elementary school curriculum, students start their coding journey with Scratch. As kids build games and animations with Scratch, they’re laying the groundwork for computational thinking—a vital skill set for coding with actual code. 

Let’s start our coding journey together!

Complete this tutorial to create a jumping game on Scratch.

Play and remix the Rocket Jump game now.

What you need:

No coding experience is necessary for the Rocket Jump tutorial. Beginner-friendly for kids ages 8 and up. Give it a try!

Steps to make a jumping game in Scratch:

  • Step 1: Setup the scratch project
  • Step 2: Make the rocket move with keyboard keys
  • Step 3: Add “gravity” to make the rocket fall.
  • Step 4: Add the platform
  • Step 5: Make the rocket jump when touching the platform.
  • Step 6: Change platform position everytime rocket touches it.
  • Step 7: Add scores in the game.
  • Bonus 1: Change costumes of the Rocketship sprite
  • Bonus 2: Increase difficulty as the game progresses

In this game, players guide a rocketship through the starry cosmos using the arrow keys to navigate left and right. The rocket automatically falls due to gravity, but upon touching the platform, it jumps upwards to earn points. Each successful landing on the platform boosts the rocket higher and changes the platform’s position, making each jump a new challenge. The aim is to keep the rocket aloft as long as possible while racking up jumps for a high score.

Step 1: Setup the Scratch project

Create a New Scratch Project

  • Open Scratch, and you’ll see a button that says “Create”. Click it, and you’re on your way!
  • At the top, you’ll find the name “Untitled”. Click on it and type in “Rocket Jump” to name your game.


Set the Stage

  • Every game needs a background. Look at the bottom-right corner for a little picture that looks like mountains. That’s the backdrop. Click it!
  • Choose a backdrop with stars to make it look like outer space. You can pick one or even draw your own.
choose a game background
  • Next, click on the picture of the cat to select a sprite. You can pick a rocket from the ones they have. 
choose a scratch sprite
  • Set its size as per your need. For rocket sprite, a size of 40 works the best.
resize the rocket in the jumping game

After we have both backdrop and sprite setup, you should have something like below in the game preview area:

Step 1 results, rocketship sprite with background

Step 2: Make the rocket move with keyboard keys

Moving Right

  • Let’s get our rocket moving. Click on the Events category, and you’ll find a block that says “when space key pressed”. Drag it out.
  • We want to move right when we press the right arrow, so click on the little dropdown arrow on that block and choose the “right arrow”.
  • Now, click on the Motion category (it’s the blue one), and find “change x by 10”. Drag that and snap it right under the “when the right arrow key pressed”.
move the rock et right and left

Moving Left

  • Our rocket should move left too! Let’s duplicate the blocks you just made. Right-click on them and choose “duplicate”.
Duplicate blocks to move
  • Change “right arrow” to “left arrow” and “10” to “-10”. Now, when you press the left arrow, your rocket will move left!
Add arrow key to move

Step 3: Add “gravity” to make the rocket fall.

Setting the Fall

  • In space, things float down slowly. We’ll make our rocket do that. Find the Events category again and use the “when green flag clicked” block.
  • We need to tell the rocket where to start. Go to Motion, find “go to x: y:” and fill in “x: -144” and “y: 123”.
  • To make it keep falling, go to Control (the orange category), find “forever,” and drag it under your “go to” block.
  • Inside “forever,” go back to Motion and find “change y by”. Put “-4” in it to make our rocket fall.
Add gravity to make the rocket fall

Step 4: Add the Platform

Creating the Platform

  • Our rocket needs a platform to jump from. Click the paintbrush to make a new sprite.
  • The click the square icon and draw a rectangle at the center of the screen. This is your platform. It can be any color you like!
Create a platform for your jumping game

Positioning the Platform

  • Let’s put the platform in place. Under Events, use “when green flag clicked” again.
  • In Motion, find “go to x: y:” and fill in “x: -154” and “y: -55”. That’s where the platform will wait for our rocket.
position the platform for the rocket to jump on

Step 5: Make the rocket jump when touching the platform.

The rocket jumps!

  • We want our rocket to bounce when it touches the platform. Inside the rocket’s “forever” loop, add the “if then else” block from the Control category. 
  • From the Sensing category (it’s the light blue one), grab “touching” and select the “Sprite1” (your platform sprite) from the dropdown.
  • In the “else” part, move the “change y by -4” block you made before.
  • For the “if” part, first, we make the rocket jump. Grab “repeat” from Control and type “15” in it.
  • Inside “repeat,” add “change y by 4” from “Motion” and “wait 0.05 seconds” from Control after it. This makes the rocket go up for a bit, like it’s bouncing!
make the rocket jump when touching platform
make the rocket jump when touching platform

Step 6: Change the platform position every time the rocket touches it.

Moving the Platform

In the rocketship sprite

  • We’ll make the platform move every time the rocket jumps. In the rocket’s code, in the “if” part, find Events and use “broadcast message1”.
change the platform position in scratch

In the platform sprite

  • Wait for that broadcast message. Use “when I receive message1” from Events
  • To change the spot, use “glide 1 secs to x: y:” from Motion.
    • Set the value of y with y position block from the Motion category. This will make sure the platform remains at the same height.
    • For x, add a random block from Operators category, and set the lower limit to -200 and upper limit to 200
broadcast message to glide

This completes our game logic, we can now move our rocket to go left and right, and use the platform to stay afloat.

rocketship jumping, game logic complete

Step 7: Add scores in the game.

Keeping track of scores

A game is no fun without the scores. To set up scores, create a new variable named Scores.

  • Click on the Variables category and choose “Make a Variable”
  • Name it Scores, press ok, and you should see it appear in your variables list. Make sure it’s checked off so it shows in your game.
make a scores variable

In your rocketship sprite, 

  • Drag the set the value of Scores variable and position it below the “When flag clicked”. Set its value to 0.
  • Inside the if condition, in the “forever” block, add the change value by 1 block. And select the Scores variable from the dropdown.
set the score in the jumping game

Your game is complete!

Bonus 1: Change costumes of the Rocketship sprite 

Change costume when jumping

To add the rotate effect in the rocket, we can change its costume when it goes up.

In the Rocketship sprite

  • Drag the “next costume” block from the looks category, and place it inside the repeat 15 block, in the if condition.
  • To reset the costume, drag the “switch costume to” block from the Looks category, and place it below the “when green flag clicked” block.
  • Select the default costume value. For the rocketship sprite, the costume rocketship-e makes perfect sense, as it doesn’t have any ignition.
change costumes
completed jumping game in scratch

Bonus 2: Increase difficulty as the game progresses

Draw more costumes in platform sprite

To increase the difficulty of the game, add costumes to the platform sprite with a smaller size of platform.

  • Select the platform sprite, and go to the Costumes tab.
  • Right click on the Costume, and select duplicate.
  • Decrease the size of the platform in the duplicated sprite.

In the Code tab of the platform sprite,

  • Add the “if then” block from the Control category and place it below “when I receive message1” block.
  • For the condition of the “if” block, use the > block from the Operators category.
  • Inside > block, add scores variable on left side, and any value of scores when you want to change platform on right side. For example, we can use 15.
  • Inside the “if” block, add the “Switch Costume” block from the Looks category, and select the costume with decreased size.
  • Add another switch costume block and place it below the “when green flag clicked” block. 

Let’s play!

It’s time to test your game by pressing the green flag above your game’s screen. 

Compete with your friends and see who can score the most scores.

Download Free Printable Scratch Coding Tutorials PDF

Get the Rocketship Landing game and Flying Space Cat Scratch tutorials in a printable format.

Make More Games in Scratch

CodeWizardsHQ firmly believes that initiating the exploration of technology and programming during childhood can pave the way for future success. We have designed a structured program for elementary school coding, that leverages the power of Scratch to teach coding principles.

In the first course, Animation and Games with Scratch, students delve into essential programming concepts, including variables, loops, and conditionals. By the end of this course, they will possess the ability to create their own games and animations using Scratch. This prepares them for their journey toward a future in the ever-evolving world of technology.

Our coding classes for kids allow children to nurture their skills, unleash their imaginations, and experience the joy of learning!

The post How to Make a Jumping Game on Scratch appeared first on CodeWizardsHQ.

]]>