Home

What's in a Frame? 4

The Legend of Zelda: Link's Awakening (GB, 1993)

Link's Awakening doesn't do anything particularly unexpected, but it's a game that makes good use of all three of the Game Boy's layers.

The game world is drawn on the background layer, and the tile map is updated as the player cuts bushes, lifts rocks, digs holes, or blows holes in cave walls. Although Link can move in one-pixel increments, the world is divided into screen-sized chunks. The camera therefore remains aligned to the eight by eight pixel grid of the background, except during the transition from one screen to the next. Among other benefits, this allows for dialogue boxes to be drawn on the background, yet always appear centred horizontally on the screen.

Objects are used to draw the player, enemies, NPCs, and for minor effects. When Link appears to walk through long grass, he doesn't actually appear behind the grass on the background. Instead, extra grass is drawn on top of Link's legs using objects.

The window is mostly used as a status bar at the bottom of the screen, as seen in Kirby's Dream Land, but also expands to show a full-screen equipment menu.

The world of Link's Awakening is divided into different environments (e.g. forest, village, beach). Each environment has a set of unique background tiles (0x00–0x1F), while also sharing a core set of tiles that are used in all areas. As Link moves from one environment to the next, the unique tiles from the old environment are replaced in Video RAM with those from the new environment.

Similarly, object tiles for monsters or characters that appear in the old environment are replaced with ones from the new environment. This places a small constraint on world design: different environments must be separated by relatively plain-looking intermediate rooms that contain only the shared set of tiles, and few or no enemies or NPCs.

In contrast to the Game Boy Color, monochrome Game Boys have one background palette (BGP) and two object palettes (OBP0 and OBP1). They can't make the screen a different colour, but they allow the programmer to change the mapping between the colour levels in the tile data and the colour levels show on screen. So a "00" pixel value doesn't have to mean "lightest green"; we can choose to display it with any of the four shades.

Link's Awakening defines one object palette with a "normal" colour mapping, and another with an inverted mapping. Both Link and monsters flash when damaged, and this is achieved by switching between the two palettes (frames 1296–1297). Some object tiles (0x00–0x7F) look strange when viewed in isolation because they're drawn to use to inverted object palette (OBP0) by default.

The game reserves just two tiles in the object tile set for Link (0x00 and 0x02). These two tiles are always used to draw Link, and when he switches to a different frame of animation, the graphics for the new frame are copied into this location in Video RAM.

Keeping just one animation frame in Video RAM at a time is quite common, although it's not the only way of handling player animations. It allows games to include a lot of frames of character animation without using a lot of space in Video RAM, at the cost of a little extra CPU time. Other games using the same technique include Prince of Persia (GB, 1992), WWF Raw (GB, 1994), Donkey Kong Land (GB, 1995), Prehistorik Man (GB, 1995), and Toy Story 2 (GBC, 1999).

Another notable technique seen in Link's Awakening is the flickering of objects to create translucency. An object is displayed and hidden on alternate frames, creating a blended image on screen, where the background appears to show through the object. It's seen here in the shadows underneath the ball (frames 758–790), and in the shadow underneath Link whenever he jumps (frames 964–986). Most games that draw shadows don't use flickering objects like this, but those that do include Track and Field (GB, 1992), Millenium Winter Sports (GBC, 2000), and Tony Hawk's Pro Skater 2 (GBC, 2000).

Further information