Isometric graphics in video games and pixel art

From Wikipedia, the free encyclopedia
  (Redirected from Isometric graphics in video games)
Jump to: navigation, search
Vg graphics.svg
Part of a series on:
Video game graphics

In video games, "isometric" refers to some form of parallel projection (commonly, the form of dimetric projection mistakenly referred to as "isometric") where the viewpoint is rotated slightly to reveal other facets of the game environment than are visible from a top-down perspective or side view, thereby producing a three-dimensional effect. The terms "3/4 perspective", "2.5D" and "pseudo-3D" are also commonly used.

With the advent of more powerful graphics systems, "isometric" projection is becoming less common, instead being replaced by perspective projection.

Overview[edit]

A television set drawn in near-isometric 2:1 pixel art. (Enlarged to show the pixel structure.)[1]
Corresponding camera rotation angles for true isometric projection (at left) and the form of dimetric perspective commonly found in video games and pixel art (at right).[2]
2D (at left) and 3D (at right) coordinates of a typical dimetric video game sprite.

In the fields of computer and video games and pixel art, the technique has become popular because of the ease with which 2D sprite- and tile-based graphics can be made to represent a 3D gaming environment. Because parallelly projected objects do not change size as they move about the game field, there is no need for the computer to scale sprites or do the complex calculations necessary to simulate visual perspective. This allowed older 8-bit and 16-bit game systems (and, more recently, handheld systems) to portray large 3D areas easily. And, while the depth confusion problems of parallel projection can sometimes be a problem, good game design can alleviate this.

Differences with "true" isometric projection[edit]

The projection commonly used in videogames deviates slightly from "true" isometric due to the limitations of raster graphics. Lines in the x and y directions would not follow a neat pixel pattern if drawn in the required 30° to the horizontal. While modern computers can eliminate this problem using anti-aliasing, earlier computer graphics did not support enough colors or possess enough CPU power to accomplish this. So instead, a 2:1 pixel pattern ratio would be used to draw the x and y axis lines, resulting in these axes following a 26.565° (arctan 0.5) angle to the horizontal. (Game systems that do not use square pixels could, however, yield different angles, including true isometric.) Therefore, this form of projection is more accurately described as a variation of dimetric projection, since only two of the three angles between the axes are equal (116.565°, 116.565°, 126.87°).

Similar projections[edit]

The term is often applied to any game with an overhead – usually fixed – projection that appears at first to be "isometric", including games that utilize trimetric projection (Fallout,[3] SimCity 4[4]); games that utilize oblique projection (The Legend of Zelda: A Link to the Past,[5] Ultima Online[6]); and games that utilize a combination of perspective projection and a bird's eye view (Torchlight,[7] Silent Storm[8]). Other examples of games that utilize oblique projection include the original SimCity, EarthBound and Paperboy.

History of isometric video games[edit]

While the history of computer games saw some true 3D games as soon as the early 1970s, the first video games to use the distinct visual style of isometric projection in the meaning described above were arcade games in the early 1980s.

1980s[edit]

Q*bert from 1982 was one of the first games to use isometric graphics.

The use of isometric graphics in video games began with the appearance of Sega's Zaxxon,[9][10] released in January 1982.[11] It was an isometric shooter that employed scrolling isometric levels where the player controlled a plane to fly through the levels. It was also one of the first video games to display shadows.[9]

Another early isometric game was Q*bert,[12] which Warren Davis and Jeff Lee began programming in April 1982 and released in October/November 1982.[13] Q*bert showed a static pyramid drawn in an isometric perspective, with the player controlling a character which could jump around on the pyramid.[9]

The following year in 1983, the isometric platformer arcade game Congo Bongo was released, running on the same hardware as Zaxxon.[14] It allowed the player character to move around in bigger isometric levels, including true three-dimensional climbing and falling. The same was possible in the 1984 arcade title Marble Madness.

At this time, isometric games were no longer exclusive to the arcade market and also entered home computers with the release of Ant Attack for the ZX Spectrum in 1983. The player could now move forward in any direction of the scrolling game, offering complete free movement rather than fixed to one axis as with Zaxxon. The views could also be changed around a 90 degrees axis.[15] The ZX Crash magazine consequently awarded it 100% in the graphics category for this new technique, known as "Soft Solid 3-D".[16]

A year later the ZX Spectrum saw the release of Knight Lore, which is generally regarded as a revolutionary title[17] that defined the subsequent genre of isometric adventure games.[18] Following Knight Lore, many isometric titles were seen on home computers – to an extent that it once was regarded as being the second most cloned piece of software after WordStar.[19] Other examples out of those were Highway Encounter (1985), Batman (1986), Head Over Heels (1987)[20] and La Abadía del Crimen (1987). Isometric perspective was not limited to arcade/adventure games, though; for example, the 1989 strategy game Populous used isometric perspective.

1990s and beyond[edit]

Throughout the 1990s some very successful games like Civilization II, Diablo and Fallout used a fixed isometric perspective. But with the advent of 3D acceleration on personal computers and gaming consoles, games previously using a 2D perspective generally started turning to true 3D instead. This can be seen in the successors to the above games: For instance Civilization IV and Diablo III both use full 3D; and while Diablo II used a fixed perspective like its predecessor, it optionally allowed for perspective scaling of the sprites in the distance to lend it a "pseudo-3D" appearance.[21]

During the 1990s, isometric graphics began being used for role-playing video games on console systems, particularly tactical role-playing games, many of which still use isometric graphics today. The use of isometric grids in RPGs began in the early 1990s, with tactical RPGs such as the Ogre series. By the late 1990s, RPGs like Vandal Hearts (1996), Final Fantasy Tactics (1997) and Breath of Fire III (1997) were using 3D graphics to create rotatic isometric environments where the player could freely rotate the camera.

Comparison of several types of graphical projection. The presence of one or more 90° angles is usually a good clue that the perspective is oblique.

Mapping screen to world coordinates[edit]

Finding world coordinates

One of the most common problems with programming games that use isometric (or more likely dimetric) projections is the ability to map between events that happen on the 2d plane of the screen and the actual location in the isometric space, called world space. A common example is picking the tile that lies right under the cursor when a user clicks. One such method is using the same rotation matrices that originally produced our isometric view in reverse to turn a point in screen coordinates into a point that would lie on the game board surface before it was rotated. Then, by dividing the x and y values by the tile width and height and rounding down we can derive the world-x and y values. Another way that is less computationally intensive and can have good results if our method is called on every frame, rests on the assumption that we have a square board that was rotated by 45 degrees and then squashed by 0.5 vertically as explained above. We first find the tile clicked on the a virtual grid that is laid on top of our projection as shown on the diagram, we call it virtual-x and virtual-y. As we can observe, clicking any tile on the central axis of the board where (x, y) = (tileMapWidth / 2, y), will produce the same tile value for both world-x and world-y which in our example is 3 (0 indexed). By selecting the tile that lies one position on the right on our virtual grid, we actually move one tile less on the world-y and one tile more on the world-x. We can then derive a formula that calculates world-x by taking the virtual-y and adding the virtual-x from the center of the board. Like wise we can derive world-y by taking virtual-y and subtracting virtual-x. These calculations measure virtual-x from the central axis, as shown, so we must subtract half the board. An example code in C can look like this (provided the variables have the correct values):

float virtualTileX = screenx / virtualTileWidth;
float virtualTileY = screeny / virtualTileHeight;
 
// some display systems have their origin at the bottom left while the tile map at the top left, so we need to reverse y
float inverseTileY = numberOfTilesInY - virtualTileY;
 
float isoTileX = inverseTileY + (virtualTileX - numberOfTilesInX / 2);
float isoTileY = inverseTileY - (virtualTileX - numberOfTilesInX / 2);
Tile Details

This method might seem counter intuitive at first since we are taking the coordinates of a virtual grid rather than the original isometric world and there is no one-to-one correspondence between virtual tiles and isometric tiles. A tile on the grid will contain more than one isometric tiles and depending on where it is clicked it should map to different coordinates. The key in this method is that the virtual coordinates are taken as floating point numbers rather than integers. A virtual-x and y value can be (3.5, 3.5) which means the center of the third tile. In the diagram on the left, we see the 3rd tile on the y in detail. As we can see, when the virtual-x and y can add up to 4 in which case the world x will also be 4.

See also[edit]

References[edit]

  1. ^ Note: The 2:1 pixel pattern in the near-isometric image allows smoother lines than in the isometric one.
  2. ^ Note: the blue vectors point towards the camera positions. The red arcs represent the rotations around the horizontal and vertical axes. The white box matches the one shown in the image at the top of the article. Notice how in the left image the camera vector passes through the two opposing vertices of the cube.
  3. ^ Green, Jeff (2000-02-29). "GameSpot Preview: Arcanum". GameSpot. CNET Networks, Inc. Retrieved 2008-01-10. 
  4. ^ Butts, Steve (2003-09-09). "SimCity 4: Rush Hour Preview". IGN PC. IGN Entertainment, Inc. Retrieved 2008-01-10. 
  5. ^ "GDC 2004: The History of Zelda". IGN GameCube. IGN Entertainment, Inc. 2004-03-25. Retrieved 2007-12-17. 
  6. ^ Greely, Dave; Ben Sawyer (1997-08-19A). "Has Origin Created the First True Online Game World?". Gamasutra. CMP Media LLC. Retrieved 2007-12-17. 
  7. ^ McDougall, Jaz (November 4, 2009). "Torchlight Review". Games Radar. Retrieved 2009-11-06. 
  8. ^ O'Hagan, Steve (2008-08-07). "PC Previews: Silent Storm". ComputerAndVideoGames.com. Future Publishing Limited. Retrieved 2007-12-13. 
  9. ^ a b c Bernard Perron & Mark J. P. Wolf (2008), Video game theory reader two, p. 158, Taylor & Francis, ISBN 0-415-96282-X
  10. ^ Zaxxon at the Killer List of Videogames
  11. ^ "Zaxxon". Arcade History. October 17, 2010. Retrieved 26 September 2011. 
  12. ^ Q*bert at the Killer List of Videogames
  13. ^ Davis, Warren. "The Creation of Q*Bert". Coinop.org. Retrieved 26 September 2011. 
  14. ^ Congo Bongo at the Killer List of Videogames
  15. ^ "Sculptin the new shape of Spectrum games". Sinclair User (21). December 1983. Retrieved 2009-03-02. 
  16. ^ "Soft Solid 3D Ant Attack". CRASH (1). February 1984. Retrieved 2008-09-29. 
  17. ^ "Ultimate Play the Game – Company Lookback". Retro Micro Games Action – The Best of gamesTM Retro Volume 1. Highbury Entertainment. 2006. p. 25. 
  18. ^ Steven Collins. "Game Graphics During the 8-bit Computer Era". Computer Graphics Newsletters. SIGGRAPH. Retrieved 2007-08-16. 
  19. ^ Krikke, J. (Jul–August 2000). "Axonometry: a matter of perspective". Computer Graphics and Applications (IEEE) 20 (4): 7–11. doi:10.1109/38.851742. 
  20. ^ "Looking for an old angle". CRASH (51). April 1988. Retrieved 2008-09-29. 
  21. ^ "Diablo II Nears Completion As Blizzard Prepares For Final Phase Of Beta Testing". FindArticles (BNET Business Network). Marketwire. May 2000. Retrieved 2008-09-29. [dead link]