This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.
  • Index
  •  » Advanced Topics
  •  » Working with sprite sheets - What's the best way to import to scratch?

#1 2008-04-19 15:47:41

ChibiChocobo
Scratcher
Registered: 2008-04-17
Posts: 9

Working with sprite sheets - What's the best way to import to scratch?

Here's what I've learned in my limited attempts to use sprite sheets. You can't open the whole sprite sheet in scratch and then cut out the individual frames, cause they're usually way too big and you end up with compressed (and * looking) sprites, so how do you get the individual frames into scratch?
   
    So far what I've done is this: You open up the sprite sheet into paint(or photoshop, gimp, etc),  drag the selection tool around the particular animation you want to grab (running, swinging sword, jumping, whatever) and copy about four or five frames from it. Then I usually have another copy of paint open and paste the frames into that. Then I save the small group as a png to avoid fuzzy pixels, and upload each group into scratch this way. After I've got all the frames from the one animation I want to work with into scratch, I go into the scratch image editor and use the fill tool to make the background of the frames transparent (Use the white and gray checkered color from the bottom right of the color palette.) If the background color of your sprite sheet is obvious (i.e. a blue background under a red character) then make sure and use the fill tool on the little spots that were left inside the bondaries of the frames.
   
    Sometimes sprite sheet creators are lame and choose a color that's not easily picked out from the rest of the sprite, so then all you can do is use your best judgement. If your sprite sheet is a gif, and the creator saved it with a transparent background, opening it in paint will give it a gray background, and if you save it from photoshop, you have to know how to save it with transparency.  Anyways. . .
I digress.

    Once you have your animation frames uploaded into scratch in sets of four or five, and situated on a transparent background, then use the right click and "save screen region for new sprite" option to make new sprites out of all the frames. (They appear in the center of the screen and tend to get in the way, so just drag them off to the side for the time being.) After you've got all your frames separated into sprites, go to each you just created sprite under the costume tab, and drag the costume to the thumbnail of the base sprite, the sprite you actually want to animate.

    Now you should have one sprite with all the other sprites as costumes, and you can animate it however you want!

Offline

 

#2 2008-04-19 15:49:02

ChibiChocobo
Scratcher
Registered: 2008-04-17
Posts: 9

Re: Working with sprite sheets - What's the best way to import to scratch?

My question is this: Is there a better way to use sprite sheets in scratch? I've looked at it from a couple different angles, and this is the best I can come up with. Am I missing something here?

Offline

 

#3 2008-04-19 17:24:27

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Working with sprite sheets - What's the best way to import to scratch?

No, what you said is the most efficient way to get sprites from spritesheets. All I can recommend is that when you split your large sprite sheets make them 480 by 360 because that is the biggest you can import images at without having them shrink.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#4 2008-04-19 23:04:55

ChibiChocobo
Scratcher
Registered: 2008-04-17
Posts: 9

Re: Working with sprite sheets - What's the best way to import to scratch?

Thanks for giving me those numbers. I wasn't exactly sure how big you were allowed to get, so I'd been keeping my files pretty small. Useful info!  big_smile

Offline

 

#5 2008-04-20 07:00:17

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: Working with sprite sheets - What's the best way to import to scratch?

Actually, there is a more effiient way.  On the Riener's sprites website there is a free-to-download application called "tilecutter".

It allows you to choose a cutter size and positionit it on your sprie-sheet.  The whenever you click "cut" it moves on cut-width to the right (or, if at the edge of the sheet, on row down, and back to the left edge).

This makes it very easy to turn a large sprite-sheet into a number of individial costumes.

There is also a batch colour-converter on the same site.  This lets you change the backround colour of multiple sprites simultaneously, so that when you import them they have a transparent background.

These 2 apps saved me hours of work on the wandering knight project.


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#6 2008-04-21 12:19:30

ChibiChocobo
Scratcher
Registered: 2008-04-17
Posts: 9

Re: Working with sprite sheets - What's the best way to import to scratch?

Question: How do you tell color converter to convert a color to transparent?

Offline

 

#7 2008-04-21 12:36:09

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: Working with sprite sheets - What's the best way to import to scratch?

When .gifs are dragged into scratch, black (usually) becomes transparent. 

So:

Step 1:  batch colour-convert existing black to very dark grey.

Step 2:  batch colour convert current background colour to black.

Step 3: import .gifs to costumes by dragging them en-masse.


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#8 2008-05-24 21:44:59

oliver255
Scratcher
Registered: 2008-05-13
Posts: 5

Re: Working with sprite sheets - What's the best way to import to scratch?

So i like your idea, ChibiChocobo, but i don't know how to copy one pic from one paint to the other. How do you do it


"I sometimes feel like my life has just flipped"                                                               -oliver255      552ɹǝʌılo-                                                              "pǝddılɟ ʇsnɾ sɐɥ ǝɟıl ʎɯ ǝʞıl lǝǝɟ sǝɯıʇǝɯos ı"

Offline

 

#9 2008-05-24 21:51:29

CFCRubiks
Scratcher
Registered: 2008-05-11
Posts: 100+

Re: Working with sprite sheets - What's the best way to import to scratch?

On macs, import them directly to Scratch, and edit them there

Offline

 

#10 2008-05-30 20:38:41

oliver255
Scratcher
Registered: 2008-05-13
Posts: 5

Re: Working with sprite sheets - What's the best way to import to scratch?

Acually, there is a better way to do it,(seperate a sprite sheet) There is a program that you can use that is called TileCutter. It is amazing, i can import a picture and choose a area i want to seperate, and press, Save as .bmp and the original picture is not even modified. i woild recomend this for you ChibiChocobo, and all the other scratchers out there.


"I sometimes feel like my life has just flipped"                                                               -oliver255      552ɹǝʌılo-                                                              "pǝddılɟ ʇsnɾ sɐɥ ǝɟıl ʎɯ ǝʞıl lǝǝɟ sǝɯıʇǝɯos ı"

Offline

 

#11 2008-06-05 14:41:41

N-Wear
Scratcher
Registered: 2007-08-13
Posts: 100+

Re: Working with sprite sheets - What's the best way to import to scratch?

I open it in an editor that can do big pictures without shrinking it, then cut the piece you need, save it, and inport to Scratch and clean it up.


If bread crumbs are better than nothing. And nothing is better than cheese cake. Then, bread crumbs are better than cheese cake!  smile
The following sentence is true. The previous sentence is false.  hmm                              Treat others the way you want to be treated!  big_smile

Offline

 

#12 2008-06-05 14:42:51

N-Wear
Scratcher
Registered: 2007-08-13
Posts: 100+

Re: Working with sprite sheets - What's the best way to import to scratch?

Oops!! Didn't read the first post first and said almost the same thing!!  smile


If bread crumbs are better than nothing. And nothing is better than cheese cake. Then, bread crumbs are better than cheese cake!  smile
The following sentence is true. The previous sentence is false.  hmm                              Treat others the way you want to be treated!  big_smile

Offline

 
  • Index
  •  » Advanced Topics
  •  » Working with sprite sheets - What's the best way to import to scratch?

Board footer