Most games with health bars have a visual effect when you take damage, where the lost section of the bar is painted in a different color for a brief moment, before smoothly merging back with the main bar. This is how I programmed that. My simple method keeps the rhythm of the damage taken, and…
Welcome to the first episode of How I Programmed That, a blog and video series where I’ll teach how to program by example, sharing real programming problems I encounter and how I solved them. I’ll be using C/C++ syntax, and in this instance you’ll only need basic programming knowledge to follow along. Today we start…