This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.
  • Index
  •  » Advanced Topics
  •  » The .sprite File Format Specifications -- .Sprite Reverse Engineered

#26 2011-12-15 16:14:01

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: The .sprite File Format Specifications -- .Sprite Reverse Engineered

Thanks. I didn't know.
Also, which morphs do you want me to research?


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#27 2011-12-16 04:17:31

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: The .sprite File Format Specifications -- .Sprite Reverse Engineered

bobbybee wrote:

Thanks. I didn't know.
Also, which morphs do you want me to research?

Probably the most useful ones first — I imagine the ones relating to scripts, as we could use them for writing out scripts to a file for this. After that, I guess probably the starred ones as they're likely to be more used (:

Basically, whichever ones you like  smile

Last edited by blob8108 (2011-12-16 07:41:11)


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#28 2011-12-16 07:10:37

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: The .sprite File Format Specifications -- .Sprite Reverse Engineered

Alright.


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#29 2011-12-16 08:58:00

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: The .sprite File Format Specifications -- .Sprite Reverse Engineered

Actually, all scripts are converted to tuples before they are saved; each stack is converted to: (where () indicates an array)
(position (block1 block2 block3 ...))
each block is converted to:
(selector arg1 arg2 arg3 ...)
if the argument is a number, string, boolean, or color it is just included as the (n+1)th member of the array. If it is a block, the block is converted to a tuple and included in the correct place.

EDIT: )) trouble....

Last edited by nXIII (2011-12-16 08:58:28)


nXIII

Offline

 

#30 2011-12-16 15:07:25

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

Re: The .sprite File Format Specifications -- .Sprite Reverse Engineered

I joined the wiki.


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

Offline

 

#31 2011-12-16 16:01:39

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: The .sprite File Format Specifications -- .Sprite Reverse Engineered

MathWizz wrote:

I joined the wiki.

Cool! Duly accepted  smile


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#32 2011-12-16 16:28:08

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

Re: The .sprite File Format Specifications -- .Sprite Reverse Engineered

BTW, what text editor do you use?


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

Offline

 

#33 2011-12-16 16:59:33

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: The .sprite File Format Specifications -- .Sprite Reverse Engineered

MathWizz wrote:

BTW, what text editor do you use?

For what?  smile  For general text editing I use TextWrangler on a Mac. The wiki has its own web-based editor thingy.

Last edited by blob8108 (2011-12-16 17:00:48)


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#34 2011-12-16 17:01:29

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

Re: The .sprite File Format Specifications -- .Sprite Reverse Engineered

Whoops, I ment HEX editor.  tongue


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

Offline

 

#35 2011-12-16 17:03:33

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: The .sprite File Format Specifications -- .Sprite Reverse Engineered

MathWizz wrote:

Whoops, I ment HEX editor.  tongue

That makes more sense!  big_smile  I'm using Hex Fiend. It seems rather nice.  smile


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#36 2011-12-16 17:11:30

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

Re: The .sprite File Format Specifications -- .Sprite Reverse Engineered

blob8108 wrote:

MathWizz wrote:

Whoops, I ment HEX editor.  tongue

That makes more sense!  big_smile  I'm using Hex Fiend. It seems rather nice.  smile

Why are the shiny programs for Macs?  sad

Last edited by MathWizz (2011-12-16 17:17:12)


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

Offline

 

#37 2011-12-16 17:12:38

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: The .sprite File Format Specifications -- .Sprite Reverse Engineered

MathWizz wrote:

blob8108 wrote:

MathWizz wrote:

Whoops, I ment HEX editor.  tongue

That makes more sense!  big_smile  I'm using Hex Fiend. It seems rather nice.  smile

Why are the shinny programs for Macs?  sad

I know, it's sad, isn't it? Maybe it's because Macs are shiny.  tongue


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#38 2011-12-16 17:16:49

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

Re: The .sprite File Format Specifications -- .Sprite Reverse Engineered

blob8108 wrote:

MathWizz wrote:

Stuff.

I know, it's sad, isn't it? Maybe it's because Macs are shiny.  tongue

Not as shiny as as grdients:
http://www.online-photoshoptutorials.com/wp-content/uploads/2008/09/gradient-bg.png
Grrrraaaaaadddddiiiieeeennnnnttttttt. Yes, I am obsessed with them.  tongue

Last edited by MathWizz (2011-12-16 17:17:34)


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

Offline

 

#39 2011-12-16 17:18:09

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: The .sprite File Format Specifications -- .Sprite Reverse Engineered

MathWizz wrote:

blob8108 wrote:

MathWizz wrote:

Stuff.

I know, it's sad, isn't it? Maybe it's because Macs are shiny.  tongue

Not as shiny as as grdients:
http://www.online-photoshoptutorials.co … ent-bg.png
Grrrraaaaaadddddiiiieeeennnnnttttttt. Yes, I am obsessed with them.  tongue

Oh, dear.  tongue


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#40 2011-12-16 17:21:46

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

Re: The .sprite File Format Specifications -- .Sprite Reverse Engineered

You may want to look at my current project, a Scratch player in JavaScript that can read Scratch files: http://jsscratch.co.cc/player/


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

Offline

 

#41 2011-12-16 17:47:10

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: The .sprite File Format Specifications -- .Sprite Reverse Engineered

It looks really interesting MathWizz. Was that where Go Everywhere got it's code from?


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#42 2011-12-16 17:48:15

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

Re: The .sprite File Format Specifications -- .Sprite Reverse Engineered

bobbybee wrote:

It looks really interesting MathWizz. Was that where Go Everywhere got it's code from?

No. I think that they found a Squeak VM port to other platforms.


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

Offline

 

#43 2011-12-16 17:49:29

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: The .sprite File Format Specifications -- .Sprite Reverse Engineered

MathWizz wrote:

You may want to look at my current project, a Scratch player in JavaScript that can read Scratch files: http://jsscratch.co.cc/player/

I have been following that thread, in fact, after nXIII linked it. Some of the stuff there was quite useful.  smile


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#44 2011-12-16 17:51:31

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: The .sprite File Format Specifications -- .Sprite Reverse Engineered

Alright, I'll take a much closer look at it if necessary.


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#45 2011-12-16 22:35:59

meowmeow55
Scratcher
Registered: 2008-12-24
Posts: 1000+

Re: The .sprite File Format Specifications -- .Sprite Reverse Engineered

MathWizz wrote:

blob8108 wrote:

MathWizz wrote:

Whoops, I ment HEX editor.  tongue

That makes more sense!  big_smile  I'm using Hex Fiend. It seems rather nice.  smile

Why are the shiny programs for Macs?  sad

XVI32 is a quality hex editor that I use whenever the need arises.


Yawn.

Offline

 

#46 2011-12-16 23:03:04

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

Re: The .sprite File Format Specifications -- .Sprite Reverse Engineered

meowmeow55 wrote:

MathWizz wrote:

blob8108 wrote:


That makes more sense!  big_smile  I'm using Hex Fiend. It seems rather nice.  smile

Why are the shiny programs for Macs?  sad

XVI32 is a quality hex editor that I use whenever the need arises.

Oooo. Shiny.  big_smile


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

Offline

 

#47 2011-12-17 08:42:29

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

Re: The .sprite File Format Specifications -- .Sprite Reverse Engineered

what is a byte? I don't get it


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

Offline

 

#48 2011-12-17 08:54:35

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: The .sprite File Format Specifications -- .Sprite Reverse Engineered

midnightleopard, a byte is a 8 bits. For instance, "Bytes" is 5 bytes long.


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#49 2011-12-29 03:33:17

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: The .sprite File Format Specifications -- .Sprite Reverse Engineered

nXIII wrote:

Actually, all scripts are converted to tuples before they are saved; each stack is converted to: (where () indicates an array)
(position (block1 block2 block3 ...))
each block is converted to:
(selector arg1 arg2 arg3 ...)
if the argument is a number, string, boolean, or color it is just included as the (n+1)th member of the array. If it is a block, the block is converted to a tuple and included in the correct place.

Having parsed a few scripts, I understand this now!  big_smile

The Python library is going pretty well — I can now parse whole sprite files into Python, make some changes, and write them back again.  smile


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#50 2011-12-29 07:00:39

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: The .sprite File Format Specifications -- .Sprite Reverse Engineered

I'll try it out, then.


I support the Free Software Foundation. Protect our digital rights!

Offline

 
  • Index
  •  » Advanced Topics
  •  » The .sprite File Format Specifications -- .Sprite Reverse Engineered

Board footer