Discuss Scratch
- Discussion Forums
 - » Advanced Topics
 - » Scratch compiler beta test
        
         
- 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/
                        
                            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?
                        
                        
                    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.
                        
                        
                    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 Scratcher
                        
						
						 
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.
                        
                        
                    +1 on the Dropbox idea BTW.
- 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 
)
                        
                        
                    
)- procd
 - 
                            
						
						
                            Scratcher
                        
						
						 
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
 - 
                            
						
						
                            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
                        
                        
                    You can tell I want to make one of these in Lua,can't you

- 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
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
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
No, a complier that complie into Java, that's the language I knowSo 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.
- gigapouch
 - 
                            
						
						
                            Scratcher
                        
						
						 
1000+ posts
Scratch compiler beta test
Or do you mean JavaScript?
                        
                            Last edited by gigapouch (Feb. 19, 2014 01:19:58)
- 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?
                        
                        
                    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?
                        
                        
                    - Sonickyle
 - 
                            
						
						
                            Scratcher
                        
						
						 
1000+ posts
Scratch compiler beta test
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.
- Discussion Forums
 - » Advanced Topics
 - 
            » Scratch compiler beta test 
         





)


