Ocarina of Time is an action-adventure game with role-playing and puzzle elements. The player controls Link from a third-person perspective, in a three-dimensional space. Link primarily fights with a sword and shield; he can also use projectile weapons, bombs, and magic spells. The control scheme introduced techniques such as context-sensitive actions and a targeting system called “Z-targeting”. In combat, Z-targeting allows the player to have Link focus and latch onto an enemy or other objects. (In the GameCube port of Ocarina of Time, targeting is done with the L-button instead of the Z-button, due to the position of the Z-button on the GameCube controller.) When using this technique, the camera follows the target and Link constantly faces it. Projectile attacks are automatically directed at the target and do not require manual aiming. Context-sensitive actions allow multiple tasks to be assigned to one button, simplifying the control scheme. The on-screen display shows what will happen when the button is pushed and changes depending on what the character is doing. For example, the same button that causes Link to push a box if he is standing next to it will have him climb on the box if the analog stick is pushed toward it. Much of the game is spent in battle, but some parts require the use of stealth. Exploration is another important aspect of gameplay; the player may notice inaccessible areas and return later to find them explorable after obtaining a new item. When the player uses Z-targeting, the view shifts to a letterbox format and arrows indicate the targeted enemy. The player can then circle strafe around the enemy to keep their sight on them.
Link gains new abilities by collecting items and weapons found in dungeons or in the overworld. Not all are required. Ocarina of Time has several optional side-quests, or minor objectives that the player can choose to complete or ignore. Completing the side-quests usually results in rewards, normally in the form of weapons or abilities. In one side-quest, Link trades items he cannot use himself among non-player characters. This trading sequence features ten items and ends with Link receiving an item he can use, the two-handed Biggoron Sword, the largest sword in the game. In another side-quest, Link can acquire a horse named Epona. This allows him to travel faster, but attacking while riding is restricted to arrows. In order to get Epona, Link must learn her song while he is a child. However, he is only able to ride her when he and Epona are both adults.
Link is given the Fairy Ocarina near the beginning of the game, which is later replaced by the Ocarina of Time. Throughout the game, Link learns thirteen melodies that allow him to solve various puzzles and teleport to previously visited locations in the game. The Ocarina of Time is also used to claim the Master Sword in the Temple of Time. When Link takes the sword, he is sealed for seven years, until he becomes an adult, and therefore strong enough to wield the Master Sword. Young Link and adult Link have different abilities. For example, only adult Link can use the Fairy Bow and only young Link can fit through certain small passages. After completing the Forest Temple, Link can travel freely between the two time periods by replacing or taking the sword. The melodies and notes are played with the “C” buttons on the Nintendo 64 controller or the C analogue stick on the Nintendo GameCube controller.