Drawing 2D sprites
2D games are based on sprites, which are pieces of images composited onscreen. They can represent an object, a character, a static, or an animated element. Sprites can be displayed with a transparency effect using the alpha channel of an image. Typically, an image will contain several frames for a sprite, each frame representing a different animation step or different objects.
Tip
If you need a powerful multiplatform image editor, consider using GNU Image Manipulation Program (GIMP). This program is available on Windows, Linux, and Mac OS X, and is a powerful and open source. You can download it from http://www.gimp.org/.
Several techniques exist to draw sprites using OpenGL. One of these is called Sprite Batch. This is one of ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access