ABSTRACT

Magician street performers don’t require a big stage, scantily clothed assistants, or saw boxes to amaze an audience. They are extraordinary in their ability to entertain with a coin or a deck of cards. Many modern-day game developers are like street performers and do amazing things on a smaller stage. They often work on mobile platforms and in small groups instead of giant teams. Small budgets and limited time are no excuses for developers producing subpar products, however. Limited resources means that these teams must stretch what little they have in order to produce magic on screen. The magic described in this chapter is simple, powerful, and requires only a small amount of graphics knowledge, such as how to construct and render a quad [Porter and Duff 1984]. This isn’t an introduction to graphics programming, and it isn’t about using shaders or the latest API from DirectX or OpenGL. Instead, it’s a collection of easy-to-implement graphical tricks for skilled (non-graphics specialist) programmers. In this article, we first explore very basic concepts that are central to graphics programming, such as vertices, colors, opacity, and texture coordinates, as well as creative ways to use them in two dimensions. Next, we examine how to combine these building blocks into a powerful and complex structure that allows for incredible 2D effects (with source code included on the website). Finally, we conclude by conjuring our own magic and demonstrating some simple examples of this structure in action.