unity
Almost 4 years ago now I blogged about my decision to use Unity for our new game development adventures, and in that time we’ve shipped one game (Washed Up!), stealth-shipped one polished prototype (only to our bestest fans 😏), participated in 4 game jams, and noodled with another 2 prototypes that never saw the light of day. All of those have used Unity, and generally speaking we’ve been quite happy with it.
Recently I needed to do something pretty common in many top-down games: render a whole bunch of health bars for enemies on the screen. Something like this: Obviously, I want to do this as efficiently as possible, preferably all in a single draw call. As I always do before I start something, I did a quick search online of what other people are doing, and the results were…mixed. I won’t code-shame anyone here, but suffice to say that some of the solutions were not great, including attaching a Canvas object to each enemy.
This week I wanted a toon-style non-photorealistic render, which is something I’ve done before but not for a while, and never in Unity. I’d been playing with the Standard Shader, the physically based pipeline which has support for quite a lot of good stuff like normal / specular / occlusion maps, and kinda just wanted that plus a toon ramp. I figured I’d check out what Unity already had first.
Recently I found myself wanting to expose a bunch of game parameters for our latest game project to my wife so she could easily edit them, to play with the difficulty and feel of it. I didn’t want her to have to use Unity, I just wanted her to be able to edit a simple file (while the game is running in this case). Bring on the text Although Unity’s own JsonUtility is a very useful tool for text exchange, JSON isn’t very approachable for a non-developer, given its very strict syntactic requirements.
TL;DR: SpriteRecolour project page Download binaries (Mac, Win x86/x64, Linux x86/x64) SpriteRecolour example project in Unity Background While doing 2D gamedev work this week, it came to the front of my mind how nice it would be able to easily have multiple colour variations of sprites, without having to have multiple copies of the sprites themselves. There are various ways to do this, but the one I wanted to explore was a classic palette swap technique; the sort of thing we would have used in the 16-bit days.