Saturday, January 29, 2011

Riven iOS

My father wanted to buy Riven iOS for his iPod Touch, so I figured I'd take a quick look at it. The game itself seems to work well, but the videos are a bit jittery. Now onto the more important part: A look at the data files.

No, I'm not going to reimplement this engine. But at least this would be a good starting point for anyone who wants to.

It was pretty easy to figure out everything that was going on immediately. Ron Hayter already updated his Riveal tool to extract the images from the game. So, here's pretty much what's going on with those formats:

PNG in the main directory and in zip files with the stack name in it, for example: "aspitimages" is the zip file holding images for aspit, also known as the main menu.

CoreAudio Format in the main directory.

MPEG-4 with h.264 video and AAC audio.

Now, here's the interesting part. The scripts are all in a SQlite database (version 3). They're also named by the stack, such as "aspitdb" for the scripts for the main menu. The actual scripts seem to be all in strings, probably based on the original HyperCard source (which was never released). I matched up some script segments for a comparison:

Riven iOS Script
Riven Win/Mac Script (dumped using ScummVM)

The card scripts start with the script type. The hotspots have the name followed by the rect followed by their scripts. It's pretty much the same setup as CARD/HSPT in the Win/Mac version.

Miscellaneous Observations
The entire main menu seems to have been converted, but is unused. Anyone who finds a debug mode in the app and goes to the original setup page gets a cookie from me.


Unknown said...

Playing Myst/Riven on mobile devices would be really awesome! I am more interested in an Android port for selfish reasons though... what are your thoughts on that? Could say a Nexus One run it?

clone2727 said...

You should rather talk to the Android porter. In any case, one would have to extend the Android port of ScummVM to handle 16bpp graphics.