Prince of Persia
Jordan created and programmed the original Prince of Persia on an Apple II computer in 1989. A decade later, he partnered with Ubisoft to reinvent his classic for a new generation of gamers with Prince of Persia: The Sands of Time. Its success launched a global franchise that now includes video games, graphic novels, toys, LEGO, and a blockbuster Disney feature film.
Prince of Persia 2: The Shadow and the Flame was released for PCs in 1993 — three years after the prince’s original Apple II debut, and a full decade before his leap to 21st-century consoles with PoP: The Sands of Time. I’ve posted a lot about my work process on the other PoPs, but almost nothing about this one.
To jog my memory, I dug out of my archives the game design “bible” I created for the PoP2 dev team in 1991. It’s a curious artifact of that era; you can download the PDF (19MB) if you’re interested.
Why I hate bibles, and made one anyway
There was no “bible” for the original PoP. That game evolved over four years in an organic process of improvisation, trial and error. The level design — the balance of action, exploration and combat that gave the game its particular flavor — came together only in the final few months. I had the liberty to do it that way because I was game designer, animator, and programmer, working on my own with no fixed timetable or budget.
Writing a detailed 200-page bible, then handing it to a team and saying “Make this” is the complete opposite way to start a project, and it’s almost always a terrible idea. I wouldn’t recommend it to anyone. But that’s how PoP2 was made. It worked because of a peculiar combination of reasons:
- I’d already made PoP1. The idea for PoP2 was to basically make PoP 1.5: keep the existing PoP1 code, animation, and gameplay, add souped-up graphics, a few new twists, traps and enemies, and build twelve new levels. Designing the entire game on paper was possible because it was just similar enough to the original that everyone could easily imagine how it would look, sound and feel to play.
- I was 3,000 miles away. The team was in California, and I was living in New York, about to move to Paris. In those pre-internet days, communication was by fax and long-distance phone calls, with game builds and data sent on floppy disks in DHL envelopes. I knew I wouldn’t be on site often enough to permit fast iteration and tight feedback loops. So it made sense to spell everything out ahead of time.
- We had a budget. Broderbund was a conservative studio and PoP2 was the biggest internal game project they’d ever done. They were already nervous about doing such a graphics-intensive project, and wouldn’t have signed off on it without a design document that gave them confidence that the cost estimates were solid.
- The team actually followed the bible. If the on-site team had included a creative director, my bible would have been obsolete by month two. Games evolve so quickly that any design that gets put on paper is usually out of date by the time anyone reads it. This is why making a detailed bible is usually a waste of time. PoP2 was the rare situation where the studio and team were united in wanting to faithfully execute the design I gave them — and I was safely off-site where there was less danger I might get inspired to improve it.
For all these reasons, it made sense to have a bible. It’s interesting to read it now and see how it compares to the final game. There were cuts and trims, for the usual budget/schedule reasons (the blow-by-blow story of the game development is in the second volume of my old journals) — but I’m most struck by how much was kept, and how faithfully it was executed.
The Shadow and the Flame burns again
To the many readers who have posted asking for a version of The Shadow and The Flame to play on mobile devices, I’m happy to report that Ubisoft has just announced a modern “remastered” version for smartphones and tablets.
The mobile Prince of Persia: The Shadow and the Flame will feature updated graphics, sound, and touch controls in the spirit of Prince of Persia Classic, rather than a direct port of the original like 2010′s Prince of Persia Retro. Here’s a link to the trailer. For myself, I’m looking forward to trying to beat the game again, twenty years later.
Questions & Answers (Spoiler Alert!)
My Apple II-unaware friend Jamie walked into my office this morning, surveyed the detritus of yesterday’s marathon source-code extraction, and asked “Good Lord, what happened here?!”I explained that the original Prince of Persia source code had just turned up after being lost for 22 years, and that two stalwart companions and I had dedicated most of the previous day and night to extracting it and posting it on github.
Jamie — who knows the term “source code” primarily as the title of the movie Jake Gyllenhaal did after Prince of Persia — digested my explanation; then, looking as confused as before, asked “Why?!?”
It was such a simple question, it stumped me for a moment. Why would I spend a whole day trying to recover data from some ancient floppy disks?
I said: “Because if we didn’t, it might have disappeared forever.”
Why source code?Non-programming analogy: Video game source code is a bit like the sheet music to a piano sonata that’s already been performed and recorded. One might reasonably ask: If you have the recording, what do you need the sheet music for?
You don’t, if all you want is to listen and enjoy the music. But to a pianist performing the piece, or a composer who wants to study it or arrange it for different instruments, the original score is valuable.
It’s possible, up to a point, to reverse-engineer new source code from a published video game, much as a capable musician can transcribe a musical score from listening to a performance. But in both cases, there’s no substitute for the original document as a direct line to the creator’s intentions and work process. As such, it has both practical and historical value, to the small subset of the game-playing/music-listening community that cares.
This is why I was so sorry to have lost the Prince of Persia source code, and happy to find it again.
Lost and found (Geek quotient = 9)
If you’ve read my 1980s game dev journals, you know that by the time Prince of Persia shipped in 1989, I was burned out on coding and seriously eager for the next chapter of my life to start. So I did what most programmers would do: I backed up my Apple II source code onto 3.5″ floppies, stuck it in a box, and promptly forgot about it.
Thirteen years later, when I looked for that box of source code again, I couldn’t find it. I was in Montreal with an amazing team making Prince of Persia: The Sands of Time. Lead programmers Dominic Couture and Claude Langlais had volunteered to port the original POP to the PlayStation 2, and slip it into our new game as an easter egg. (This was their idea of a fun respite from crunch time.) All they needed was the source code. But as much as we searched — from my garage to Broderbund’s archives to Doug Carlston’s basement — it was nowhere to be found.
Finally we tracked down Scott Shumway, who’d done the 1992 Mac port of POP. He didn’t have the Apple II source code either, but he did have the Mac source code. Dom and Claude made short work of porting it to the PS2, and Sands of Time got its easter egg. Everyone was happy.
On my return to LA, I dug deeper, and turned up a whole shoebox full of Apple II floppies, some dating back to high school. The source code to all my early games was in there: Deathbounce, Karateka. But no POP.
I didn’t need the source code for anything; and it wasn’t as if POP had been lost to history — vintage Apple II POP copies (and their disk images) were widely available — but still, it bothered me to think that something I’d spent years working on was just gone. I felt dumb for not having kept a copy.
This was eight years ago. I gave up the search and forgot about it.
Until two weeks ago, when my Dad shipped me a carton of my stuff he’d found cleaning out the closets of his New York apartment. Inside was the source code archive I’d mislaid in 1990.
Paper is forever
Try popping your old 1980s VHS and Hi-8 home movies into a player (if you can find one). Odds are at least some of them will be visibly degraded or downwright unplayable. Digital photos I burned onto DVD or backed up onto Zip disks or external hard drives just ten years ago are hit and miss — assuming I still have the hardware to read them.
Whereas my parents’ Super 8 home movies from the 1960s, and my grandparents’ photos from the 1930s, are still completely usable and will probably remain so fifty years from now.
Pretty much anything on paper or film, if you pop it in a cardboard box and forget about for a few decades, the people of the future will still be able to figure out what it is, or was. Not so with digital media. Operating systems and data formats change every few years, along with the size and shape of the thingy and the thing you need to plug it into. Skip a few updates in a row, and you’re quickly in the territory where special equipment and expertise are needed to recover your data. Add to that the fact that magnetic media degrade with time, a single hard knock or scratch can render a hard drive or floppy disk unreadable, and suddenly the analog media of the past start to look remarkably durable.
This is why, when I posted about finding the POP source code, digital archivist Jason Scott, Apple II collector Tony Diaz, Derek Moore, and the technical teams behind the DiscFerret and Kryoflux disk readers volunteered their time and effort to give us the best possible shot at a successful extraction.
Let me begin to count the ways I’ve been lucky with this: The box was found. The disks were intact. Prince of Persia and I happened to have a high enough public profile that people of Jason and Tony’s caliber (and dozens of others who contributed their expertise via IRC, skype and twitter from around the world) cared.
In the bigger picture, our timing was lucky. The 1980s and the Apple II are long enough ago to be of historical interest, yet recent enough that the people who put the data on the disks are still with us, and young enough to kind of remember how we did it. Roland Gustafsson, author of the special 18-sector RWTS routines that had made our disks super-efficient in 1988 (and unreadable to anyone but us), was able to get on IRC in 2012 and explain what he’d done to Discferret kids who weren’t born then.
For all these lucky reasons, our archaeological expedition was crowned with success.
From a preservationist point of view, the POP source code slipped through a window that is rapidly closing. Anyone who turns up a 1980s disk archive 20 or 30 years from now may be out of luck. Even if it’s something valuable that the world really cares about and is willing to invest time and money into extracting, it will probably be too late.
This is why it’s awesome that there are people out there working on digital preservation. Because now is the time.
Back up your backups
Jason suggests the following rule of thumb: If you have data you want to keep for posterity, follow the Russian doll approach. Back up your old 20GB hard drives into a folder on your new 200GB hard drive. Next year, back up your 200GB hard drive into a folder on your new 1TB hard drive. And so on into the future.
As for me, the past 48 hours have been a fun walk down memory lane. And have given me a renewed appreciation for paper, celluloid, and stone tablets.
(Postscript: For 6502 assembly-language aficionados, the Prince of Persia source code is now up on github, along with a README file that answers some frequently asked questions. I’ve been amazed and moved by the outpouring of interest in the #popsource saga — it literally crashed this website for several hours today.)
Now, I really need to get back to my day job of making up new stuff. I can only hope to have the same lucky, glorious headache of trying to recover some of it 20 years from now.
Two weeks ago, my Dad shipped me a box that, to my joy, contained the original Apple II Prince of Persia source code archive I’d stowed away 20 years ago and had given up for lost.
Despite my eagerness to see what’s on those disks, I’ve yet to pop them in a drive. As readers of this site have cautioned me, digital media degrade with age; if the disks are in a fragile state, normal handling could damage them further and even render them unreadable.
In today’s guest post, digital archivist Jason Scott explains why reading 20-year-old floppy disks is trickier than it sounds — and why he’s volunteered to fly from NY to LA on Monday with special equipment to tackle the job himself.
Monday will be an exciting day. Much like opening a long-sealed sarcophagus, I truly have no idea whether we’ll find what we’re hoping for, or just data dust. For anyone who wants to share the suspense, we’ll be live-tweeting our progress. Hashtag: #popsource. (I wanted to use #sourcecode, but it was taken!)
Meanwhile, here’s Jason’s story, offering a glimpse behind the scenes of a profession whose existence I couldn’t have foreseen or imagined when I was making Prince of Persia in the 1980s: Digital archeologist.
I first heard about Prince of Persia in a somewhat strange fashion; a high school friend said that David’s older brother was working on a new game to follow up his big hit Karateka. I asked what it was about, and he said it was something about Persian princes and acrobatics. I left it at that, but I knew it’d be great, if Karateka was any indication.
I went to Horace Greeley High School after Jordan, and knew his brother, David, who graduated the same year as me. David was the motion model for Prince of Persia. Jordan was this talented figure somewhere out in the fog of the real world, who was making actual, sold-everywhere games with a company I really liked and respected (Broderbund), and was basically living the dream I hoped to live one day: game developer.
(My own dream was fulfilled — I did work for a short time at Psygnosis, makers of Wipeout, as a tech support phone monkey, and another year stint at a startup game studio, before moving on to other places in the computer world.)
It wasn’t until a couple years ago that I moved away from jobs like system administration and backup-watcher into the world of computer history and documentary filmmaking, where I am now. As one of the Adjunct archivists of the Internet Archive, I seek out new collections of data and help preserve current ones — anything from digitized books and audio to long-forgotten shareware CD-ROMs and obscure information files uploaded years ago. It’s a great time, and most importantly, it affords me the flexibility to travel when I’m needed somewhere.
So this was why, when Jordan announced he’d gotten back the Prince of Persia disks he had in his own collection, a lot of friends of mine started linking me to the article and saying “Well?” It was a perfect fit. I had seen Jordan for a few moments after his recent appearance at GDC, so it made sense to have us talk about my coming in to oversee the retrieval of data from the disks. What a nice journey — from hearing the game was being worked on in my youth to helping make sure Jordan’s work lasts for future generations!
Pulling data off dead media in the present day is both easier than it ever has been, and as frustrating as ever. Continue Reading
(Warning: Geek Quotient of today’s post = 11)
My Dad (yep, the same guy who composed the music for the original Karateka and Prince of Persia) called from New York to tell me he was doing some spring cleaning and had shipped me a carton of old games and other stuff of mine he’d found in the back of a closet.
The carton arrived yesterday. My jaw dropped when I saw what was inside.
No, I don’t mean the stacks of Spanish Drosoft versions of POP and Karateka (though those are cool too, especially if you have an Amstrad computer with a cassette player). I mean those three little plastic 3.5″ disk boxes nestled among them… which appear to contain the ORIGINAL APPLE II SOURCE CODE OF PRINCE OF PERSIA that I’ve been searching for, off and on, for the past ten years, pestering everyone from Doug Carlston to Danny Gorlin and everyone who ever worked at Broderbund, and finally gave up hope of ever finding.
I KNEW it wasn’t like me to throw stuff out!
So, for all fifteen of you 6502 assembly-language coders out there who might care… including the hardy soul who ported POP to the Commodore 64 from an Apple II memory dump… I will now begin working with a digital-archeology-minded friend to attempt to figure out how to transfer 3.5″ Apple ProDOS disks onto a MacBook Air and into some kind of 21st-century-readable format. (Yuri Lowenthal, you can guess who I’m talking about.)
This is a crazy busy time (in a good way) with too many projects, so it might take a little while. I’ll document our progress via the twitter and facebook feeds, and I promise, as soon as we can extract something usable, I’ll post it here.
This video by comedy group Karahat is so classic, I just had to repost it. Thanks to Kotaku and many kind people on twitter for alerting me to its existence.
The prince’s foray into real life may not do for parkour what the Real Life Angry Birds commercial did for T-Mobile, but at least he’s out there trying.
I didn’t even realize this video’s true genius until I saw it a second time — so thoroughly has the modern iPhone era of cheap-and-easy digital compositing effects reshaped my expectations. As far as I can tell, its central special effect was created using a technology that was equally available in 1985.
A special booster potion to the first reader who calls it out.
The paper book comes from CreateSpace, a really cool self-publishing service for authors. Basically, we sent them a print-ready PDF and they did the rest. The book weighs in at 323 pages, and looks and feels like a good-quality trade paperback. We’ve priced it at $16.99 (the difference from the ebook versions reflects the printing cost).
You can purchase the book here.
To anyone who’s previously paid for another version of the ebook and would like to have the .epub version for convenience, let us know and we’ll email it to you. Like the PDF, it’s non-DRMed.
Once the dust has settled, I’ll post (and Aaron, Dave and Danica may guest-post) about the results of our grand ebook/self-publishing experiment, and what we’ve learned. Short answer: It was more work than we anticipated — but now that we know how, the next book should be a lot easier. I think.
Many thanks to everyone who’s read the book and reviewed, posted or tweeted about it. The response has been fantastic, and makes it all worth it.