Discuss Scratch

Sniper_Legend
Scratcher
70 posts

Scratch code

is the raw code of scratch in a certain language, or it's own?
I am referring to the code found in the sprite.json files in the project files.
apple502j
Scratcher
1000+ posts

Scratch code

Raw code of Scratch project is in a JSON file. JSON can contain any data (except binary, like photos) and is liked by so many developers.
Raw code of Scratch itself - what you see in the editor is also open, written in a variant of JavaScript.
_nix
Scratcher
1000+ posts

Scratch code

apple502j wrote:

Raw code of Scratch project is in a JSON file. JSON can contain any data (except binary, like photos) and is liked by so many developers.
Yup – also, JSON is just the syntax for how you convey information through text. There are a LOT of different kinds of data that can be stored with JSON, like Scratch user information, project.json files, save files in video games, and even information like data from a program that senses real-world temperature. All these things can be stored with JSON, but they are done so in different formats. So, the JSON data you find in a Scratch project file and info about how could your imaginary e-refrigerator is will be written with the same symbols (like “{” and “[” and quotation marks), but in a totally different structure. After all, Scratch projects are made up of many many numbers and strings all representing different sprites and blocks, while the data from your fridge is probably just a single number that tells how cold it is!

Anyway, in summary, Scratch data is stored in JSON, in its own particular structure that only Scratch 3.0 knows how to recognize. (PS, the code for how that JSON data is loaded by Scratch 3.0 is open source, which means you can read it online and run it yourself. So it's not a proprietary format! It's just unique to Scratch 3.0. )
Sniper_Legend
Scratcher
70 posts

Scratch code

awesome! thanks
lgcoding3
New Scratcher
1 post

Scratch code

what code is use to code this entire platform
ninjaMAR
Scratcher
1000+ posts

Scratch code

lgcoding3 wrote:

(#5)
what code is use to code this entire platform
The majority of the code is written in JavaScript.

In the future, please don't necropost. What is necroposting? Necroposting is posting on an old topic (many years old) that has already been resolved. Instead of necroposting, feel free to make a topic in a forum.

Powered by DjangoBB