The kind of work we do can be very sporadic in that we wear many different hats as developers and without any strong deadlines we are free to experiment with things we may want to add further down the line. While being detrimental to progress (and, to be honest, maybe the biggest reason why we’ve spent so long on this), it does mean we are free to work on what we like. Enthusiasm is important too.
One of the things that we have been experimenting with is player customization – I personally have been torn on what to do with that, as we did not want to give the impression that your loadout somehow affected your ability to solve puzzles, and I did not want to make vanity items that could be confused with free-to-play moneysinks. In the end though, personal expression is meaningful and with the simplicity of our art customization is a pretty quick thing to do. One of the things we’ve created for customization is the ability for the player to change the avatar color with this hue wheel.
In technical terms, the wheel allows the player to change the hue to any value with floating-point precision, or basically fine-tune the color of the avatar. Since we already had hue manipulation as part of our HSVE graphics objects, this did not require a lot of new technology.
The character art in Backworlds is made up of these pieces – we animate these separately but all main character images fall into one of these groups. We are very concerned about keeping the shader count low and our pipeline does not support doing HSVE manipulation in arbitrary shaders, but since we’re not rendering more than one avatar object at a time we can simply store the hue offset value the player wants and use the original HSVE-shader with the individual textures. We then override the player textures in memory with the modified ones and can use the original rendering without modification.
Note that this only works since the Backworlds avatar only really uses a single color, and we are only changing the hue. If we changed the value (or, in fact, lightness) it would also affect the outline so this would require a more complex shader, we could theoretically change the saturation but this would essentially only allow the player to make the avatar gray so we have not bothered with it yet. Experiments aside, we try not to add every bell and whistle onto every new feature, but only develop things when we need them.
With all animation frames, there are a lot of avatar textures and it is not feasible to re-render them every frame when the player is in the process of using the hue wheel. Since we can’t change the avatar shaders, the simple thing to do would be to render it to a separate texture, use the HSVE shader to process this in real time and then render it back to screen – a slight performance sink compared to just rendering the player normally, but nothing too problematic since it’s only active while the player is on the hue wheel.
… Only, there is an even simpler way – since I am in full control of the art, I made the hue wheel complete desaturated in areas where the avatar could cover it. This removed the need for a custom path altogether and we can simply grab and modify a chunk of the main render target. Obviously this does not work if we ever decide to add value or saturation modifiers, but we can always change it later if we need it. Not only does this save us work now, but as a general rule removing complexity from code is a lot more difficult than adding it so I keep it simple when I can.