Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Can you have users edit sprites without manually going into the program?
- TopHatSans
-
Scratcher
63 posts
Can you have users edit sprites without manually going into the program?
I wanted to make a game where you can draw your character. Does anyone know how I can make it so that people can edit a certain sprite without actually going into the program, changing it, and the remixing it?
Is this even possible or not?
Is this even possible or not?
- D-ScratchNinja
-
Scratcher
1000+ posts
Can you have users edit sprites without manually going into the program?
There are paint programs on Scratch where you draw something and then save it as a code made up of text, then you can later paste the code in somewhere the project to show the same design. Is that kind of how you want your project to work?
- bluedragon8633
-
Scratcher
1000+ posts
Can you have users edit sprites without manually going into the program?
Here's a project where you can put down walls for a maze: https://scratch.mit.edu/projects/503294969/
You could probably customize the engine so that it's for drawing, rather than a game. And of course, there's the pen extension for drawing. But no, you can't edit the bitmap or vector costumes directly without remixing or seeing inside.
You could probably customize the engine so that it's for drawing, rather than a game. And of course, there's the pen extension for drawing. But no, you can't edit the bitmap or vector costumes directly without remixing or seeing inside.
- TopHatSans
-
Scratcher
63 posts
Can you have users edit sprites without manually going into the program?
There are paint programs on Scratch where you draw something and then save it as a code made up of text, then you can later paste the code in somewhere the project to show the same design. Is that kind of how you want your project to work?
Well, kind of. I wanted it so that you can draw your character and then you could move it. So like the character should act like a normal sprite with movement scripts attached to it.
Last edited by TopHatSans (March 28, 2021 01:31:08)
- -Mysticoder-
-
Scratcher
100+ posts
Can you have users edit sprites without manually going into the program?
Hi, the best way to do this is to store each sprite, instead of as a costume, as a set of HEX codes in a list. Then, when you want the player to edit the sprite, let them edit the HEX code, thus the sprite will come out looking different. As for the movement codes, just use variables to track the x and y of the sprite, then you can just use that to differ where the sprite is drawn with the pen, thus creating the illusion of movement.
- bluedragon8633
-
Scratcher
1000+ posts
Can you have users edit sprites without manually going into the program?
You could try this out: https://scratch.mit.edu/projects/498322973/
The colors are stored as hex values in the colors list. The individual tiles are composed of two-digit numbers that create 8x8 squares using the colors in the list. The bg_data list holds where each tile should be placed. I never finished making anything, but it works for the few tiles I bothered to encode.
The colors are stored as hex values in the colors list. The individual tiles are composed of two-digit numbers that create 8x8 squares using the colors in the list. The bg_data list holds where each tile should be placed. I never finished making anything, but it works for the few tiles I bothered to encode.
- TopHatSans
-
Scratcher
63 posts
Can you have users edit sprites without manually going into the program?
You could try this out: https://scratch.mit.edu/projects/498322973/
The colors are stored as hex values in the colors list. The individual tiles are composed of two-digit numbers that create 8x8 squares using the colors in the list. The bg_data list holds where each tile should be placed. I never finished making anything, but it works for the few tiles I bothered to encode.
Do you know how can you load the sprite without it having to be manually drawn for a seconds? I kinda don't want to have the sprite load every time it has to move left.
- bluedragon8633
-
Scratcher
1000+ posts
Can you have users edit sprites without manually going into the program?
Sorry, no. You need to redraw the sprite every frame for it to move if it's made using pen. Sure, you can try not using pen, but then a user can't edit the sprite freely without going inside and remixing. You can use the “run without screen refresh” block to speed things up, but you need to redraw every time you want the sprite to move.You could try this out: https://scratch.mit.edu/projects/498322973/
The colors are stored as hex values in the colors list. The individual tiles are composed of two-digit numbers that create 8x8 squares using the colors in the list. The bg_data list holds where each tile should be placed. I never finished making anything, but it works for the few tiles I bothered to encode.
Do you know how can you load the sprite without it having to be manually drawn for a seconds? I kinda don't want to have the sprite load every time it has to move left.
- bluedragon8633
-
Scratcher
1000+ posts
Can you have users edit sprites without manually going into the program?
Actually, there might be a way; if it's pixel art, you can create 1-pixel sized clones that move in unison to form a picture. But that is probably way harder than just redrawing.
- TopHatSans
-
Scratcher
63 posts
Can you have users edit sprites without manually going into the program?
Ok then, I will try pixel art. Thanks for the help!
- bluedragon8633
-
Scratcher
1000+ posts
Can you have users edit sprites without manually going into the program?
Ok then, I will try pixel art. Thanks for the help!No problem! Just be warned that an 8x8 pixel tile requires 64 clones, and 16x16 requires 256 (this is the normal size for a lot of sprites in Super Mario Bros., like small Mario, goombas, and koopas.
- Discussion Forums
- » Help with Scripts
-
» Can you have users edit sprites without manually going into the program?



