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
5
votes
3 answers

Scratch: How do I produce an ascii text program listing?

My nine year old son is applying to participate in a programming contest. Any language is allowed, and he wants to use Scratch. But the application requires an ascii text listing of a program to solve a specified preliminary problem. They will…
Robert Bruce
  • 681
  • 1
  • 5
  • 10
5
votes
2 answers

How do I determine the direction of another sprite in Scratch

I'm programming a simple game for education in MIT Scratch and want to make a sprite turn towards another sprite (think an alien ship following our hero ship). I can easily make the alien ship point towards the hero: point towards 'hero' But what I…
Eric Clack
  • 1,886
  • 1
  • 15
  • 28
4
votes
1 answer

Scratch execution windows blurred & blinking: is video driver faulty?

I installed Lubuntu 19.04 on old Inspiron 6400 computer (GeForce 7300 laptop edition) to teach Scratch to my son through web scratch editor. Every time I open web editor for a new project through firefox, right zone with the cat is blurred and…
RandomCoder
  • 6,606
  • 6
  • 22
  • 28
4
votes
1 answer

Why doesn't my if-then statement in Scratch ever trigger?

I have been using Scratch for a few months, but am suddenly completely and inexplicably stuck. I can't get a simple if-then condition to trigger. After stripping down to the bare essentials, I have this: the variable d successfully changes when I…
Jeremy
  • 141
  • 4
4
votes
1 answer

why does pick random doesnt pick some numbers in scratch?

I am creating a mini housie game in scratch and I have used the pick random block to pick between 1 and 27. And I have 27 backdrops with 1 to 27 numbers written on them. However I notice that after about 21-22 numbers the random picker is not able…
user979189
  • 1,230
  • 2
  • 15
  • 39
4
votes
7 answers

MIT Scratch Function Block

I'm going through a "Learn to Program with Scratch" book with my kid. One of the exercises is asking to create a "function block" that uses some simple formula. They don't explain what is "function block" in the book or I might've missed it. I…
user1298416
  • 341
  • 4
  • 11
4
votes
6 answers

Is there a visual programming language with a large/configurable stage resolution?

My 8-year-old daughter is learning to program, and was excited to create projects using Code.org. Now she wants to design a program that creates a Babylonian number chart, with numbers from 1 to 1000, but there is no way to render such a thing with…
4
votes
1 answer

How can I quickly convert from hexadecimal to decimal in Scratch?

In other languages you can use things like 0xFF = 255. I am working on a decoding project and I would like to be able to quickly convert from hexadecimal to decimal. I was wondering if there was a very quick way to do this, besides writing a…
Nebula
  • 6,614
  • 4
  • 20
  • 40
4
votes
1 answer

Create from scratch, or build up on Scratch?

I'm considering building a visual programming language, akin to Scratch, for use by children (a.k.a. poor typists) in programming micro-controllers or robots. There is, for example, a project to build a graphical programming environment for the…
Clinton Blackmore
  • 2,427
  • 2
  • 24
  • 31
3
votes
1 answer

How do I write factorials in Scratch?

So I was taking a break from my PvZ project in Scratch and trying to see what I could do in Scratch. So here's the thing: I sort of wanted to see if I could make a converter from say, sin(x°) to sin(xradians), which shouldn't be too hard, except…
CrSb0001
  • 151
  • 1
  • 11
3
votes
2 answers

In Scratch, how can the clone A of Sprite2 detect if it's touching another clone B of the same Sprite2 and delete both clones?

This is for a mini program in Scratch. What I want to do: When a clone A of Sprite2 touches another clone B of the same Sprite2, both clones are deleted, but any other clone stays existing and executing. What I have tried: I have tried finding if…
4.12.22.4.18.0.
  • 133
  • 1
  • 7
3
votes
2 answers

Why does the sprite costume not change?

I'm just starting to play about in Scratch... I seem to have a sprite of a cat with two 'costumes', which I guess are like frames. I made this sequence: ...but when I click the green flag the cat moves to the right but the costumes don't switch. If…
Anentropic
  • 32,188
  • 12
  • 99
  • 147
3
votes
2 answers

Scratch-style token fields in Javascript

I'm trying to make a replica of the drag-and-drop programming interface in Scratch , but in javascript. I have the building blocks part done, but am specifically interested in how I might go about building the tokenized…
Glutnix
  • 144
  • 12
3
votes
1 answer

Converting Scratch colours

Scratch appears to be using its own specialised colour format: Is there a way to get the HEX equivalent of these values and is it possible for it to work the other way?
Richie Bendall
  • 7,738
  • 4
  • 38
  • 58
3
votes
2 answers

Is it possible to stop a function (custom block) while it is running in Scratch?

Can I stop code in a certain script from running when it is in another script? I know there is a stop block, but you can only stop the current script, all other scripts, or all scripts.
Dan
  • 33
  • 3
1
2
3
18 19