Questions tagged [mit-scratch]

Scratch is a graphical drag-and-drop language developed by MIT.

Scratch is a graphical drag-and-drop language developed by the Lifelong Kindergarten Group at the MIT Media Lab. It is used in a number of grade schools and other educational institutions to teach principles of programming.

It primarily focuses on developing games or other graphics-intensive applications, but it can be used for other tasks as well.

The code interface consists of 'blocks' that are dropped into the editor window and then hooked together to perform tasks. Manipulation of 'sprite' objects is the main focus of the language.

Scratch has inspired several similar programming interfaces, which use its block-manipulation approach to programming.

Other block-programming tools include Snap (also known as Build Your Own Blocks), which extends Scratch with first-class data and better routine-creation tools, Enchanting, which allows programming the Lego NXT controller, and Google's Blockly, which provides generic tools to allow any programming language to be programmed with a block interface. Also Scratch Jr, which focuses on coding for young children (aged 5-7 years), the blocks are placed horizontally instead of vertically like Scratch, as younger children found this easier to understand.

Scratch's official wiki contains documentation and tutorials about all features of Scratch.

Scratch's official discussion forums also contains information concerning Scratch.

Books:

284 questions
3
votes
3 answers

How do you handle game battle combos? - Scratch 3.0

I'm new to programming, and I was wondering how you are able to handle consecutive, timed key presses in order for the character to do something different. For example, in games like 'Super Smash Bros.' you press one button for a character to punch,…
user12971579
3
votes
3 answers

How to stop a clone from inheriting a message

I have this code: But whenever the shoot message is sent to the bullet sprite, and there is a clone on the stage that hasn't hit it's target yet, the clone will be sent back with the go to x: (xOfTower) y: (yOfTower) block. Is there some way to…
stonefish
  • 115
  • 8
3
votes
1 answer

Viewing a remote camera stream in Scratch

I'm doing a project for my son where we're going to have a remote Pi Zero with a camera and various sensors and actuators, connected via wired Ethernet to a Pi 3 as a controller with a Scratch GUI. Seems like I can get a local camera to send video…
3
votes
1 answer

scratch timer method not accurate

So I'm making a game that depends greatly on time and how fast a person responds and I noticed a little bug where it has a randomized time. For example: I have the method wait pick random .01 to 3 seconds set ghost effect to 0 reset timer repeat…
Th1sguy26
  • 54
  • 9
3
votes
1 answer

A Grid of Clones

My goal is to build a 5x5 grid of images. In the following code, row, col and rowcol were created as variables local to the sprite, and newcol, newrow and cats are global. (By the way, is it possible to tell which variables are local and which are…
Jim K
  • 12,824
  • 2
  • 22
  • 51
3
votes
1 answer

IDs in Scratch: Cloud Variables

I have a multiplayer project which has some forever loops with checking code inside of them. The problem is, multiple computers might process this and change crabx or craby due to lag in the variables dvotes, uvotes, lvotes, or rvotes. Only one…
yummypasta
  • 1,398
  • 2
  • 17
  • 36
3
votes
3 answers

What do nested "touching" blocks do?

Making a Scratch platformer, I discovered that this did not work how I wanted: ...because it just didn't seem to run at the right rhythm for my program. However, this did work: ...and I notice it being used in platformers such as Sushi…
Ben Wheeler
  • 6,788
  • 2
  • 45
  • 55
3
votes
1 answer

Bridson’s algorithm for Poisson-disc sampling on Scratch

I try to program the Bridson’s algorithm for Poisson-disc sampling on scratch, it seams to be some side effect or a bug I can't find. Could you help me ? Here is my try : My try online. Some explanation on the algorithm.
Tarass
  • 131
  • 11
3
votes
1 answer

MIT-Scratch adding/removing language features

I am seeking a way to allow my non-tech users to specify a workflow and execute it (if anyone is interested, I want them to specify and execute test cases). Visual programming seems a good way to go. Can I modify the Scratch IDE to remove some…
Mawg says reinstate Monica
  • 38,334
  • 103
  • 306
  • 551
3
votes
1 answer

How do you find the width of a circle from any given y position?

I was wondering if anybody knew how to find the width of a circle in any given y position. For example, lets say you have a unit circle, the radius is 100 units tall. Now three fourths the way up the circle, 25 units above the center of the circle,…
I. C.
  • 61
  • 1
  • 3
3
votes
6 answers

Scratch game scoring bug

I'm making a paddle ball game on Scratch (just for fun), and I'm running into a problem with my scoring. If you want to look at the code I already wrote, the link to the game is https://scratch.mit.edu/projects/66541388/ . For some reason, when the…
3
votes
3 answers

Simulating a custom reporter block in Scratch?

In Scratch 2.0, support for custom stack blocks (procedures) was added. But is there any way to use this to "abstract away" logic that returns a value? For example, i have here a script to naively calculate exponents: (view graphic…
Scimonster
  • 32,893
  • 9
  • 77
  • 89
3
votes
3 answers

Scratch output file .txt or similar

I want to know if there is an easy way to open a .txt file and load some comma delimited data into variables in Scratch and furthermore add some variable data from Scratch to a .txt file or similar? I have done a fair bit of google searching but not…
user2965258
  • 137
  • 3
  • 12
3
votes
2 answers

Sprite disappears in Scratch even when touching another sprite

On my puppy salon project, I have run into a problem when I get to the necklace section. I want all the unused necklaces to disappear when they receive the message m11, but for the one on the puppy to remain. Right now, however, all the necklaces…
3
votes
1 answer

Command line arguments for Scratch 1.4

I'm using Scratch 1.4 for preparing a course for children. The course is about controlling real devices (self built traffic lights, modified toys having motors, sensors, etc.) For interfacing the hardware I'm using the Remote Sensor Protocol and the…
Valentin H
  • 7,240
  • 12
  • 61
  • 111
1 2
3
18 19