Programming animation
Besides some artistic advantages, the sprite animation is not ideal: it is hard to readjust or rearrange quickly, it can take some memory resource, and it is not flexible enough. Therefore, in some situations, it is much more efficient to program some animations by code. The most obvious example is the wheels of a vehicle used in a game: nobody uses special frame-by-frame animation to rotate them, a simple code is used instead. Even characters can be animated using such methods; of course it is pretty hard, but it is possible (recall the description of a Spine animation editor from Chapter 1, Starting the Game). By using code, you control the general properties of an image: coordinates, scale, rotation angle, opacity, and even hue. So many things can be created.
Usually, most of the special effects in games are programmed. The most visual example is, of course, the simulation of smoke. To develop good smoke, only one small sprite is needed, containing an image of one...