The Riven Diffs

Seeing Riven (1997) Differently

Part 2 of 2 in Riven (1997)

This article, by Guillaume Lethuillier and Twitch, is also published on Twitch’s website (which contains additional images by combining animated diffs, highlighted diffs, and pairs of original images).

Disclaimer: This article contains spoilers applicable to both versions of Riven.

Just how stable is Riven? It is well known that Gehn’s unorthodox writing methods invariably produced Ages that eventually fell apart, and Riven in particular is demonstrably close to its inevitable collapse. But do we see any symptoms of this in-game? Besides the endings, Riven appears perfectly normal to an untrained eye. But what if we look closer? What if there are anomalies in plain sight that we simply never noticed before?

Animation: card J127, a walkway curving around the spinning dome of Jungle Island, alternating between the open golden dome and its closed dark shell; the foliage of the trees changes too.

While Myst relied on the interpreted HyperCard engine, Riven uses the Mohawk engine instead. Conceptually, Myst operates on a simple one-view-per-card model where each image represents fixed render states (see the Myst Graph articles). In contrast, Riven’s Mohawk engine allows for dynamic changes within cards by enabling multiple rendered views to coexist on the same card, with the engine displaying the appropriate render based on the current state of the game world. In short, where Myst’s cards represent static views, Riven’s cards can represent multiple different versions of the same viewpoint. This discovery led us to develop an exploration tool, the “Riven Navigator”, that allows for side-by-side comparison of these renders. Where the Myst Graph revealed development insights through card relationships, the Riven Navigator uncovers them through visual differences.

Since renders took significant amounts of time in the 90s, and different worldstates were often rendered at different stages in development, many renders have subtle differences beyond the changes caused directly by the player. Most of these are virtually impossible to notice due to the worldstate changes being triggered in separate locations from where the actual differences are visible. But when you compare card differences in-place, changing the worldstate without moving the camera, they can become much more obvious. Such tools reveal many places where tweaks to the 3D scene were made between renders, resulting in changes to the world far beyond the changes being made by the player.

The tool, introduced in this article and now open source, provides a methodical way to analyze the unique differences between images composing a given card. For instance, when a card contains three images (A, B, and C), the Navigator generates three unique comparative analyses: A versus B, A versus C, and B versus C. These differential comparisons, which we call “diffs”, are visualized through two complementary modes:

  • Pixel differential rendering: By default, the tool combines both images into a black-and-white composite, with red pixels highlighting mismatches between the two views. In many cases, the differences visible here will be caused by changes to the dithering or the color table, resulting in false positives, but quite often it can highlight small but very real changes that would otherwise be hard to spot.

  • Animated comparison: Reviewers can toggle a rapid succession mode that alternates between the two images (similar to an animated GIF), making differences easily visible as points of motion in an image that is otherwise mostly unchanged.

Typically, a card will have multiple diffs. The number of differences follows the triangular number sequence: 1 render produces 0 diffs; 2 renders produce 1 diff; 3 renders, 3 diffs; 4 renders, 6; 5 renders, 10; and so on (sequence A000217 on OEIS).

Example of the tool in action

Black-and-white composite of the chamber with the spider chair at its centre; red pixels trace the curved ribs that close around the chair, lines on the floor and scattered dithering noise.

Example of pixel highlighting: the spider chair activated/deactivated, from Temple Island, card T11.

Animation: the spider chair on its pedestal under a violet light, alternating between deactivated, with the ribs folded up at the ceiling, and activated, with the ribs closed around it like a cage.

The same diff, as an animation.

We then began systematically examining these differences, expecting to find rendering glitches tied to game logic. This was a fun and almost philosophical experience: we could call up different moments in time from the same place, without having to move around to change the worldstate. It is like wearing magic glasses that represent the same location from different points in time. This article, and the follow-up articles, explore these findings in depth.

We use the following terminology throughout these articles:

  • ANOMALY: An “anomaly” is a visible rendering quirk. These can be caused by many things, including changes to the underlying world geometry that occurred between renders, mismatched splices, or other errors. Many anomalies are visible from multiple cards. Many anomalies require specific worldstates in order to be visible.

  • CARD: Anywhere the player can stand is a “card”. A card can have many renders assigned to it depending on how many different worldstates are visible from any given spot. Walking or turning moves between cards, but different versions of one spot will share the same card.

    We label cards with a letter and a number. The number corresponds to the number of the card. However, different islands can share numbers, so we prefix each card label with a letter corresponding to the island’s label within the datafiles: B for Boiler, G for Survey (“garden”), J for Jungle, O for 233rd (“office”), P for Prison, R for Tay (“rebel”), and T for Temple. For example, card J127 (pictured at the top of this article) refers to card 127 within Jungle Island. These card numbers also correspond to the beginning of the filenames produced by the asset extraction tool Riveal by Ron Hayter, which was used heavily in the research and preparation of these articles.

    Note: some card numbers change between versions and languages. The numbers in this article are based on the 1.2 version from the English 10th Anniversary DVD. If you’re using a CD release or searching for assets dubbed into a different language, the cards may be numbered differently, but we haven’t found any differences in the actual content of the renders yet.

  • WORLDSTATE: The “worldstate” refers to the state of all the player-actionable things, such as the position of a lever or an elevator. Whenever the player performs an action or the story progresses, the worldstate changes.

  • PATCH: A “patch” refers to a smaller picture or video that is placed on top of the background image in real-time by the engine. Patches are often used in places where many different worldstates are visible, to prevent the need for a huge number of renders covering every possible configuration. Patches are also used for the large number of very small videos that don’t cover the entire screen, such as when a spinning dome is visible in the distance. Patches are always rectangular, and are stored as separate images/videos within the datafiles, to be overlaid in real-time within the game.

  • SPLICE: A “splice” refers to when the image data of a render has been copied from another image or another render. These are sometimes used when only part of an image needs to be re-rendered, but a patch would not be appropriate or desirable for whatever reason. Splices are edits which exist within the finished render itself, and are not separate files like patches are.

  • FMV: An acronym for “full motion video”, referring to the many videos used throughout the game. Almost any time you see motion, it’s an FMV. (Rare exceptions include the water rippling effects all over the game, and the various minuscule flying bugs that appear in places like Jungle Island.)

  • OCCLUSION: In computer graphics, “occlusion” refers to when one object blocks the view of another object. When one object is in the foreground and blocking another object in the background, the background object is “occluded” by the foreground object. Several anomalies involve objects blocking one another in ways that are incorrect based on where they actually exist in 3D space; these are problems with occlusion.

Greyscale view of a cave interior in which the red mismatched areas end in straight edges: a tall rectangle on the right and a large straight-sided block on the left.

An example of a “Splice”: the rectangular edges are easily visible in the differential comparison of J191.

Part 1: Jungle Island

Jungle Island is a location very familiar to many of us, but it has a large variety of anomalies, making it suitable as our first point of examination.

Several anomalies are associated with the state of the spinning dome (this is a recurring theme—every single spinning dome in the game has anomalies). In cards J121, J124, J133, J154, and J421, the two semicircular “hinges” that sit at the base of the dome are occluded incorrectly, making them fully or partially obstructed by other geometry depending on whether or not the dome is flipped. In J124, you can also see the hinge switch from high to low polygon count.

Animation: a grated walkway leading to the spinning dome, open and golden, then closed and dark; the semicircular piece at the right of its base is drawn differently in each.

J121: the semicircular hinge at the right of the dome’s base.

Animation: close view of the spinning dome, open then closed; the riveted semicircular hinge at the lower left of its base overlaps the dome in one render and is cut off by it in the other.

J124: the hinge at the lower left of the dome’s base.

Animation: the spinning dome at the left of the frame, beside a spherical lamp of the walkway, open then closed; the hinge at its base, near the lamp, is occluded differently in the two renders.

J133: the hinge at the dome’s base, near the lamp.

Animation: the spinning dome on its red cylindrical base, seen from above beside a grated stairway, alternating between open and closed; the base of the dome, behind a leafy branch, differs between the two renders.

J154: the base of the dome, behind the leafy branch.

In card J130, the base of the dome visibly moves when the dome is flipped.

Animation: card J130, front view of the spinning dome, alternating between its two golden halves standing open and the closed shell with a row of symbols; the base of the dome shifts between the two renders.

J130: the base of the dome.

Card J154 is also the location of one of the Spyder easter egg renders. A direct comparison with a normal J154 card reveals that the camera is in a different spot. Also, the furthest of the spherical lamps in the easter egg has been raised/lit like many of the others along this walkway.

Animation: card J154, the normal view down a grated stairway beside the dome, then the Spyder easter egg render, where the same stairway floats in a blue sky with clouds, seen from a different camera position.

J154, the normal render and the easter egg render: the stairway is seen from a different camera position.

In cards J110, J119, and J127, the foliage changes (quite drastically in J127) when the dome is flipped. J119 also has some leaves incorrectly occluded by parts of the dome when closed.

Animation: a walkway with two lamps between tree trunks above the ocean; a few leaves at the top left change when the dome, barely visible at the far right edge, is flipped.

J110: a few leaves at the top left.

Animation: a walkway curving past large tree trunks toward the dome in the distance; the dome alternates between open and closed, and the leaves in front of it change.

J119: the leaves in front of the dome.

Animation: card J127 again, the walkway curving around the dome; when the dome flips from golden to dark, the foliage of the trees on the right and at the upper left changes markedly.

J127: the foliage of the trees on the right and at the upper left.

At the top of the wahrk gallows, in cards J178 and J264, the doorjamb to the prison changes depending on whether the door is open or closed. In card J264 the entire jamb changes, and in J178 the differential comparison makes it obvious where the images were spliced around the jamb.

Differential comparison of the round prison door seen up close: the spoked door is highlighted in red, and the red area forms a disc that stops in a ring at the doorjamb.

J178, differential comparison: the red area stops in a ring at the doorjamb.

Animation: the round prison door seen up close, alternating between the closed spoked door and the open doorway showing the stone cell behind it.

J178: the doorjamb.

Animation: the same round door set in the rock face, seen from the metal walkway with its railing, alternating between closed and open.

J264: the whole doorjamb.

There are two patches applied when you’re standing in card J181, one for the submarine and one for submarine dock 5 (the schoolhouse).

When the submarine is raised out of the water, the submarine overlaps the railing in the foreground of J181.

Furthermore, there is a patch that shows dock 5 extended, which is correctly used to show an extended dock 5 in J181 when the prison door is open. However, the render of the closed prison door already has an extended dock 5, and there is no patch to show it retracted. As a result, if you retract dock 5 before opening the prison door, you can see the schoolhouse dock retract the moment the prison door finishes its opening FMV.

Animation: card J181, the walkway beside the closed prison door, looking toward the village; when the submarine appears in the distance, its dark shape overlaps the handrail in the foreground.

J181: the submarine, in the distance, overlaps the handrail in the foreground.

Animation: card J181 with the prison door closed, then open; far below in the lagoon, at the lower left, the small pale shape of dock 5 vanishes once the door is open.

J181: dock 5, the small pale shape in the lagoon at the lower left, vanishes once the door is open.

Inside the tunnels, differential comparison revealed a render that seems out of place. If you turn on exactly 3 of the lights in the tunnel, when you’re walking back towards the ocean, there is one render assigned to card J194 that’s actually a render from the perspective of J196. In the differentials, this looks like the tunnel changing shape between worldstates. In-game, this makes it seem like one of the steps towards the ocean darkens the lighting without moving forward at all. The incorrect render may be from earlier in development, as it has noticeably egregious banding on the dim/gray parts of the image, which isn’t a problem on the correct version visible from J196, or anywhere else in the tunnel. It’s likely card J194 should be completely black when 3 lights are on, as it’s barely lit (with a correct render) with 4 lights on.

Animation: two nearly black views of the tunnel alternating: the misplaced render, where faint banded outlines surround a small lit opening, and a render with a lit patch of rock in a different place.

J194: the misplaced render, with three lights on, then the correct render with four lights on.

Animation: the same misplaced render alternating with another dim view of the tunnel, whose walls and lit opening sit in a different place, as if the tunnel changed shape.

The misplaced render of J194, then the render of J196, both with three lights on.

Animation in nine frames: the walk through the tunnel toward the ocean, from lit rock walls through nearly black views with a distant lit opening, past wall lamps, to the cave mouth opening onto the sea.

Walking down the tunnel toward the ocean, with three lights on.

Each of the 25 totems in the Tay book room can be raised or lowered individually. When you’re standing in the center of the room, individual image patches are used to allow arbitrary totems to be shown in the downwards state, and renders with Tay unlocked are made with the correct totems already lowered. However, the zoomed-in views on almost all of the 25 totems have all of the totems in the same state as the totem you’re currently zoomed in on. (Exceptions: J217 and J225)

Two anomalies are visible as a result: Firstly, and more obviously, when zoomed in on a totem, the visible edges of the 2 adjacent totems will be raised or lowered based on the state of the totem you’re currently zoomed in on. Secondly, in many of the totem views, a reflection of the room is visible on the water, which shows every other totem in the room raised or lowered in the reflection.

Differential comparison of a zoomed-in totem view: the raised totem is entirely red, as are the slivers of the adjacent totems in the bottom corners and the row of totems reflected on the water at the right.

J221, differential comparison: the adjacent totems in the bottom corners, and the totems reflected on the water at the right.

Animation: zoomed-in view of a totem carved with a long-snouted animal, lowered then raised; the row of totems reflected on the water behind it, at the right, changes too.

J221: the totems reflected on the water, at the right.

Animation: zoomed-in view of a totem carved with a fish, between two lamps, lowered then raised; the slivers of the adjacent totems in the bottom corners change with it.

J220: the slivers of the adjacent totems in the bottom corners.

Animation: zoomed-in view of a totem carved with a winged animal symbol, lowered then raised; the edges of the adjacent totems in the bottom corners and the reflection at the right change too.

J222: the adjacent totems in the bottom corners, and the reflection at the right.

Animation: zoomed-in view of a totem carved with a bird-like symbol, lowered then raised, with the edges of the adjacent totems changing in the bottom corners.

J223: the edges of the adjacent totems in the bottom corners.

Animation: zoomed-in view of a totem carved with a long-beaked bird, lowered then raised; the adjacent totems in the bottom corners follow its state.

J224: the adjacent totems in the bottom corners.

Also, for some reason, a few of the totem renders have bright blue pixels on the extreme right or left side:

Animation: zoomed-in view of a totem carved with a stout four-legged animal, lowered then raised; two bright blue pixels sit on the right edge of the frame in both renders.

J225: two bright blue pixels on the right edge, in both renders.

Animation: zoomed-in view of a totem carved with a frog-like symbol, lowered then raised; a single bright blue pixel sits on the right edge of the lowered render.

J231: one bright blue pixel on the right edge of the lowered render.

Animation: zoomed-in view of a totem carved with a round-headed animal symbol, lowered then raised; a single bright blue pixel sits on the right edge of the lowered render.

J233: one bright blue pixel on the right edge of the lowered render.

Animation: zoomed-in view of a totem carved with an arched animal symbol, lowered then raised; bright blue pixels sit on the right edge of the frame in both renders.

J239: bright blue pixels on the right edge, in both renders.

Furthermore, some changes to the lighting occur. A shadow changes visibly in card J241 based on the totem state. In cards J211 and J213, all of the shadows cast by the totems disappear when the Tay book is unlocked.

Animation: zoomed-in view of the totem carved with a beetle, in the dark book room, alternating between lowered and raised.

J241: a shadow changes with the state of the totem.

Animation: the Tay book room seen from its narrow stone entrance passage; the panel in the far wall is open, then closed, and the floor at the foot of the totems changes.

J211: the floor at the foot of the totems.

Animation: closer view of the ring of totems in the Tay book room; the panel in the far wall is closed, then open, and the lighting of the floor around the totems changes.

J213: the floor around the totems.

At the big wahrk head staircase, at card J375, some bright white bits in the jungle disappear when the wahrk is open.

Animation: card J375, the jungle path leading to the big wahrk head, closed then open with its staircase; a bright white spot among the trees at the far left disappears when it is open.

J375: a bright white spot among the trees at the far left.

Also, the angle of the camera in card J381 changes when the wahrk is open. Some foliage also changes, and the lighting overall becomes slightly brighter.

Animation: card J381, the wahrk head seen up close, closed then open with the staircase rising into its mouth; the framing of the head and the foliage around it differ between the two renders.

J381: the framing of the wahrk head, and the foliage around it.

At the maglev leading to Temple Island, at card J806, the rocks on the far left are different based on whether the maglev is present or missing. Also, some of the details on the concrete are slightly moved.

Animation: card J806, the maglev platform in front of a cliff, empty then with the maglev car and its steps; the rocks at the far left differ between the two renders.

J806: the rocks at the far left.

A few anomalies depend on whether the sunners are present. In card J620, the rocks on the right change when the sunners are absent. Furthermore, in cards J620, J626, and J628, the horizon changes visibly based on the presence of the sunners. (In card J628, the mismatched horizon is only present if you enter the card while the sunners are awake/startled, probably to match the FMV.)

Animation: looking down a rock staircase between two cliffs toward the sea, without and then with the sunners on their rock; the horizon line shifts and spots of the cliff on the right change.

J620: the horizon line, and spots of the cliff on the right.

Animation: the staircase descending to the lagoon, without and then with the sunners on the central rock; the horizon line shifts between the two renders.

J626: the horizon line.

Animation: the lagoon and its beach seen from the bottom of the stairs, without and then with the sunners on the rock; the horizon at the very top of the frame shifts.

J628: the horizon, at the very top of the frame.

In card J526, the shape of the background mountains changes to match the FMV when you open the submarine hatch.

Animation: card J526, the top of the submarine with its hatch closed, then swung open; the outline of the mountains in the background changes between the two renders.

J526: the outline of the mountains in the background.

In card J296, if dock 4 is retracted, a red spot appears on the rocks when the submarine is turned around. It also appears some of the rocks change, but it’s unclear which of these changes are just reflections of the submarine.

Animation: card J296, looking straight down at the submarine, facing one way and then the other; a small red spot appears on the pale rock to its right when it is turned around.

J296: a small red spot on the pale rock, to the right of the submarine.

In card J449, when the gallows shortcut ladder is still raised, submarine dock 2 will be completely missing when retracted. (The extended dock is shown using a patch.) Furthermore, when dock 2 is visible in any worldstate, it becomes apparent that the submarine dock is on the wrong side of the walkway, a quirk also visible in J447.

Animation: card J449, a rope-and-plank walkway over the lagoon, with the shortcut ladder raised, then lowered at the upper right; on the distant platform, a small dark structure is missing while the ladder is raised.

J449: on the distant platform, a small dark structure is missing while the ladder is raised.

Render of the plank walkway curving under a rock overhang above the lagoon, with a railed platform, the submarine dock, standing in the distance beyond it.

J447: the submarine dock, the railed platform in the distance beyond the walkway.

In cards J468, J470, J476, and J581, the diffs reveal that the shortcut ladder isn’t actually raised; the bottom half has merely been erased. Card J334 clearly shows that the ladder should be visible when raised.

Differential comparison of the lagoon and its cliffs: the only red pixels form the lower half of the shortcut ladder, hanging under the walkway on the cliff at the upper left.

J468, differential comparison: the only red pixels form the lower half of the shortcut ladder, at the upper left.

Animation: the same view of the lagoon in colour; only the lower half of the shortcut ladder, under the cliff walkway at the upper left, appears and disappears.

J468: the lower half of the shortcut ladder, under the cliff walkway at the upper left.

Animation: the cliff walkway seen from the rope walkway, behind a spherical lamp on a post; the lower half of the shortcut ladder under it appears and disappears, and nothing else changes.

J470: the lower half of the shortcut ladder, under the cliff walkway.

Animation: the cliffs and the lagoon seen from a log dock; a short segment of the shortcut ladder under the cliff walkway, left of centre, appears and disappears.

J476: a short segment of the shortcut ladder, left of centre.

Animation: a wider view of the cliffs across the lagoon; the lower half of the shortcut ladder, at the left under the cliff walkway, appears and disappears.

J581: the lower half of the shortcut ladder, at the left.

Animation: looking straight down the shortcut ladder through its round metal frame, with the walkway and the water far below; the lower rungs are present in one render and absent in the other.

J334: the lower rungs of the ladder, seen from above.

Finally, in card J459, a detached shadow probably belonging to the shortcut ladder is visible on the leftmost cliffside at all times.

Animation: card J459, a rope walkway curving along the cliff, without and then with the shortcut ladder hanging from above; a thin dark line stays on the cliff at the far left in both renders.

J459: a thin dark line on the cliff at the far left, in both renders.

Additional articles authored by Twitch, covering the large number of anomalies we have discovered across the entire game, are published on Twitch’s website, starting with Part 2: Jungle Island’s Patches, Tay, Age 233, and Prison Island.