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
1
vote
4 answers

How to change the resolution of the stage in MIT Scratch

The default resolution of the Stage in MIT Scratch is 480x360 in a 4:3 aspect ratio. I want to change it to a 16:9 aspect ratio, with a 720p resolution. Is there any source file or script that has to be edited in order to do this? Also, I found this…
user10336668
1
vote
1 answer

Cloning Sprites in MIT-Scratch

Recently, in a project for school. I have come across an increasingly frustrating and what seems to be an unsolvable problem. Whilst attempting to create a diving game, in which the sprite of a diver (sprite x) touches clones of a fish sprite…
HCP
  • 9
  • 3
1
vote
1 answer

Create visual scratch-like diagrams from code

I'm making a user guide for a program I made and I want to explain what it does step by step. I want to create some kind of code diagram that visually shows my code. I don't need it to be automatically generated or anything. Just looking for…
苹果user3822749
  • 154
  • 1
  • 1
  • 6
1
vote
2 answers

How do I make a Scratch sprite bounce off the edge of a maze?

I'm currently making a project, where I have a sprite that is controlled by the player, and it has to make its way through a maze-like stage: The red box is the player. How do I make the player not be able to go through the black lines? This…
Mithical
  • 603
  • 1
  • 17
  • 28
1
vote
2 answers

scratch bounce then upside down

Above you can see my Scratch workspace where the ship on the left is upside down when it is running, and IT IS THE SAME CODE. Is it a bug of scratch or some kind of other problem?
vic97192
  • 63
  • 1
  • 1
  • 8
1
vote
1 answer

Edit JSON File in Scratch 3.0

I would like to know if it is possible to edit the JSON file of Scratch 3.0 project. I downloaded a project, changed the name into a .zip, unzipping it, and opening the JSON file that it left. I did not change any line of the JSON code. I compressed…
Anas M K
  • 107
  • 1
  • 1
  • 7
1
vote
1 answer

Scratch quiz game randomizer not working

I have an inventory of 30 variables that are randomly selected. When one variable is chosen a question that corresponds with that variable should appear. Instead no matter which variable is chosen, the block at the end of the code is chosen. I even…
Gabe
  • 13
  • 1
  • 3
1
vote
0 answers

Scratch 3.0 taking in a byte array for loading

I have been working on a project that is implementing Scratch 3.0 for a learning tool for children. We are going to be hosting it on an azure web application. We have hit a bit of a wall though and we aren't really sure how to get past it. The issue…
1
vote
4 answers

Find angle between two points

I am trying to make an image move towards my mouse pointer. Basically, I get the angle between the points, and move along the x axis by the cosine of the angle, and move along the y axis the sine of the angle. However, I don't have a good way of…
Indigo2003
  • 27
  • 11
1
vote
2 answers

Creating a Custom reporter block in Scratch

Quite simple, how do I create a hacked custom reporter block in Scratch? I know I can make my own custom command block by editing the .json file, but I don't know how to create a custom reporter block. I believe that it is coming to Scratch 3.0, but…
Xetrov
  • 127
  • 12
1
vote
1 answer

Is this a bug in Berkley Snap! or am I just missing something?

I've created a "block" in Berkeley Snap! that implements Heron's Formula (calculating the area of a triangle given the length of the three sides). It works but it reports an error. I've included a screen shot below that sums it all up. (FYI,…
Randall Blake
  • 684
  • 2
  • 6
  • 15
1
vote
1 answer

Four dimensional script in a efficient manner using variables Xrotation, Yrotation, and Zrotation

Is there an efficient formula to map a four dimensional point in a three dimensional space using the variables Xrotation Z rotation and Yrotation as inputs? I specifically need scratch language, but any other language will be suitable.
Xetrov
  • 127
  • 12
1
vote
2 answers

Anyone know if its possible draw to erase the picture on the top?

Scratch allows selection of the color using the set pen color. Does anyone know if its possible to program to set the color to transparent so that what ever is drawn can effectively be erased? What would the color number be for that? Update The…
miltonb
  • 6,905
  • 8
  • 45
  • 55
1
vote
0 answers

Send carriage return

I'm trying to connect through serial Scratchx and a piece of hardware similar to Arduino. Scratchx lets you send data in JS this way: var pingCmd = new Uint8Array(1); pingCmd[0] = 1; device.send(pingCmd.buffer); Problem is the hardware firmware…
user1094081
1
vote
1 answer

How do I make a BTLE connection from Scratch

I want to control a robot from the programming language Scratch but I have no clue how to make this happen. For now I'm running Scratch 1.4 on MacOS, and I can control the robot over BTLE using Swift or ObjC, but don't know where to go from here.…
Jelle
  • 1,024
  • 10
  • 18