I wrote a fan game a few years ago.
Link is a knight in training at Hyrule Castle, and is good friends with Princess Zelda. One day, Zelda shows Link a hidden room in the castle where the Master Sword is hidden. At that moment, Ganondorf invades Hyrule, and in one fell sweep, the hope of the kingdom vanishes. Ganondorf corners Link and Zelda in the Master Swors chamber and begins to demand the Triforce. Link rushes and try's to draw the Master Sword from its pedestal, but is unable since he hasn't proven himself a hero. As he attempts to draw the sword, a gateway to the sacred realm opens and pulls him in. Link is met with the Triforce, high tells him that if he wants to wield the legendary blade, he must first overcome three trials. He is then warped to a pseudo Hyrule within the sacred realm to test his worth. After completing the trials of the goddesses, Link is given the ability to go home and claim the Master Sword. However, Ganon enters the reopened portal and steals a piece of the Triforce. Link then searches both Hyrule and the pseudo Hyrule for a way to defeat the dark king, Ganon.