Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Scratch 1.4 file writer code?
- GP1
- Scratcher
100+ posts
Scratch 1.4 file writer code?
Hello. I am new to the format in which Scratch 1.4 is in, and I need to be able to write to a Scratch 1.4 file format via PHP. I searched the world out of the wiki, and looked over and over at the documentation for the format. And, I just do not understand it! Is there some simple source code that writes to a .sb file (perhaps reads). If not, could somebody be kind enough to explain exactly how writing would take effect? Thank you!
EDIT: Yes, yes, I know that the Scratch 2.0 file format is easier than the 1.4 format. However, I need to write specifically to the 1.4 format at first.
EDIT: Yes, yes, I know that the Scratch 2.0 file format is easier than the 1.4 format. However, I need to write specifically to the 1.4 format at first.
Last edited by GP1 (Aug. 10, 2013 05:30:31)
- Hardmath123
- Scratcher
1000+ posts
Scratch 1.4 file writer code?
If you're not bound to use PHP, blob8108 wrote an amazing library called Kurt to read and write Scratch 1.4 and 2.0 files with Python (you can run Python on servers, too, if that's why you wanted PHP).
EDIT: http://scratch.mit.edu/discuss/topic/12681/
EDIT: http://scratch.mit.edu/discuss/topic/12681/
Last edited by Hardmath123 (Aug. 10, 2013 05:40:17)
- GP1
- Scratcher
100+ posts
Scratch 1.4 file writer code?
That is actually what I am looking for! Do you happen to know which script the saving code is in, or do I have to find it myself (quick look and I couldn't find it ). I may be able to turn it into PHP code. If you're not bound to use PHP, blob8108 wrote an amazing library called Kurt to read and write Scratch 1.4 and 2.0 files with Python (you can run Python on servers, too, if that's why you wanted PHP).
EDIT: http://scratch.mit.edu/discuss/topic/12681/
Last edited by GP1 (Aug. 10, 2013 06:00:41)
- GP1
- Scratcher
100+ posts
Scratch 1.4 file writer code?
The 1.4 file format is a bit of a mess. What precisely are you trying to do? Unless you're trying to write something very simple, it's probably not worth porting to PHP.http://scratch.mit.edu/discuss/topic/13101/
For functionality, I want full support of Scratch 1.4 first. Go Everywhere is a way to edit scratch projects on mobile devices, not a way to have something new altogether. I emailed the Scratch team about uploading Go Everywhere projects to the Scratch website. They have not responded, but I do not think that they would say no (since the projects do not have any modded material. They only have been edited in a different editor.) Because Go Everywhere is cheap, we can only use free webhosts with PHP installed (unless ssss can donate a paid server). And that means that PHP has to be our language to do this in. We can read Scratch 1.4 projects (thanks to MathWhiz, but I am extremely unsure about how he did it). We just need to be able to write to them.
- nathanprocks
- Scratcher
1000+ posts
Scratch 1.4 file writer code?
Why not read 1.4 projects and save them as 2.0 project?The 1.4 file format is a bit of a mess. What precisely are you trying to do? Unless you're trying to write something very simple, it's probably not worth porting to PHP.http://scratch.mit.edu/discuss/topic/13101/
For functionality, I want full support of Scratch 1.4 first. Go Everywhere is a way to edit scratch projects on mobile devices, not a way to have something new altogether. I emailed the Scratch team about uploading Go Everywhere projects to the Scratch website. They have not responded, but I do not think that they would say no (since the projects do not have any modded material. They only have been edited in a different editor.) Because Go Everywhere is cheap, we can only use free webhosts with PHP installed (unless ssss can donate a paid server). And that means that PHP has to be our language to do this in. We can read Scratch 1.4 projects (thanks to MathWhiz, but I am extremely unsure about how he did it). We just need to be able to write to them.
- GP1
- Scratcher
100+ posts
Scratch 1.4 file writer code?
My main reason is that the player we are using, JsScratch, reads from the 1.4 format. However, thank you for the suggestion! I had not considered it. I'll try it out. Just need to rewrite JsScratch a little.Why not read 1.4 projects and save them as 2.0 project?The 1.4 file format is a bit of a mess. What precisely are you trying to do? Unless you're trying to write something very simple, it's probably not worth porting to PHP.http://scratch.mit.edu/discuss/topic/13101/
For functionality, I want full support of Scratch 1.4 first. Go Everywhere is a way to edit scratch projects on mobile devices, not a way to have something new altogether. I emailed the Scratch team about uploading Go Everywhere projects to the Scratch website. They have not responded, but I do not think that they would say no (since the projects do not have any modded material. They only have been edited in a different editor.) Because Go Everywhere is cheap, we can only use free webhosts with PHP installed (unless ssss can donate a paid server). And that means that PHP has to be our language to do this in. We can read Scratch 1.4 projects (thanks to MathWhiz, but I am extremely unsure about how he did it). We just need to be able to write to them.
- scimonster
- Scratcher
1000+ posts
Scratch 1.4 file writer code?
Many free hosts also allow Python scripts.
Retired Community Moderator
BTW, i run Google Chrome 41.0.2272.101 on a Linux system - Ubuntu 14.04. NEW: iPad 4th gen. w/retina.
418 I'm a teapot (original - to be read by bored computer geeks)
THE GAME (you just lost)
; THE SEMICOLON LIVES ON IN OUR SIGS
- Discussion Forums
- » Advanced Topics
- » Scratch 1.4 file writer code?