Unit 3 Lesson 7 Sprites

What level do the sprites students create get saved for them to use in future lessons?

As far as I know, if you create a sprite, you can only use it in a different project if you remix it and use the remix to build a new project.

Unfortunately, there isn’t an easy way to save a sprite itself for future use.

Mike

If I know what you’re talking about (because I was tired reading this) you can actually download sprites. Just follow my instructions.

Step I: Press the export button in the animation maker.
Screenshot 2022-12-02 9.17.02 AM
Step II: Press download
Screenshot 2022-12-02 9.17.16 AM
Step III: It is now downloaded, you can now use the sprite downloaded for any other project (if you import it).

Yes, but I’m not sure they can be re-uploaded if they are multiple frames. I haven’t tried that yet, but I guess it’s worth a shot.

Mike

It’s a gif file, so you can probably upload all the frames.

1 Like

Many of my students have tried this (downloading from one project and importing into another) but, alas, you can not upload a gif file (the downloaded file format) into the animation tab :disappointed:.

My students will typically either do as @mwood suggested and remix OR copy and paste actually works pretty well between projects. You use the rectangle select tool Screen Shot 2022-12-02 at 10.45.52 AM to highlight the pixels from one sprite and copy and then use the same tool (select the blank canvas in the new project) and then paste. It is a little work intensive if there are many frames but if they spent some time on the sprite - they’ll do the work:)

~Michelle

2 Likes

I am wrestling with these work arounds as well. It would be awesome of the students could access an individualized library of images that they could use on any level and from anywhere (app lab or game lab).

1 Like

Or you could just download the sprite sheet of it… it could be easier that way too… also you could just make an asset call to the project page using https://studio.code.org/v3/animations/(project_id)/(key), not only that you don’t even have to download it you could just load it in yourself… this does require text editor experience but I’m sharing this it wasn’t well documented

Main Pseudo Demo

function setup() {
var preanim = [].concat(World.pInst._predefinedAnimations); 
loadImage("https://ex", function(img) {
  preanim["demo"] = loadAnimation(loadSpriteSheet(img, width, height, frames));
  World.pInst._predefinedAnimations = Game.pInst._predefinedAnimations = preanim;
 })
}
var spr = createSprite(200, 200);
spr.setAnimation("demo");

in theory most of this should work i don’t know if i can explain it that well… but maybe i could just point you at a demo link because i think it’d be easier if it was a spritesheet https://studio.code.org/v3/animations/19_G_UoJqD-E1E1qMeOSpWCw9Jnj5M3gQWzQNTPJE30/8a4e99fd-9d9a-4f4e-86b1-47ea8089d1f3.png don’t know how much it will help