A major separator between a hobbyist and a real game developer is the amount of polish that goes into a game. A hobbyist can get away with cutting corners - leave out a menu screen, fudge an interface or two, make one of the game items a bit unclear, leave in a bug or two, and who’s going to notice? Animations might be a little jerky, and there’s a certain something missing. But that’s OK; the hobbyist is doing this for fun, not profit.
I’m not interested in talking about the major or obvious separators between a hobby project and something meant to be released to the masses. Leaving in bugs, leaving out title screens, these are obvious. I’m more interested in the smaller things - the subtle touches that are expected of real productions but go without saying. The certain somethings.
And I’m a programmer at heart, so I’m also interested in implementations.
Today I’m going to talk about “pulsating,” which is an effect my current game uses heavily. Basically, you’ve got some screen item - maybe an interface widget or game entity - that shifts back and forth between states. For instance, when a menu item is selected, its size grows and shrinks to indicate that it’s selected. Or when an enemy is dying his alpha shifts between transparent and opaque while the death animation plays.
Of course, this particular item is pretty cheap to produce. My own code base has a ‘BouncingValue’ template class that stores a minimum, maximum, velocity, and current value. During each Update, the velocity is added to the current value; if the value exceeds the min or max, the value is clamped and the velocity reverses. Since it’s a template it can be applied to anything that supports basic math operations - colors, vectors, sizes, or what-have-you.
Like I said, this is a subtle impact, but it adds oomph. A bit of animation to keep screens from being stale. Like any effect, it requires thoughtful placement and becomes cheesy if overused.
As I continue with my personal games, I’m hoping to make a series out of this, writing about useful techniques to add polish - it’s not an area that gets talked about much, but it’s certainly an important consideration in any game production.