Breath of the Wild Cel Shading Break Glitch

The Legend of Zelda: Breath of the Wild is a gigantic game, and where content proliferates, so too do bugs. Many of these bugs are highly entertaining (my favorite is the bullet time bounce), but there are some that are just head-scratching, leaving one to wonder why does this happen? That the occur pulls back the curtain on the many technically complex things a big game like BotW does behind the scenes to realize its world, for, every step of a process that a system must go through is one more opportunity for something to go wrong.

Image from Nintendo Everything

Youtuber Jasper has made a 35 minute video about why, if Link stands in a specific spot in BotW, inside the broken corner of a stone wall, the cel shading usually applied to his model goes away, and he appears with normal light shading. In the way of Youtubers, the explanation is contained within a 35-minute discursive video that goes into the history of game lighting, why some older 3D games have graphics that have aged well while others don’t, the basics of cel shading, and still other topics. Here is that video, embedded:

The whole video is pretty interesting, and if you have the time and interest you should watch the whole thing. However, in the event that this is all tl;dw, allow me to summarize.

  1. Because Breath of the Wild is both a huge game and has a dynamic world, baking lighting in into textures would consume way too much storage and memory, so lighting has to be done dynamically.
  2. As an optimization measure, the more complex steps of cel shading are deferred to later in each frame’s rendering. The main rendering is done, then the cel shading is applied afterward, when the visibility of the area has been determined, so this effort-expensive process is only done for visible pixels.
  3. One of the deferred steps of rendering marks which of nine different kinds of material will be applied to each pixel. Terrain in BotW is not cel shaded, while characters link Link are, so they have different types of material that determine whether that shading is applied to them.
  4. In the location where Link’s cel shading disappears, there is a decal applied to the crumbling bridge that erroneously extends over the corner, and overwrites Link’s character material type with the terrain material, causing the cel shading not to be applied to him.

PC Gamer’s Article on a WoW Ultra Rare Mount

It’s December 31st and our offices are empty for the end of the year. We’re kind of slacking off, so let me link to something out intrepid and gelatinous news reporter linked before. It’s a really great longform article from PC Gamer and is worth a look if you didn’t see it then.

Someone’s looking grumpy!

In summary:

For a long long while, there have been ultrarare mounts in World of Warcraft. Most items, a 1% drop rate is as rare as they go, but a few mounts are generated much more rarely than that. People have spent years grinding for a specific mount and never gotten it. It was dropped by a world boss called “The Sha of Anger.” (Hey, I didn’t name it.)

One such ultrarare item is The Reins of the Heavenly Onyx Cloud Serpent, which allows the very lucky acquirer to summon a nifty glowing black-and-white flying dragon to ride. So popular, and rare, are these items that when they go up on auction they regularly go for the maximum supported price: 9,999,999 Gold.

Players had long rued the immensely high odds of acquiring this item, and others, but had put up with it because Blizzard was the kind of company to just rule things like that to happen, and what you gonna do? Go to City of Heroes?

Early in the item’s existence, however, players noticed that the item wasn’t just generating hardly ever, but in fact, entirely never. A bug in the game meant no one had gotten it. It was just so rare that everyone assumed they just hadn’t seen it yet. Oops!

Much more recently, however, due to another bug, the item became much more common to players of a certain race. The players who had discovered this faced conundrum: be responsible and report the bug to Blizzard, or hoard the knowledge to prevent Blizzard from knowing about it, keeping it off of forums as long as they could, which resulted in the greater player base not realizing it was possible, in order to allow the precious loophole to persist for as long as possible.

If this kind of thing is fascinating to you, and if it isn’t then I wonder why you’re reading this blog, it’s one of the best pieces of game reporting I’ve seen lately.

PC Gamer: How World of Warcraft’s new dragon race brought a 10-year-old loot system to its knees

The Final Fantasy IV Door Stack Glitch

The Final Fantasy series is loaded with bugs throughout. A full recounting would be much more than a longpost’s worth, but here is a quick description of one specific example, from Final Fantasy IV (originally II in the US, but most people now will probably think of it by the Japanese numbering anyway).

The door to the pub is push-type, potentially causing Problems.
Image from mynockx’s guide on GameFAQs.

Some RPGs, instead of coding area transitions all as a sequence of doors and destinations, instead use a form of stack to record where the player was when they entered the door. “Stack” here is a term from computer science, a data structure consisting of a region of memory and a pointed within it. Data can be “pushed” onto the stack, which means putting some number of bytes onto it and advancing the stack pointed by that number. Stacks can “grow” either up or down, meaning when the pointer advances, it’ll go in that direction. When the data is needed again, it’s read off the top of the stack, then the pointer is pulled back to its original position.

So how the door stack works is, when a player enters a location, say enters a town from the overworld, their location before entering is “pushed” onto the stack and they are then moved into the town’s entrance. When they exit the town, their old location is “pulled” from the stack, leaving it empty. (Actually, the data is still there, but because the stack pointer has been decremented, it’ll be overwritten the next time the player enters an area.)

Why use a stack? Well mostly it’s a convenience thing for the programmers. A door’s location can either be “into” an area, or “out of” it. “In” doors have to know where they’re going, but “out” doors just have to know they’re going outside. But it helps in one particular instance; if a game has a spell or item like “Exit,” “Outside,” or “Warp,” it can work simply by pulling every location off the stack until it gets to the last one. This means the programmers don’t have to have every location “know” where a given area is on the World Map. Just rewind the door stack until you get to the last location on it, that must be it.

Well there’s a subtle bug in some locations in Final Fantasy IV where some transitions that push when they should pull. One such transition is the one to the pub in the Dwarven Castle. When you enter the pub, the way in is pushed onto the stack; when you exit, instead of pulling that location off, the way out is pushed onto the stack.

There’s only so much memory reserved in a stack, which for old games is usually implemented as a single page (256 bytes) of memory. The pointer into it is thus one byte long, and so if the stack fills up, it wraps around. If you find such a door, and go through it enough times, you can cause it to overflow on purpose, with unexpected results.

This can be taken advantage of in Final Fantasy IV by overflowing the stack, then going through a pull-door, which causes the game state to be read from unexpected memory. Speedrunners (you just knew they’d be involved) use this to flip rapidly to the end of the game. Most players will never notice this very subtle bug, since when you return to the world map the game knows enough to completely clear the stack.

Something I’ve noticed about the 8- and 16-bit Final Fantasy games is, if there is a potential for an obscure bug somewhere, there is almost certainly going to be an example of that bug somewhere in that code. A lot of these bugs are only visible to a player with obsessive observation or repetition. This results in spells with unexpected effects, stats with no function, features that don’t operate, and item duplication bugs. Truly, it was an age before unit testing.

Final Fantasy Wiki: 64 Door Hierarchy Glitch

The NES Sample Encoding Error

There was an error in the data prep in many NES games that caused them to reverse the bit order of samples. Or more accurately, the games encoded the samples correctly, but the flaw is in the NES sound hardware.

The result is, many games with samples sound notably worse than they should. The most infamous example of this is the sound in Double Dribble, which sounds particularly bad on its title screen. The difference can be heard on the game’s page on The Cutting Room Floor. There’s a hack for Double Dribble on romhacking.net that corrects the samples in-game.

Another game this affects is the unlicensed Tengen NES game KLAX. In the arcade KLAX had very little music, but the NES version has excellent music that relies heavily on sampled instruments. There’s a fixed patch for that game on romhacking.net, too!

Keep Nintendo Weird: Space Station Silicon Valley

The wonderful podcast Keep Nintendo Weird (Podchaser – YouTube), which spotlights a lot of awesome and unusual games made for Nintendo systems, recently covered a doozy: Space Station Silicon Valley! One of a pair of games made for the Nintendo 64 by DMA Design before they became known as Rockstar North, SSSV is a clever and charming action puzzle game where you’re a microchip that can take control of robot animals in a rogue space station.

It’s notable for its trademark humor, its inventive gameplay, and a weird bug that, as I discovered personally soon after its release, actually makes it impossible to finish! While the main story can be completed, one of the optional trophies hidden in the levels won’t collect when you come into contact with it, and it was a couple of generations before software patches could be distributed after a game went live, so there is just no way to 100% the game without hacking either it or your save file somehow. Oops!