Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Scratch compiler beta test
- procd
-
100+ posts
Scratch compiler beta test
I've got a Scratch compiler in beta test now. The compiler is written in C# and so compiles to .NET cil. Currently it only creates executables for Windows but hopefully this can be moved onto mono and hence Linux, Mac and even the raspberry pi.
The compiler is not repackaging Scratch like previous exe generators but is parsing a project and generating an executable with no reliance on Scratch whatever. This means that there are differences between a scratch project and a compiled one. The first difference is that there are no clone limits. The second is that sprites/clones can go offstage. They were conscious design decision however a compiled program runs how I think Scratch runs in other words it's my best guess and so there are likely to be some subtle difference and some not so subtle.
I've made a Scratch project to give some guidelines http://scratch.mit.edu/projects/15429757/
and there are also some youtube videos in my project's notes showing other details.
If you want to get your project compiled go to the beta test project http://scratch.mit.edu/projects/17019203/
UPDATE: Beta Testing is finished. You can now download the compiler via this project http://scratch.mit.edu/projects/35417838/
The compiler is not repackaging Scratch like previous exe generators but is parsing a project and generating an executable with no reliance on Scratch whatever. This means that there are differences between a scratch project and a compiled one. The first difference is that there are no clone limits. The second is that sprites/clones can go offstage. They were conscious design decision however a compiled program runs how I think Scratch runs in other words it's my best guess and so there are likely to be some subtle difference and some not so subtle.
I've made a Scratch project to give some guidelines http://scratch.mit.edu/projects/15429757/
and there are also some youtube videos in my project's notes showing other details.
If you want to get your project compiled go to the beta test project http://scratch.mit.edu/projects/17019203/
UPDATE: Beta Testing is finished. You can now download the compiler via this project http://scratch.mit.edu/projects/35417838/
Last edited by procd (March 2, 2015 07:25:11)
- procd
-
100+ posts
Scratch compiler beta test
Thanks. Have to see how things go. I assume you mean the restriction that it has to be your project? It's a potential can of worms and one reason I want to take things gradually. There are plenty of arguments in the forum about people not giving credit or people not wanting their projects remixed despite having shared a project. The compiler could well make that worse as anyone could potentially download any project compile it and then do what they like.
It would be good to know what people think but one step at a time. Let's see what people think of their compiled projects and iron out any wrinkles first.
It would be good to know what people think but one step at a time. Let's see what people think of their compiled projects and iron out any wrinkles first.
- GamesMast3r
-
11 posts
Scratch compiler beta test
I think this is a really great idea and has a lot of potential in scratchers being able to publish and maybe even profit from stand-alone games, keep up the good work

- Sonickyle
-
1000+ posts
Scratch compiler beta test
I've posted a link; this sounds cool so far.
+1 on the Dropbox idea BTW.
+1 on the Dropbox idea BTW.
No I don't make projects anymore. I left some time ago.
I only check the forums every now and then, but other than that consider me retired.
I have made 2950+ posts / contributed to 2238+ topics
I only check the forums every now and then, but other than that consider me retired.
I have made 2950+ posts / contributed to 2238+ topics
- DigiTechs
-
500+ posts
Scratch compiler beta test
What kind of files does this use? .sb or .sb2? If it's .sb, I would like to see your parser. (Possibly you could put it's source on GitHub? Dropbox is blocked at my school
)

I do, in fact, have my own site; it's here.
I'm also working on a thing called Fetch. Look at it here!
@thisandagain pls explain. @thisandagain pls explain. @thisandagain pls explain. @thisandagain pls explain. @thisandagain pls explain.
- procd
-
100+ posts
Scratch compiler beta test
What kind of files does this use? .sb or .sb2? If it's .sb, I would like to see your parser. (Possibly you could put it's source on GitHub? Dropbox is blocked at my school)
It compiles sb2 files, json is much easier to parse than a blob!
I'm using box not dropbox.
- DigiTechs
-
500+ posts
Scratch compiler beta test
I guess I could look at Kurt, but I was thinking a C-family language might've been easier to get Lua representations of…
You can tell I want to make one of these in Lua,can't you
You can tell I want to make one of these in Lua,can't you

I do, in fact, have my own site; it's here.
I'm also working on a thing called Fetch. Look at it here!
@thisandagain pls explain. @thisandagain pls explain. @thisandagain pls explain. @thisandagain pls explain. @thisandagain pls explain.
- yoland
-
68 posts
Scratch compiler beta test
So Cool! Does any1 know how to make a Java compiler though?
- procd
-
100+ posts
Scratch compiler beta test
I assume you mean a Scratch compiler written in Java? If not then I'd just recommend using the Oracle supplied one! Would be pretty similar to the C# one. The main differences would be the libraries. I've used monogame as the basis for the graphics. Java would require it's own low level graphical library which I expect someone has written There was a java player for Scratch 1.4 which may be of interest if you can find it. So Cool! Does any1 know how to make a Java compiler though?
- gromko
-
51 posts
Scratch compiler beta test
You can download the compiler? Will it available for everyone? When?
- procd
-
100+ posts
Scratch compiler beta test
The compiler will compile sb2 files but can also be given a project id and pull the project from the web. My thoughts at the moment are for a web based compiler so you just put in a project id and then get an exe. That way the original project could be credited. It will be available to everyone. You can download the compiler? Will it available for everyone? When?
The compiler is available now, but I'm beta testing it so am after projects to compile and can provide the exe.
I will also consider compiling projects that are not your own, but would not provide an exe, instead I could show what it's like on youtube.
- yoland
-
68 posts
Scratch compiler beta test
No, a complier that complie into Java, that's the language I knowI assume you mean a Scratch compiler written in Java? If not then I'd just recommend using the Oracle supplied one! Would be pretty similar to the C# one. The main differences would be the libraries. I've used monogame as the basis for the graphics. Java would require it's own low level graphical library which I expect someone has written There was a java player for Scratch 1.4 which may be of interest if you can find it. So Cool! Does any1 know how to make a Java compiler though?
- gigapouch
-
1000+ posts
Scratch compiler beta test
Or do you mean JavaScript?
Last edited by gigapouch (Feb. 19, 2014 01:19:58)
I have a Steam account. If you have one too, feel free to add me to your friends list.
Also check out my YouTube channel if you like the outdoors, Minecraft, cars, roller coasters, etc.
- procd
-
100+ posts
Scratch compiler beta test
Have just re-written TouchingColor function, so that is much quicker. Just need to do the same with ColorTouchingColor.
I then want to try out nXIII's scheduling suggestion which will then hopefully mean that compiled projects will not have to be playable in Turbo mode.
Just wondering if that restriction was a problem for most?
I then want to try out nXIII's scheduling suggestion which will then hopefully mean that compiled projects will not have to be playable in Turbo mode.
Just wondering if that restriction was a problem for most?
- gigapouch
-
1000+ posts
Scratch compiler beta test
Does anybody know of an official compiler that's already been beta tested like this one?
I have a Steam account. If you have one too, feel free to add me to your friends list.
Also check out my YouTube channel if you like the outdoors, Minecraft, cars, roller coasters, etc.
- Sonickyle
-
1000+ posts
Scratch compiler beta test
Nope. There are no official compilers at this time. Does anybody know of an official compiler that's already been beta tested like this one?
No I don't make projects anymore. I left some time ago.
I only check the forums every now and then, but other than that consider me retired.
I have made 2950+ posts / contributed to 2238+ topics
I only check the forums every now and then, but other than that consider me retired.
I have made 2950+ posts / contributed to 2238+ topics
- Discussion Forums
- » Advanced Topics
-
» Scratch compiler beta test