This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#226 2010-10-03 21:58:38

Greatdane
Scratcher
Registered: 2007-06-05
Posts: 1000+

Re: Lets make a new Scratch viewer!

I was actually once thinking of creating a different viewer myself.
The viewer would be a JavaScript application that runs the project, and then HTML would allow embedding and a play, pause, and resume button.

I'm still trying to figure out the encoding,though.

Good luck on your project!  smile


The future belongs to those who believe in the beauty of their dreams.
        ~ Eleanor Roosevelt

Offline

 

#227 2010-10-03 22:14:45

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: Lets make a new Scratch viewer!

bbbeb wrote:

ooh!
ooh!
pick me!!!
pick me!!!
i can help find errors and be constructive!!
pick me!!!

big_smile   big_smile

Okay...I think that's jd1's decision.


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#228 2010-10-03 23:20:51

CommunistPancake
New Scratcher
Registered: 2010-10-02
Posts: 6

Re: Lets make a new Scratch viewer!

If you need to find the project format, this is from the source code page:
http://download.scratch.mit.edu/source-code/ScratchFileFormat.txt

Offline

 

#229 2010-10-03 23:25:39

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: Lets make a new Scratch viewer!

CommunistPancake wrote:

If you need to find the project format, this is from the source code page:
http://download.scratch.mit.edu/source-code/ScratchFileFormat.txt

We're not doing that anymore. We're using project summaries now.


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#230 2010-10-04 01:59:32

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Lets make a new Scratch viewer!

Ok to start lets make 3 arrays
The sprite name whos script it is
The script
Inputs

Lets get code like that first then we can use it!


You can now reach me on Twitter @johnnydean1_

Offline

 

#231 2010-10-04 03:05:52

Daffy22
Scratcher
Registered: 2008-12-15
Posts: 500+

Re: Lets make a new Scratch viewer!

CommunistPancake wrote:

If you need to find the project format, this is from the source code page:
http://download.scratch.mit.edu/source-code/ScratchFileFormat.txt

emm... I leave you for 1 day and we've scrapped the idea of decoding it. I think this dude could help with this txt file!!! Take a look.  big_smile


http://img201.imageshack.us/img201/1784/logosmalle.png
"Spectacular - 5 Star" -  CNET.com Editor.

Offline

 

#232 2010-10-04 17:39:22

midnightleopard
Scratcher
Registered: 2007-09-13
Posts: 1000+

Re: Lets make a new Scratch viewer!

woa. CommunistPancake, you're a genius (I think, if the rest of the team agrees.)

If he's correct we can crack open that document and maybe figure out how to decode from there! I like the idea of decoding if we maybe read that.


http://pwp.wizards.com/5103673563/Scorecards/Landscape.png

Offline

 

#233 2010-10-04 17:43:58

bbbeb
Scratcher
Registered: 2009-06-11
Posts: 1000+

Re: Lets make a new Scratch viewer!

ScratchReallyROCKS wrote:

CommunistPancake wrote:

If you need to find the project format, this is from the source code page:
http://download.scratch.mit.edu/source-code/ScratchFileFormat.txt

We're not doing that anymore. We're using project summaries now.

Epic FAIL!

Last edited by bbbeb (2010-10-04 17:46:52)


Back in my day.... there were no laws that censored the internet... now, there are.... nah.

Offline

 

#234 2010-10-04 20:54:20

CommunistPancake
New Scratcher
Registered: 2010-10-02
Posts: 6

Re: Lets make a new Scratch viewer!

You could also use the silk icon set for the green flag and red stop sign. They have them both, and it is completely free. No credit needed.
http://www.famfamfam.com/lab/icons/silk/

Offline

 

#235 2010-10-04 21:13:44

CommunistPancake
New Scratcher
Registered: 2010-10-02
Posts: 6

Re: Lets make a new Scratch viewer!

Another thing (sorry for the double post), but we need to find out what image format scratch saves the images in the projects. Without it, we can't display anything!

Offline

 

#236 2010-10-04 21:34:47

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: Lets make a new Scratch viewer!

CommunistPancake wrote:

Another thing (sorry for the double post), but we need to find out what image format scratch saves the images in the projects. Without it, we can't display anything!

It uses .gif and .bmp.


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#237 2010-10-04 21:36:44

midnightleopard
Scratcher
Registered: 2007-09-13
Posts: 1000+

Re: Lets make a new Scratch viewer!

why can't we decode the .sb file? imagine a world where someone could go to our website, then upload their project then see it ran in a canvas? Without downloading a mod?


http://pwp.wizards.com/5103673563/Scorecards/Landscape.png

Offline

 

#238 2010-10-04 22:31:01

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: Lets make a new Scratch viewer!

midnightleopard wrote:

why can't we decode the .sb file? imagine a world where someone could go to our website, then upload their project then see it ran in a canvas? Without downloading a mod?

Scratch files are binary! JavaScript isn't powerful enough to decode them.


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#239 2010-10-05 03:16:08

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Lets make a new Scratch viewer!

ScratchReallyROCKS wrote:

midnightleopard wrote:

why can't we decode the .sb file? imagine a world where someone could go to our website, then upload their project then see it ran in a canvas? Without downloading a mod?

Scratch files are binary! JavaScript isn't powerful enough to decode them.

Hmm, I wonder if someone could upload a project and then download a zip file. Then they can use the zip file to run the project in the browser!


You can now reach me on Twitter @johnnydean1_

Offline

 

#240 2010-10-05 06:54:11

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: Lets make a new Scratch viewer!

johnnydean1 wrote:

ScratchReallyROCKS wrote:

midnightleopard wrote:

why can't we decode the .sb file? imagine a world where someone could go to our website, then upload their project then see it ran in a canvas? Without downloading a mod?

Scratch files are binary! JavaScript isn't powerful enough to decode them.

Hmm, I wonder if someone could upload a project and then download a zip file. Then they can use the zip file to run the project in the browser!

I was thinking that our mod could upload the project package, and then people would download just the .sb file from it.


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#241 2010-10-05 09:15:57

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Lets make a new Scratch viewer!

CommunistPancake wrote:

If you need to find the project format, this is from the source code page:
http://download.scratch.mit.edu/source-code/ScratchFileFormat.txt

OH SWEEEEEEEEEEEEEEEEEET!!!!!! Thank you...  tongue  I might try and make a faster Java Player (just for fun.)


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#242 2010-10-05 09:19:51

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Lets make a new Scratch viewer!

ScratchReallyROCKS wrote:

johnnydean1 wrote:

ScratchReallyROCKS wrote:


Scratch files are binary! JavaScript isn't powerful enough to decode them.

Hmm, I wonder if someone could upload a project and then download a zip file. Then they can use the zip file to run the project in the browser!

I was thinking that our mod could upload the project package, and then people would download just the .sb file from it.

Why can't you use php like nXIII said?


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#243 2010-10-05 11:10:43

Daffy22
Scratcher
Registered: 2008-12-15
Posts: 500+

Re: Lets make a new Scratch viewer!

MathWizz wrote:

ScratchReallyROCKS wrote:

johnnydean1 wrote:


Hmm, I wonder if someone could upload a project and then download a zip file. Then they can use the zip file to run the project in the browser!

I was thinking that our mod could upload the project package, and then people would download just the .sb file from it.

Why can't you use php like nXIII said?

we are going to use PHP and html5 and JS for the visual stuff.  tongue


http://img201.imageshack.us/img201/1784/logosmalle.png
"Spectacular - 5 Star" -  CNET.com Editor.

Offline

 

#244 2010-10-05 11:33:43

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Lets make a new Scratch viewer!

Daffy22 wrote:

MathWizz wrote:

ScratchReallyROCKS wrote:


I was thinking that our mod could upload the project package, and then people would download just the .sb file from it.

Why can't you use php like nXIII said?

we are going to use PHP and html5 and JS for the visual stuff.  tongue

No, I meant to read the Scratch file.


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#245 2010-10-05 11:45:18

Daffy22
Scratcher
Registered: 2008-12-15
Posts: 500+

Re: Lets make a new Scratch viewer!

MathWizz wrote:

Daffy22 wrote:

MathWizz wrote:


Why can't you use php like nXIII said?

we are going to use PHP and html5 and JS for the visual stuff.  tongue

No, I meant to read the Scratch file.

yeah we are.  big_smile  (I'm not sure what they're on about but theres no other easy way to read the file.)


http://img201.imageshack.us/img201/1784/logosmalle.png
"Spectacular - 5 Star" -  CNET.com Editor.

Offline

 

#246 2010-10-05 11:47:14

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Lets make a new Scratch viewer!

Ok who knows PHP, and if so can you make a start on the .sb file


You can now reach me on Twitter @johnnydean1_

Offline

 

#247 2010-10-05 11:55:10

AmoebaMan
Scratcher
Registered: 2009-01-26
Posts: 500+

Re: Lets make a new Scratch viewer!

MAKE IT MAKE IT MAKE IT!!!!  Maybe I'll learn how to program HTML and PHP just so that I can help you.


http://i942.photobucket.com/albums/ad269/RyanScathe/AmoebaMan.png

Offline

 

#248 2010-10-05 12:05:36

Daffy22
Scratcher
Registered: 2008-12-15
Posts: 500+

Re: Lets make a new Scratch viewer!

I am fairly advanced with PHP so I could have a go at decoding the .sb file. First I'll try a few simple blocks.  big_smile


http://img201.imageshack.us/img201/1784/logosmalle.png
"Spectacular - 5 Star" -  CNET.com Editor.

Offline

 

#249 2010-10-05 12:13:28

Daffy22
Scratcher
Registered: 2008-12-15
Posts: 500+

Re: Lets make a new Scratch viewer!

okay here is a test:

Code:

EventHatMorph       Scratch-StartClicked
   say:   hi   hello!

This is basically one sprite with one script that says hi and another sprite that says hello! The probllem is: how can I tell which sprite countains which blocks?


http://img201.imageshack.us/img201/1784/logosmalle.png
"Spectacular - 5 Star" -  CNET.com Editor.

Offline

 

#250 2010-10-05 12:16:32

Daffy22
Scratcher
Registered: 2008-12-15
Posts: 500+

Re: Lets make a new Scratch viewer!

How can we get the .sb project like this:

Code:

79 98 106 83 1 83 116 99 104 1    ; object store header
0 0 0 3                ; object table size, 3 objects
    109 1 8            ; [1] a user-class SampledSound object, version 1, 8 fields 
        99 0 0 2            ; evelopes: ref to object table entry 2
        4 0 0 128 0        ; scaledVol: 32768
        5 0 0                ; initialCount: 0
        99 0 0 3            ; samples: ref to object table entry 3
        5 86 34            ; sampilingRate: 22050
        5 0 0                ; samplesSize: 0
        4 0 1 0 0            ; scaledIncrement: 65536
        1                    ; scaledInitialIndex: nil
    20 0 0 0 0        ; [2] a zero-length array
    12 0 0 0 0        ; [3] a zero-length sound buffer

That's how the .txt file linked to explains the file. Any help?


http://img201.imageshack.us/img201/1784/logosmalle.png
"Spectacular - 5 Star" -  CNET.com Editor.

Offline

 

Board footer