Hello, quite new here, just made an account yesterday. I’ve been learning game development for a while and made a few games, but I’ve come to a problem. For this next game I want to make, it’s going to have a character creation menu in which you can adjust the colors of the character sprite, sort of like how Terraria allows you to change colors of the character. I’m puzzled by the best way to go about doing this. Each sprite is going to have six different shades of gray, and for each shade I want it to be replaced by a certain color chosen by the user in the character selection screen. How would I go about doing this?
I thought of getting the RGB array of the sprite and reading it in a for loop then depending on the shade of gray the color would be changed to what the user picked, but it seems there would be a faster way of doing that, especially since this would need to be done for each iteration of the game loop.
Any help would be great, thanks in advance!
- Screem