procd

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/

PlasmaKairo

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

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

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

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

+1 on the Dropbox idea BTW.

DigiTechs

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 )

procd

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

DigiTechs wrote:

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

DigiTechs

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

procd

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.

yoland

So Cool! Does any1 know how to make a Java compiler though?

procd

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

You can download the compiler? Will it available for everyone? When?

procd

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

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

Or do you mean JavaScript?

yoland

Nope! Just plain old JAVA

procd

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

Does anybody know of an official compiler that's already been beta tested like this one?

Sonickyle

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.