Table of ContentsChapter 20.            Isometric GamesThe Graphics

What Is Isometric Projection?

The term isometric projection technically refers to viewing something with equal perspective on all angles. In Figure 20.1, you can see a block viewed isometrically. Notice how the box is tilted both vertically (forward) and horizontally (turned) to give it a 3D look. The box is isometrically projected.

Figure 20.1. A cube projected isometrically has an equal tilt vertically and horizontally.

graphic/20fig01.gif


An isometric game uses graphics that are drawn with this type of viewing perspective; however, they are still 2D graphics so the perspective angles are fixed and cannot be changed during the game (unlike 3D engines, in which the viewing perspective can change in real time).

The term isometric has been a little overused, though. Games such as Diablo use a higher degree of vertical tilt to give a more side-on look. Age of Empires uses only a slight vertical tilt to give you a good birds-eye view of the field. Although not technically accurate, all of these games are still collectively referred to as isometric (or just "iso") games.

In an isometric game you can still use tiles like you did in Star Assault, except the graphics all have to be rendered at the correct perspective. You will, however, need to do quite a bit of work to figure out all those angles and drawing orders.

Vertical-Only Perspective

Another common style of iso game simplifies things by having a vertical tilt but no horizontal tilt. You can see what this looks like in the incredibly exciting Figure 20.2.

Figure 20.2. A cube projected with only a vertical tilt

graphic/20fig02.gif


This type of projection provides a similar effect, but at the same time dramatically simplifies the rendering, math, and object management because you only need to deal with the single extra dimension.

NOTE

Tip

Any projected perspective game that tilts horizontally always requires PNG transparency support to draw the overlapping tiles (since tiles must be the shape of a diamond, you'll always have to use transparency on the corners of the image). If you choose to make this type of game, keep in mind you're excluding most low-end MIDs (except Nokia).A vertical-only tilt perspective is possible without transparency; however, you'll be severely limited in your graphical optionsthe tree shown in Figure 20.3, for example, is not possible without transparent PNGs.

An iso-perspective demo with a tank driving around a forest

graphic/20fig03.gif


To demonstrate how all this works, you'll make a little demo with a tank driving around a forest. The cool thing is the tank will appear to drive behind the trees (and over the ground). You can see the final result in Figure 20.3.

To develop this demo you'll take the tile engine you developed for Star Assault and modify it to add perspective. The good news is, it's easier to do than you think.

    Table of ContentsChapter 20.            Isometric GamesThe Graphics