Tag Archives: articles

Host a secret chat using Mesh

mesh-chatScratch has a secret feature called Mesh that enables multiple projects to interact with one another via broadcasts and variables. To demonstrate the feature, I’ll show you how to create a simple chat program.

Note: This is not a suitable Scratch 2.0 project, where chat clients are prohibited. But this project is 1.4 based and uses the mesh feature which is designed to work over a local network.

How to Create a Scrolling Sprite Project

Scrolling-sprite-script
sample scrolling sprites script.

Scrolling sprites is a sought-after skill for a Scratch programmer, and it sounds like a big challenge. Creating the effect is not as complicated as it may seem, however. In this article, I will introduce two methods to make sprites scroll – this is sometimes called a “scroller” project in Scratch. Scrolling is also a fundamental concept in creating a platform game, which is one reason Scratchers want to learn how to do it.

For this project, I won’t go through the entire process of drawing multiple frames with platforms in the Paint Editor. Instead, I’m going to remix the FishChomp game that comes bundled with the example projects in your Raspberry Pi version of Scratch.

Exploring the PicoBoard Sensors

One of the great all-around add-ons for Scratch is the PicoBoard, which plugs in very easily to the Raspberry Pi. In a previous issue of Raspberry Pi Geek, I introduced the resistance sensors on the PicoBoard by attaching them to a thermistor and measuring the resistance values of melting or warming water [1]. This time around, I’ll show you two animations you can do with the PicoBoard as educational projects or part of a larger project.

The first example uses musical fruits and veggies to explore the sound sensor and create some music scripts using the sound blocks in Scratch. If you don’t have a PicoBoard [2], the scripts shown here will still give you ideas and actual snippets of code that you can use to add music to other projects.

The second example creates a joystick to control the speed and direction of a sprite by using the slider and light sensor. The second half of the script demonstrates a universal way to move sprites to the opposite side of the stage after it passes the boundary.