A developer has demonstrated an open-world engine in a Nintendo 64 game, which offers a “seamless, massive world with zero loading screens” on original hardware. In essence, James Lambert and a handful of other contributors behind Junkrunner 64 have coaxed the 30-year-old N64 into delivering draw distances matching the scale of Skyrim. The video below explains how this feat was achieved.
Anyone with experience owning or playing an N64 will have experienced the sharp end of the retro console’s draw distance problem. It is an old console, of its era, and system resources are meager compared to what developers in the first open-world gaming era and beyond would expect.
Article continues below
Typical visual issues in worlds that try to be too ambitious include pop-ups and clipping. In particular, at a distance, Lambert’s video highlights the phenomenon of Z-fighting, where some objects closer to the user might actually be obscured by farther-away objects.
The developer explains that the N64 features a 15-bit Z-buffer, which can hold ~32,000 unique values. But in his game development tests, about 90% of those values are used for things that are very close to the camera. Resources are slim for the oodles of distant objects in an open-world game, leading to Z-fighting.
What can be done to fix pop-ups and combat the occasions when closer objects are obscured behind more distant objects? “The solution is I just draw the world twice. First, I draw everything that’s far away scaled down by about 100, and then I do a separate pass where I draw everything that’s close,” explains Lambert. “So that gives me the best of both worlds. I can draw large objects at a small scale where details don’t matter. And then when I’m drawing things close, I’m able to retain that near clipping plane and render things more detailed.”
So, that’s one solution, but memory constraints and performance considerations remain. Another innovation that has been shoehorned into Junkrunner 64 to help mitigate the scarcity of processing power and memory is the engine’s implementation of world tiles of various detail levels, cleverly layered.
Texturing in the demo game was handled by contributions from fellow developer Pyroxene, using a technique called baking. This is implementing lighting and material details directly into the textures, particularly on low-detail models.
Additionally, Pyroxene worked on a new kind of N64 fog: implementing RGB color-mixed fog gradients in the distance, plus locally colored fog. This further enhances open-world visuals.
In Junkrunner 64, the map starts hidden, as in many modern open-world games, and exploring the environment reveals the map little by little. Thankfully, there’s a super-fast 180 mph hovercycle that can be acquired and upgraded to get you around. Towards the end of the video, we see a small segment of gameplay demonstrating map exploration on a hovercycle.
Lambert closes the video by teasing a new (unnamed) full game that will be coming to the N64, ModRetro, and the Analogue 3D. It will, of course, use the above-mentioned technologies.
You can grab the code for the Junkrunner 64 demo, which was the main topic of the video. Version 2.1 is now on GitHub as a 16.5MB z64 file for your emulators, flash carts, etc. The source code is there too.
Follow Tom’s Hardware on Google News, or add us as a preferred source, to get our latest news, analysis, & reviews in your feeds.
