From Prince of Persia to Templar

Update: Templar is available from Amazon, Barnes and Noble, and bookstores. Follow the Templar Tumblr and Facebook pages for news, reviews, and upcoming events.

The story of how a book, movie, or video game came to be — any project that takes years and the combined effort of many people — is always intertwined with the stories of other projects that didn’t.

In 2001, when I joined a Ubisoft Montreal team hoping to revive an all-but-dead franchise I’d created in the 1980s, Prince of Persia, we had no guarantee that our efforts would see the light of day. We did our best, and the result was a game you may have heard of or played: Prince of Persia: The Sands of Time.

Whereas a game I can guarantee you’ve never played is the next-gen Prince of Persia sequel that team went on to develop. It wasn’t abandoned because it wasn’t good enough; rather, it was so good, Ubisoft decided to make it a new franchise in its own right. Assassin’s Creed was born.

PrinceOfPersiaWallpaper1024Meanwhile, I’d written the “Prince of Persia” movie for Disney. My first screenplay would be substantially rewritten by others before cameras rolled — but the experience sparked a great friendship, and my next writing project with co-exec producer John August: an hour-long dramatic TV pilot about down-on-their-luck private military contractors who accept questionable missions in a different conflict-ridden corner of the world every week. We got as far as casting our leads (Luke Mably and LL Cool J) before Fox pulled the plug. You’ll never see that pilot (though you can read it on John’s blog).

All that happened in one year, 2005. One project cancelled, two others went on without me. To anyone outside the film or video game industry, such a litany of “might-have-beens” might sound discouraging. But if you do work in the industry, you know that what I’m describing is actually a normal, productive year. Most creative people spend a significant percentage of their careers working on projects that don’t see the light of day, or morph into something completely different by the time they do.

Which is why it’s such a rare miracle when a work reaches completion in a form that not only fulfills the writer’s dreams, but exceeds them.

Templar-COVFor this to happen requires luck, timing, a talented and creatively aligned team, and a visionary and committed publisher. It happened with Prince of Persia: The Sands of Time, and now, ten years later, I’m delighted to say it’s happened again. This time not with a video game, but my original graphic novel Templar — out today from First Second Books.

The book is a self-contained romantic action-adventure about the fall of the medieval Knights Templar — 480 pages, full-color, hardcover, illustrated by the husband-and-wife team of LeUyen Pham & Alex Puvilland. If you’re a fan of Prince of Persia, graphic novels, or historical fiction, I hope you’ll check it out.

(Templar is available from Amazon and other booksellers; more info on the Templar Tumblr page).

Here’s how it came to be:

From video games to comics

In 2004, I got an email from Mark Siegel, editor-in-chief of Macmillan’s new graphic-novel imprint, First Second, asking if I’d ever considered doing a Prince of Persia graphic novel.

A few minutes into talking, I realized that Mark wasn’t trying to jump on the Ubisoft/Disney bandwagon. Not only was he not aiming at a merchandising tie-in with those bigger-budget efforts, he didn’t know about them. He was remembering the original, side-scrolling Prince of Persia he’d played in the 1990s. This was just one of the things about Mark’s approach that charmed me. I said yes.

I couldn’t write it myself — I was still busy writing the Prince of Persia movie and the Fox pilot, and Assassin’s Creed was still Prince of Persia 2 — but, kibitzing from the sidelines as Mark brought together Iranian poet A.B. Sina and husband-and-wife illustrators LeUyen Pham and Alex Puvilland to create that Prince of Persia graphic novel, I realized three things:

First, I wanted to write a graphic novel. Comics had been my first love as a kid, along with movies (before video games existed). Cartoon art and storytelling had hugely influenced my work in video games, from Karateka to The Last Express. How could I have let three decades slip by without jumping on an opportunity to work in this art form I cared about so much?

Second, I wanted to write a graphic novel for First Second.

Third, I wanted LeUyen and Alex to illustrate it.

Oddly, throughout the year they worked on the Prince of Persia graphic novel, we’d never met. Whether out of reticence to intrude on each other’s creative domains, or because of the crazy pace of production (that book and their first baby both shared the same, non-negotiable delivery date), all our communication was by email, with Mark as intermediary. But I noticed that every single one of their polite and deferential suggestions made the book unquestionably better. They were brilliant artists, this was their first book-length comic as a team, and their mastery was visibly increasing with each new batch of pages. Whoever wrote their next book would be a lucky writer indeed. I wanted to be that writer.

A strange mystique

I’d had the Knights Templar on my mind for at least a decade. I first learned of their amazing backstory doing research for The Last Express — a World War I-era adventure game about the quest for a legendary, possibly cursed, object that never changes hands without staining them with blood. As anyone who reads books, sees movies, or plays video games with any regularity knows, such objects almost always turn out to be part of a Templar conspiracy.

Once Templars are on your radar, you start seeing them everywhere. They pop up in the third acts of “Indiana Jones and the Last Crusade,” “Robin Hood” (the 1938 Errol Flynn version), “The Da Vinci Code,” and in the prologue of “The Maltese Falcon.” As Umberto Eco put it in Foucault’s Pendulum: “Everything has something to do with the Templars.”

I became a collector of Templariana. I hatched any number of Templar-conspiracy plotlines — including a screenplay prequel to The Last Express, which I abandoned in 2002 (probably wisely) to focus on Prince of Persia: The Sands of Time. If its MacGuffin bears an uncanny resemblance to The Da Vinci Code, it’s not because either Dan Brown or I were aware of each other, but most likely because we’d been independently reading the same pseudo-historical nonsense about the Templars. You can read the first 40 pages here.

A little research is a dangerous thing. A lot of research can be fatal. My enthusiasm for my various Templar conspiracy-theory plot lines was killed by realizing that they weren’t, after all, that original. The world didn’t need another third-act revelation where the hero discovers that the secret he’s been chasing/fleeing is part of a centuries-old Templar plot to uphold/destroy/hide/reveal something or other. (Or so I told myself. The subsequent popular success of “National Treasure” and The Da Vinci Code suggested that the world had, in fact, wanted at least a couple more.)

What really gripped my imagination, and stayed in my mind long after I’d put away all that historical and pseudo-historical research, was the actual history of the Templars and what had happened to them. It was weirder, deeper, more disturbing, and more moving than any of the best-selling riffs on it I’d scarfed down (and I’d scarfed a lot of them). It had the unmistakable ring of truth, of stuff you couldn’t invent. I wanted to read that story.

Which meant I had to write it.

Six years in the making

I pitched Templar first to Mark Siegel, in a café around the corner from First Second and Macmillan’s Flatiron Building headquarters.

Second, I pitched it to LeUyen and Alex, in the kitchen of their San Francisco apartment. They’d just spent two years exhausting themselves to produce a 192-page Prince of Persia book, and had just become new parents to boot, so I knew my chances of convincing them to sign on to an even more ambitious, multi-year book project were slim. But I had to try.

p137s squareThat was six years ago. A lot has happened since. LeUyen and Alex now have two children. Assassin’s Creed has become Ubisoft’s flagship franchise, and — in a historical irony that would not have surprised Umberto Eco — involves a conspiracy tracing its origins to those very same medieval Knights Templar.

As for the Persian prince who originally brought us together, he’s executed a remarkable series of running leaps — from the 8-bit Apple II screen where he began, to new generations of video game consoles, graphic novels, LEGO play sets, and the big screen that inspired his creation. I have no doubt that, being the plucky and resourceful character he is, he’ll find his way through the sandstorm and back into the video game world very soon.

For today, I’m immensely proud and excited to offer you Templar — one of the most rewarding creative collaborations it’s been my privilege to be part of. I hope you’ll enjoy it.

Comments are open below. I look forward to hearing your thoughts.

Posted on Jul 9, 2013 in Blog, Comics, Featured, Film, Games, Last Express, Making Games, Prince of Persia, Templar | 12 comments

Making and Remaking Karateka

Update: Karateka is now available in the App Store and for Sony Playstation Network, Xbox Live Arcade, and Steam.

The modern remake of Karateka (out today on Steam) has given me a great reason to dig into my archives and revisit the long-ago era when I developed the original Karateka on a 48K Apple II.

If you’re interested in making games, you may enjoy this series of short videos about the creative and technical process of making Karateka, then (1982) and now (2012). Each episode focuses on a different aspect of production: Inspiration, Animation, Sound and Music, and Gameplay. They’re posted below.

The game industry has changed a lot in thirty years. And yet the more things change, the more they stay the same. For readers interested in delving deeper into the old days, check out the rest of this post below the videos.

Episode 1: Inspiration

Episode 2: Animation

Episode 3: Sound and Music

Episode 4: Gameplay

From My Old Journals

When I started the first Karateka, in 1982, I was a 17-year-old Yale freshman and avid gamer, trying to balance a college courseload with my aspiration to become a published game author. Karateka made that dream a reality. It launched my career and paved the way for my next game, Prince of Persia.

That same year (1982), I started keeping a private journal — a habit I’d keep up for the next decade, as readers of The Making of Prince of Persia (1985-1993) will know. More surprisingly, I never got around to destroying it. And now it’s in the distant-enough past that, rereading it, I’m able to laugh rather than cringe (OK, so maybe it’s a bit of both).

As a time-capsule record of that early Apple II era, and a window into the maniacal brain of a teenager obsessed with “breaking in” to making games and/or movies, it may be of interest to others. So here it is (as DRM-free pdf, epub, and Amazon Kindle ebook, with print edition to follow): Volume One of my old journals, The Making of Karateka.

And, of course, I hope readers will check out the new Karateka.

Posted on Dec 3, 2012 in Blog, Featured, Games, Karateka, Making Games, Old School | 16 comments

Prince of Persia Source Code

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?!”

Tony and me at the moment of truth

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?

POP source code recovered after 22 years

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

Here’s the thing about digital backups and magnetic storage media: They don’t last very long.

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.

Further reading:

“Making of Prince of Persia” game development journal

25-year capsule history of Prince of Persia

POP source code on github

Código Fuente de Prince of Persia – ¡Posteado! (Spanish translation of this post)

Posted on Apr 17, 2012 in Blog, Featured, Games, Making Games, Old School, Prince of Persia | 49 comments

PoP Original Screenplay

Regarding Prince of Persia’s recent journey from video game to movie, I’m sometimes asked how closely the final film follows my original story.

Now that the movie is out on DVD/Blu-Ray, I figure the easy way to satisfy curiosity is to simply post my screenplay from June 2005.

Quick history: This was the last draft I wrote, starting from the story John August and I pitched to Disney/Bruckheimer in 2004. A series of other writers took it from there: Jeff Nachmanoff, Boaz Yakin, Doug Miro & Carlo Bernard, in that order, resulting in the shooting script that went into production in summer 2008.

The making of the movie is well documented in Michael Singer’s coffee-table-worthy book and the movie DVD/Blu-Ray extras. Now, you can see how it started.

Update: If you’re curious about the game-into-movie adaptation process, I’ve also posted the original game script of Ubisoft’s Prince of Persia: The Sands of Time, which I wrote in 2002-03, and an accompanying article about how that game story was developed. As these materials illustrate, writing for games and movies are two very different crafts.

Posted on Oct 11, 2010 in Blog, Featured, Film, Games, Prince of Persia | 22 comments

Tips for game designers

These “20 Tips for Game Designers” were first published in 2004, on the release of Prince of Persia: The Sands of Time.

  1. Prototype and test key game elements as early as possible.
  2. Build the game in incremental steps – Don’t make big design documents.
  3. As you go, continue to strengthen what’s strong, and cut what’s weak.
  4. Be open to the unexpected – Make the most of emergent properties.
  5. Be prepared to sell your project at every stage along the way.
  6. It’s harder to sell an original idea than a sequel.
  7. Bigger teams and budgets mean bigger pressure to stay on schedule.
  8. Don’t invest in an overly grandiose development system.
  9. Make sure the player always has a goal (and knows what it is).
  10. Give the player clear and constant feedback as to whether he is getting closer to his goal or further away from it.
  11. The story should support the game play, not overwhelm it.
  12. The moment when the game first becomes playable is the moment of truth. Don’t be surprised if isn’t as much fun as you expected.
  13. Sometimes a cheap trick is better than an expensive one.
  14. Listen to the voice of criticism – It’s always right (you just have to figure out in what way).
  15. Your original vision is not sacred. It’s just a rough draft.
  16. Don’t be afraid to consider BIG changes.
  17. When you discover what the heart of the game is, protect it to the death.
  18. However much you cut, it still won’t be enough.
  19. Put your ego aside.
  20. Nobody knows what will succeed.

Posted on Dec 15, 2009 in Blog, Featured, Games, Making Games, Prince of Persia | 11 comments

11 Add a Comment
Share this post: