Skip to content
Techniques & Technology

Tile Maps

Building worlds from blocks

Tile maps constructed game worlds from small reusable graphic blocks, enabling large levels within tight memory constraints while simplifying collision detection and level design.

NESC64sega-mega-drivegame-boy graphicslevel-designtechnique 1980–present

Overview

Don’t draw a forest—draw one tree and repeat it. Tile maps built game worlds from small graphic blocks (typically 8×8 or 16×16 pixels) arranged in a grid. One set of tiles could create endless levels. Super Mario Bros. used only 256 unique tiles to build its entire Mushroom Kingdom. Memory efficient, collision-friendly, and enabling rapid level design.

Fast facts

  • Purpose: Construct levels from reusable blocks.
  • Tile size: Typically 8×8 or 16×16 pixels.
  • Memory saving: Huge compared to bitmap.
  • Usage: Nearly universal in 8/16-bit era.

Memory efficiency

MethodMemory for 256×240 screen
Bitmap61,440 bytes (at 1bpp)
Tile map (8×8)960 bytes + tile set
Saving~98% reduction

Tile map structure

ComponentPurpose
Tile setGraphics definitions
Map dataWhich tile where
AttributesColour, flip, palette
Collision flagsSolid, platform, hazard

NES implementation

ElementSpecification
Tile size8×8 pixels
Nametable32×30 tiles
Pattern tables256 tiles each
Attributes2×2 tile colour areas

Collision detection

AdvantageExplanation
Grid-basedSimple coordinate lookup
Tile propertiesEach tile has collision type
EfficientNo per-pixel checking
ConsistentPredictable behaviour

Level design workflow

StepProcess
1Create tile graphics
2Build tile set
3Design levels in editor
4Export map data
5Runtime: draw from map

Common tile types

TypeCollision
EmptyPass through
SolidBlock all
PlatformBlock from above only
HazardDamage on contact
CollectibleTrigger collection

Scrolling with tiles

ChallengeSolution
New tiles neededLoad as player moves
Seam hidingUpdate off-screen
Large levelsStream map data

See also