Discuss Scratch

procd
Scratcher
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/

Last edited by procd (March 2, 2015 07:25:11)

PlasmaKairo
Scratcher
100+ posts

Scratch compiler beta test

Wow, well done! I have a few question though…
Are these rules and such only in place during the beta testing portion? Will you release the compiler after beta testing?


procd
Scratcher
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.
GamesMast3r
New to Scratch
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
Scratcher
1000+ posts

Scratch compiler beta test

I've posted a link; this sounds cool so far.

+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.
DigiTechs
Scratcher
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
Scratcher
100+ posts

Scratch compiler beta test

DigiTechs wrote:

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.
blob8108
Scratcher
1000+ posts

Scratch compiler beta test

DigiTechs wrote:

If it's .sb, I would like to see your parser.
Have you looked at Kurt's parser?

tosh · slowly becoming a grown-up adult and very confused about it
DigiTechs
Scratcher
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

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
Scratcher
100+ posts

Scratch compiler beta test

Made a project and video to show what it's like going beyond Scratch's 301 clone limit.
Added a link to download the exe version too. See the project notes for the link.

Last edited by procd (Feb. 3, 2014 09:16:27)

yoland
Scratcher
68 posts

Scratch compiler beta test

So Cool! Does any1 know how to make a Java compiler though?
procd
Scratcher
100+ posts

Scratch compiler beta test

yoland wrote:

So Cool! Does any1 know how to make a Java compiler though?
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.
gromko
Scratcher
51 posts

Scratch compiler beta test

You can download the compiler? Will it available for everyone? When?
procd
Scratcher
100+ posts

Scratch compiler beta test

gromko wrote:

You can download the compiler? Will it available for everyone? When?
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.
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
Scratcher
68 posts

Scratch compiler beta test

procd wrote:

yoland wrote:

So Cool! Does any1 know how to make a Java compiler though?
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.
No, a complier that complie into Java, that's the language I know
gigapouch
Scratcher
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.
yoland
Scratcher
68 posts

Scratch compiler beta test

Nope! Just plain old JAVA
procd
Scratcher
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?
gigapouch
Scratcher
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
Scratcher
1000+ posts

Scratch compiler beta test

gigapouch wrote:

Does anybody know of an official compiler that's already been beta tested like this one?
Nope. There are no official compilers at this time.

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.

Powered by DjangoBB