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
0 answers

How to separate n-sided polygons in Scratch

https://scratch.mit.edu/projects/123719143/#player I have written a simple Scratch exercise for my son that draws an array of n-sided polygons, but I want the spacing to be consistent, regardless of the number of sides chosen. It's not bad as it is,…
Ben Vost
  • 31
  • 3
1
vote
2 answers

Scratch how to move sprite to a random selection of preset co-ordinates

I am making a game and I have hidden treasures on a grid that randomly assign new positions each game. The treasure chest sprites can go in any square on the grid, but need to be in the middle (ie cannot be crossing two boxes). How can I do this? I…
George
  • 47
  • 7
1
vote
1 answer

Scratch online - Recursive - Factorial

I can't figure out how to get my recursive call to work in Scratch. Can anyone make any suggestions?
Chris
  • 87
  • 6
1
vote
1 answer

Action Script: Can't get API mod to work in Scratch

I've been trying to make a mod for Scratch that would use the website's API to pull information about user's. The problem is that I've had to break it into two blocks. (These blocks work by calling functions based on a table with block names and…
BKFighter
  • 33
  • 7
1
vote
3 answers

Variables in cloned Scratch sprites - global or local?

I am creating a falling snow background in Scratch and stumbled across the following code: I then read the wiki on cloning sprites and was stumped at this sentence: Variables for all sprites will be the same for each clone, but variables for this…
Timothy Lawman
  • 2,194
  • 6
  • 24
  • 33
1
vote
1 answer

Importing Custom Blocks in Scratch/BYOB/SNAP

I have created a bunch of custom blocks in SNAP/BYOB Editor and now want to share them. I cant seem to find any ready references to this, is there is a way to do it?
Rupin
  • 610
  • 7
  • 23
1
vote
1 answer

Pharo: How to convert ASCII character into ASCII decimal

I'm making a Scratch 1.4 mod using Smalltalk (from MIT) and researching this got me absolutely nowhere. Converting ASCII characters seems easy, but how do you do it in Smalltalk? If you have no clue, the ASCII number of 65 should give you "A" (don't…
ipodlover3354
  • 449
  • 1
  • 4
  • 11
1
vote
2 answers

Scratch - How can I make something like a for loop?

In a traditional programming language, I would do: for (int i = 0; i == 5; i++) { code here } If I needed to loop something five times, I could just use the block repeat 5. But if I want to do something like this: for (int i = 0; i == 5; i++)…
Space
  • 39
  • 1
  • 5
1
vote
1 answer

Set variable not working inside message handler

I think I am missing something here. I have super simple case where I want to use flag as a semaphore. If I press [green flag] setting value back to 0 works just fine. If I press [space], flag is not set after sound is played. Am I missing something…
Oo.oO
  • 12,464
  • 3
  • 23
  • 45
1
vote
3 answers

Programming a Scratch like Software (in terms of UI / framework) for Hardware Interfacing

So I am an engineer and we are working on basic robotic kit (arduino, motors and stuff) for kids, we are based in Karachi, Pakistan and this is where our target market is. We want to provide a software along with the kit - the software needs to be…
1
vote
2 answers

ORD and CHAR in Scratch

I am coming across more and more situations in Scratch where I have to convert a number to its ACSII character or visa versa. There is no built function in the blocks for this. My solution is to create a list of size 26 and append letters A-Z into…
Timothy Lawman
  • 2,194
  • 6
  • 24
  • 33
1
vote
3 answers

Editing the font and style of the text in the instructions box in MIT Scratch project page

The problem: How do I change the font in the instruction text box in an MIT Scratch project page. For example: make a line of text standout in bold. I believe it maybe done through editing the html code that is behind the box as I found a read only…
Timothy Lawman
  • 2,194
  • 6
  • 24
  • 33
1
vote
2 answers

Displaying a Scratch Project (.SB) file within a Delphi EXE FIle

I would like to Display a Scratch Project (.SB) file within my Delphi EXE file. I would like to know if it is possible to display and build the Scratch Project into your Delphi Project. I wish to make a small game in Scratch and then use the game…
1
vote
1 answer

Lego-Style Cocoa Workflow Application

I currently have to develop a system very similar to MIT's Scratch's UI. In case you don't know it, here a screenshot: http://kidconfidence.com/blogs/wp-content/uploads/2007/10/scratch1.png Basically you have bricks in the library on the left you…
Armin Ronacher
  • 31,998
  • 13
  • 65
  • 69
1
vote
2 answers

Python: List item is empty, code to detect if it is and then put in a place holder value?

Hey I'm writing a program that receives a broadcast from Scratch and then determines based on the broadcast, where to proceed. The code turns the broadcast(list item) into a string and then breaks that string into a list using .split(). The only…