Discord
Login
Community
DARK THEME

Can you add pallettes

I want to make it so the character changes color with their clothing, but there are about 50 frames of animation.

To create and add a palette in microStudio, first navigate to the sprite editor and select a color swatch. Then, to fine-tune your color, hold down the Ctrl key and click on the color to bring up a color selector. Once you have your desired color, it will be added to the selection of available colors for your project. I think try it

no like be able to edit it in the code

I don't believe that's a built in feature and you could technically implement it yourself by scanning each individual pixel of the sprites and if its a certain color just change it to something else

Yeah like that

I don't think there is any reasonable way to do this. I messed around and used whatever I could find in the doc but the closest I came was with image.getRGB() but in order to change a whole sprite, you'd have to check over thousand pixels for just a 32x32 sprite, which would make it unreasonable to do several at a time and still run well. unless someone knows a way to add modify sprites and save it for later with just code then it would be too resource expensive.

I wanted to try the same with maps, but a 32x32 map takes ~2.3 kb

To save you can use image and save the image as a variable and just draw the image to the screen

I'm confused, how would you save it as a variable? If you just put "varName = image" then it just turns the variable into an image object that has the same properties as the base image, still needing to be redone every frame

seperate question, is it possible to change a map tile to a solid color and not a sprite with just code?

it doesn't need to be redone every frame you just need to initialize it once so you put it in init

i messed up when testing, i kept drawing the image again without the change, and kept using "image.drawSprite" in the draw function and it messed it up, mb

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community