Special effects in Link's Awakening

This article is part of an ongoing “Disassembling Link’s Awakening” series, where I attempt to gain some understanding on how special effects where implemented in this game.

Zelda: Link’s Awakening (1993) is fondly remembered by many players. Whether you played the original black-and-white version or the color remake, you probably remember an oniric story, the whimsical characters, an immersive soundtrack… This is also the game where appeared many iconic elements of the Zelda series: playable tunes on music instruments, compass and boss keys in dungeons, and so on.

When I played this game again recently, I was surprised by the amount of custom gameplay behaviors, one-shot sequences, and graphical effects. The game engine is simple and robust – but on top of it there is a ton of custom coding.

For instance, Link can walk around the map with pixel-per-pixel moves (unlike Pokemon, which moves block-by-block).

Link's Awakening Sub-block physic engine

At some point, you get the Roc Feather, an item that opens a new mechanic: jumping over holes.

Link's Awakening Jumping with the Feather

Or catching items mid-air.

Link's Awakening Catching item mid-air

And also, when waking over a hole, it will attract you, but give you a chance to stand back over firm ground.

Link's Awakening Attracting hole

Later in the game, you can also fly over multiple holes. The physic engine also allows the player to swim, dive…

Link's Awakening Swim and dive

… or to switch from the standard top-down view to a sideway view — including during an epic boss-fight.

Link's Awakening side-scrolling

Some transitions attempt to simulate a 3D-effect (or at least some depth).

Link's Awakening Opening the Eagle Tower

Characters will sometimes follow you. For instance, a ghost.

Ghost following you

Or a dog, attached to you by a semi-translucent chain which moves realistically.

Link's Awakening Bow-wow with realistic chain

When powering-up the console, many Game Boy titles would jump you right to a title screen. Link’s Awakening does better, and open with a nice cinematic, packed with sprites and differential scrolling.

Link's Awakening Introduction Sequence

The game engine also has smooth screen transitions, like a fade-to-white between the interior or the exterior of a map…

Link's Awakening fade-to-white transition

… or even an eerie transition in the Dream House.

Link's Awakening Dream House transition

All these small touches to the physics engine and graphic visual effects seemed natural while playing the game – but it was actually quite amazing for a Game Boy game. Although not all of these effects present technical difficulties, the amount and the coordination of all this custom programming makes for a really immersive experience.

Disassembling Link’s Awakening

I was recently looking for a disassembly of Link’s Awakening source code, to see how some of the effects where implemented. And although Zelda: A Link to the Past on the Super NES has been mostly reverse-engineered, and Pokemon Red and Blue have been completely disassembled, there is no extensive disassembly of Link’s Awakening source code.

However an open-source project started poking into the game’s disassembly – and although it is still in early stage, it was a really good start.

So I started to look more into the source code, connecting a debugger to the game, setting breakpoints, and try to see how these things worked. Reverse-engineering assembly code is quite slow, but I’ll try to post some findings on this blog.