Tile engine
Encyclopedia
A tile engine is a computer graphics
Computer graphics
Computer graphics are graphics created using computers and, more generally, the representation and manipulation of image data by a computer with help from specialized software and hardware....

 technique which generates a larger graphic from re-using a number of smaller graphics to save RAM
Ram
-Animals:*Ram, an uncastrated male sheep*Ram cichlid, a species of freshwater fish endemic to Colombia and Venezuela-Military:*Battering ram*Ramming, a military tactic in which one vehicle runs into another...

 and increase real-time rendering
Rendering (computer graphics)
Rendering is the process of generating an image from a model , by means of computer programs. A scene file contains objects in a strictly defined language or data structure; it would contain geometry, viewpoint, texture, lighting, and shading information as a description of the virtual scene...

 performance.

Basic tile map history

In the early days of computer game development, proper RAM economy was a must for a successful game engine
Game engine
A game engine is a system designed for the creation and development of video games. There are many game engines that are designed to work on video game consoles and personal computers...

, much more so than it is today. One of the largest problems, graphics rendering performance, came down to the amount of RAM dedicated to storing graphics for the game worlds and characters, and fetching these graphics and displaying them on screen in as rapid and smooth a way as possible. An early hack which not only stored larger game worlds in less RAM, but also made use of fewer, smaller sized pieces of graphics rather than the full scale overall image was the tile map, a technique taking the stance that if you are rendering a grassy field, chances are most of that field is going to look the same anyway, hence the smart approach would be to re-use one small graphic over and over to shape the grassy field. This approach became widely used in specific game genres such as platformers and RPGs, and reached its peak during the 8-bit and 16-bit eras of consoles, with games such as Mega Man
Mega Man (video game)
Mega Man, known as in Japan, is a video game developed and published by Capcom for the Nintendo Entertainment System . It is the first game in the original Mega Man series and the entire Mega Man franchise...

 (NES
Nintendo Entertainment System
The Nintendo Entertainment System is an 8-bit video game console that was released by Nintendo in North America during 1985, in Europe during 1986 and Australia in 1987...

), The Legend of Zelda: A Link to the Past
The Legend of Zelda: A Link to the Past
The Legend of Zelda: A Link to the Past, known as in Japan, is an action-adventure video game developed and published by Nintendo for the Super Nintendo Entertainment System video game console, and the third installment in The Legend of Zelda series. It was first released in Japan in 1991, and was...

 (SNES
Super Nintendo Entertainment System
The Super Nintendo Entertainment System is a 16-bit video game console that was released by Nintendo in North America, Europe, Australasia , and South America between 1990 and 1993. In Japan and Southeast Asia, the system is called the , or SFC for short...

) and Shining Force
Shining Force
Shining Force, known as in Japan, and otherwise known as Shining Force: The Legacy of Great Intention, is a 1992 turn-based strategy role-playing video game for the Mega Drive/Genesis console...

 (Mega Drive) being prime examples of tile-based games, producing a highly recognizable look and feel.

Simple theory

The typical tile map consists of a 2-dimensional array/matrix
Matrix (mathematics)
In mathematics, a matrix is a rectangular array of numbers, symbols, or expressions. The individual items in a matrix are called its elements or entries. An example of a matrix with six elements isMatrices of the same size can be added or subtracted element by element...

 containing references to a tile object. This tile object holds information such as the type of terrain, if it is possible to walk on it, if it causes damage to the computer game character etc, as well as the identity of the graphic to be rendered whenever that tile is to be drawn. This approach allows for simple, visual map data, letting level designers create entire worlds with a simple text editor
Text editor
A text editor is a type of program used for editing plain text files.Text editors are often provided with operating systems or software development packages, and can be used to change configuration files and programming language source code....

 and a tile reference sheet, though most if not all accomplished tile-based games utilize dedicated world editor software and highly optimized map formats.

The tiles themselves are usually simple geometric shapes, ranging from the simple square to more complicated shapes such as hexagons or even circles in some cases. These tiles are drawn at intervals dictated by a uniform height/width, though in many cases the interval is decided by the size of the tile to be drawn.

Variations on the tile model include: separate layers to describe graphics vs. gameplay data(collision, damage, entities, etc.), level data using "material tiles" that are procedurally transformed into the final tile graphics, and groupings of tiles as larger-scale "supertiles" or "chunks," allowing large tiled worlds to be constructed under heavy memory constraints. Ultima 7 uses a "tile," "chunk" and "superchunk" three-layer system to construct an enormous, detailed world within the PCs of the early 1990s.

Examples of three most popular shapes:
  • square tile enginesquare
    Square (geometry)
    In geometry, a square is a regular quadrilateral. This means that it has four equal sides and four equal angles...

    s
    example
  • isometric (or paralax) tile enginerhombus
    Rhombus
    In Euclidean geometry, a rhombus or rhomb is a convex quadrilateral whose four sides all have the same length. The rhombus is often called a diamond, after the diamonds suit in playing cards, or a lozenge, though the latter sometimes refers specifically to a rhombus with a 45° angle.Every...

    es
    example 1, example 2, example 3
  • hexagonal tile enginehexagons
    example
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK