NEW! Squads After School for ages 7-17.

Our summer season has come to a close, but tech learning and fun don't have to end here. Register today for fall online courses!

NEW! Squads After School for ages 7-17.

Our summer season has come to a close, but tech learning and fun don't have to end here. Register today for fall online courses!

What is block-based coding?

scratch programming on laptop

What is block-based coding?scratch block coding example

Block-based coding utilizes a drag-and-drop learning environment, where programmers use coding instruction “blocks” to construct animated stories and games. It’s an entry-level activity, where kids can gain a foundation in computational thinking through visuals as opposed to coding that is based in text.

What do you mean by “blocks?”

When we mention “blocks,” it’s a way to describe the “chunks” or “pieces” of instructions a user is putting together in order to tell their creation what to do. 

For example, Scratch programming is block-based, and is one of the most popular options when it comes to kids coding languages. Blocks in Scratch are defined as:

Motion Blocks: Used to control movement, telling sprites (Scratch images) to move and turn in relation to the sprite itself, other sprites, or a certain position.

For instance, with one single block, creators can tell a sprite to move forward 10 steps, or turn 15 degrees to the right. 

motion blocks

Looks blocks: Used to change a sprite’s appearance, and can make a sprite say or think something, change costumes or backdrops, or even change the size or graphic effects of a sprite. 

For example, creators can tell their sprite to display a text bubble and say “hello!” for a 2-second duration.

Sound blocks: Used to add sounds to a story or game, or edit sound effects like pitch, and even change the volume of different sounds. 

For example, a sound block can be used to start playing a “meow” sound, and then another sound block can be used to stop all sounds. 

Blocks provide a valuable learning experience, with kids quickly realizing that their programs will only do what they tell them to do, and will only run code in the order it was “written.”

Tell me more about “sprites!”

As mentioned, a sprite can be thought of as an image, which can be a character or object. Thus, creating a character in Scratch is called “painting a sprite.”

Sprites can be easily created from something like a shape tool, and again, their color effects can be altered with a looks block. 

What can you create with drag-and-drop block coding?

With block-based coding in a program like Scratch, kids can let their imaginations run wild, creating any number of sprites, and bringing those creations to life with animation and storytelling. 

For example, in Scratch, kids can make:

Clicker games where a player must click things, say like popping balloons, in order to earn points. And as each balloon is clicked, a new one of a different color pops up in a different part of the screen. 

scratch clicker game example

Chase games allow players to control a character who is “chasing” another character or object. For example, it can be an octopus trying to catch a fish swimming around randomly across the screen.

Pong games are just as the name suggests; the classic setup of a mouse-controlled paddle that is moved back and forth in an attempt to keep the bouncing ball from touching the ground. 

Make it fly games ask the player to use up and down arrows to control their sprite, which might be a bird who can move up and down to catch a bug scurrying across the screen.

Adventure games are a bit more advanced, and are built to have players collect objects as they progress through multiple game levels on different backgrounds. 

And then completely off the Scratch platform, if something like learning to code a virtual robot online sounds like fun, graphical code blocks can also be found with Vex Code VR.

Additional learning

One cool thing that block-based coding allows for is a more tangible coding experience for young learners. Not only on-screen, but also something kids can hold in their hands with something like Scratch Cards; which is a set of cards that offers a physical, visual representation of different coding concepts and lessons. 

For students ready to jump into block-based coding right now, they can do so with a one-on-one instructor in our online coding courses, or with a small group of other students for the added socialization benefit with our Virtual Tech Camps

A photo of Ryan

Ryan manages blog content at iD Tech, starting with the company in 2008. He earned his MBA from Santa Clara University after obtaining his Bachelor’s degree from Arizona State. Connect on LinkedIn!