Closed ConstantineRetroGamer closed 2 years ago
No plans to add this very specific feature, but I am closing this, considering that you can now achieve all this from your code. You have now access to your sprites and sprite frames and their pixel data. You can create a new Sprite, add multiple Image frames to it and set the pixel data of all of these image frames. See the API cheatsheet for more details about classes Sprite and Image.
https://github.com/pmgl/microstudio/wiki/en-API-cheatsheet#images
I've been thinking about this thing for a very long time: accessing the sprite palette from code. This technology was used on the NES console. Of course, then it was used to circumvent the memory limit. This is my version of how it might look in microScript:
"sprites.cube.colors" is a list of all colors for a "cub" sprite. Thus, you can use different coloring options of the same tile in different levels of the game. This opens up some interesting possibilities:
You can create a flickering effect. I ran into such a problem when I wanted to make the boss in the game flicker. Or when I wanted to make a character in the game flicker when he raises a powerup (as in Super Mario Bros). Currently I am implementing flicker only like this:
It is difficult to achieve flickering of the character (changing the color alternately) using animation. Let's say we have a character with a bunch of animations for each action. Then for such a flicker, we will need to make separate animations, with the addition of frames with a different palette, through one. So it is very labor-intensive.
Perhaps this will open up some other opportunities that I do not know about. But I think it's worth paying attention. In addition to this, I would like to have a tool "replace a certain palette color with another" (in the sprite editor). When the image is large and has a complex pattern, the fill tool does not help (too difficult). In my opinion, this is the only reason why I might need to use a different editor. You can even reflect this with a code, but not change the color. In my opinion, implementing a list containing a palette of sprites will also solve this problem (although I technically don't know how it can be implemented). I think the palette is stored for the sprite anyway, but how do I get access through the code? :-)