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
| Method | Memory for 256×240 screen |
|---|
| Bitmap | 61,440 bytes (at 1bpp) |
| Tile map (8×8) | 960 bytes + tile set |
| Saving | ~98% reduction |
Tile map structure
| Component | Purpose |
|---|
| Tile set | Graphics definitions |
| Map data | Which tile where |
| Attributes | Colour, flip, palette |
| Collision flags | Solid, platform, hazard |
NES implementation
| Element | Specification |
|---|
| Tile size | 8×8 pixels |
| Nametable | 32×30 tiles |
| Pattern tables | 256 tiles each |
| Attributes | 2×2 tile colour areas |
Collision detection
| Advantage | Explanation |
|---|
| Grid-based | Simple coordinate lookup |
| Tile properties | Each tile has collision type |
| Efficient | No per-pixel checking |
| Consistent | Predictable behaviour |
Level design workflow
| Step | Process |
|---|
| 1 | Create tile graphics |
| 2 | Build tile set |
| 3 | Design levels in editor |
| 4 | Export map data |
| 5 | Runtime: draw from map |
Common tile types
| Type | Collision |
|---|
| Empty | Pass through |
| Solid | Block all |
| Platform | Block from above only |
| Hazard | Damage on contact |
| Collectible | Trigger collection |
| Challenge | Solution |
|---|
| New tiles needed | Load as player moves |
| Seam hiding | Update off-screen |
| Large levels | Stream map data |
See also