Lore
Nintendo 64 Portal Tech Demo
The "Portal Tech Demo" was a 3D demo created by programmer Giles Goddard on the…
The "Portal Tech Demo" was a 3D demo created by programmer Giles Goddard on the Nintendo 64 hardware. The tech demo was created as part of the R&D process for The Legend of Zelda: Ocarina of Time, and is a follow-up of the Zelda 64 Spaceworld 1995 Tech Demo.
In describing the tech demo, Goddard stated: "Recently, I found an old directory of source code that I sort of backed up and it was [...] Hyrule Castle. I was doing all these experiments, like you could have a portal where you look through, go in, and then you get teleported to a different part of the map. You know, you could see through a door to a different part of the map, and walk through it, and then walk back through it. It was R&D for the game, basically. It was, 'what could we do with the hardware on the N64,' and this was basically a demo of actual portals you could see through to other parts of the map."
In describing how the tech demo was created, Goddard stated:
"The N64 only had [4KB] of texture memory and the portals could be anything from a few pixels in size to full screen, so drawing into textures was out of the question. So after the entire scene was drawn I created a viewport around each portal polygon, cleared the Z-Buffer inside the viewport then drew the polygon with the max Z-Buffer value. Essentially creating a mask exactly where the portal polygon was. Then I’d move the camera based on the angle of the current camera vs poly etc and draw the scene again from there. The viewport did most of the heavy lifting culling the new scene but it would get slower the closer you got, basically because you’re drawing 2 full scenes. Once that new scene was drawn I’d then go through all the portals in that scene and do it all again recursively, of course ignoring any portals that fell outside of the viewport. One cool thing was that to make a mirror you’d just reflect the camera position + rotation and to make glass/crystal etc you’d just move the camera slightly and change the angle depending on the refractive index. Lastly, you know the cool tunnel effect you get when you put 2 mirrors facing each other? The same thing happens if the portal on the other side can see it’s 'parent'. So I had to limit the number recursions, that would also decide how far along the corridor you could see."
The tech demo was developed prior to the release of Ocarina of Time at an unknown date (likely 1996 or 1997). It is unknown whether the code written by Goddard was ever utilized in a commercial Nintendo game.
Goddard, who was the programmer that designed the interactive Mario face in Super Mario 64, was also responsible for the programming of the Zelda tech demo shown off at the 1995 Space World event, which he created prior to the Portal tech demo. After his work on the two prototype Zelda tech demos, Goddard went on to serve as the main programmer on 1080° Snowboarding.
As Ocarina of Time was originally planned to have Ganon's Castle as the only setting, it is likely the demo is showing an early build of the location or at least the Forest Temple.
Sources
Adapted from the original article, under GFDL 1.3.





