Game Development Reference
In-Depth Information
or they can be 0,0 . Passing 0,0 works fine, so you don't have to hard-code the size of the tile
sheet into your GameDemo.as class if you don't want to.
Tile sheet blitting and sprites
We are about to create the next reusable class for our framework, the TileSheet class. This class
can be used to describe all of the attributes needed to copy cells from a tile sheet to other display
objects. We will make heavy use of this class in this and some of the following chapters.
Before we venture into the code for the tile sheet class, let's define “tile sheet blitting” because
you are going to see those words, and “blit,” very often in the rest of this topic.
Defining “blitting”
Blitting refers to techniques used in the late 1970s and throughout the 1980s and early 1990s for
video and computer game development. Most arcade games, home systems, and computers
used some type of tiles, sprite sheet, or character sheet for many of their games. Some games,
such as early Atari games like Asteroids did not use a tile sheet. But, Atari home systems (Atari
2600, 5200, 7800, 800, etc.) used a form of blitting called Player Missile Graphics (PMGs). These
PMGs were used to separate the background of the game from a limited number of free moving
display objects in memory. Data to represent these objects was probably not held in any type of
tile sheet in the early systems, but rather a machine language representation of the map of
memory binary objects (on or off) was used to create single color display objects (Multicolor in
Atari 7800 and Lynx games).
Throughout the 1980s, system after system used these techniques and called them various
things: BOBs, sprites, blitter objects, OBJs, and so on. Some were derived from custom hardware
chips, and some were simply created in software. For example, the first Atari ST machines were
fast, but they had no hardware sprites. The games for the system were good but a little sluggish if
created by an inexperienced developer, because software techniques, rather than dedicated
hardware, were used to create game sprites. When the Commodore Amiga came along, it could
blast fast hardware sprites in the form of BOBs to the screen, and this made creating high-speed
arcade games for the machine relatively easy. The Nintendo Entertainment System (NES),
probably the most popular system in the 1980s, was very powerful because it made extensive
use of tiles, tile sheets, and blitting.
You probably won't find the word “blit” in any dictionary, but even if it means nothing to Webster's ,
it means a lot to game developers (and programmers alike). The verb blit means to take a map of
bits (usually a 1D or 2D array or a single linked list) and move them around in memory really fast.
The Amiga, Sega Genesis, and later Atari STE used this methodology in hardware to create
some stunning 16-bit games. Most early second-generation game systems used tile sheets and
blitting of some sort to create animated characters and backgrounds. The actual word “blit”
comes from the 1974 Xerox Alto computer's ability to do this kind of data movement. It was
termed as “bit block transfer,” or “bit blit” for short. It has been shortened even further to just “blit.”
It used to be that blitting and sprites were two different methods of accomplishing the same thing.
Sprites were actually hardware generated on top of the bitmapped display, while blits were written
right to the display buffer with a hardware or software rendering techniques.
Search WWH ::




Custom Search