Thirty years have passed since the debut of an unforgettable title like Prince of Persia. The epic of the brave young man who faced countless dangers and defeated the evil Jaffar to rescue the princess still lives in our minds, but equally fascinating is the story behind its development. Thanks to a mini-documentary published by Ars Technica, we now have Jordan Mechner himself revealing some very juicy details about Prince of Persia, including the tricks he had to apply to overcome the memory limits of the Apple II.
Rotoscoping: The Key to Realistic Movement
The first thing that comes to mind for many people when they hear about Prince of Persia is its animation. Jordan Mechner opted for rotoscoping, dressed his brother David in white (who basically recreated all the hero's movements), and acquired a digitizer. The year was 1989, and although Prince of Persia didn't create a big commercial explosion in the United States, the rest of the world welcomed it with open arms.
But before Prince of Persia, there was Karateka. Up to that point, all the games Mechner had made followed the same arcade mechanics (three lives, high score, try again), but with Karateka he decided to tell a story: The evil Akuma takes Princess Mariko prisoner, and our hero must rescue her by dishing out kicks and punches in all directions. There's a five-year difference between Karateka and Prince of Persia, however, both were born on the same platform: the Apple II.
The Apple II's Limitations
In the mini-documentary published by Ars Technica under its excellent "War Stories" series, Mechner himself admits that working with the Apple II was not easy at all. Considered the "#1 system" for gaming in the 80s (at least in the United States), its hardware restrictions were very significant. The audio system was several steps below other computers, video was limited to four colors at a resolution of 280 x 192 pixels, and the total RAM available amounted to 48 kilobytes.
Here is where the famous rotoscoping comes in. All his attempts to animate his characters turned out "stiff" and disappointing, but with the help of his karate teacher he was able to develop the animations for Karateka. Having found a good solution, Mechner began to imagine his next game, and cites as his main source of inspiration the first ten minutes of "Raiders of the Lost Ark" (without forgetting "One Thousand and One Nights" and "The Thief of Bagdad"). At that time, when a game character fell into a pit or a tube, they were light as a feather and essentially invulnerable, but he wanted to convey the idea of pain: If the player missed a jump or fell into a difficult place, it would end badly.
https://old.neoteo.com/el-codigo-fuente-de-prince-of-persia/The VHS Frame-by-Frame Process
But Prince of Persia needed an exponential leap in the quantity and quality of animations: repeating what he did in Karateka would not be enough. Jordan found the key in VHS, which allowed him to film his brother frame by frame. The conversion from video to animation required a kind of "analog-to-analog-to-digital" process.
First he captured the frames (advancing one at a time with his VCR) using a 35mm camera pointed at the TV with the videos in a dark room. Then he used each frame as a reference to create negative versions of his brother, highlighting his edges with a Sharpie. That was processed with a photocopier, resulting in a white character with a well-defined black background. The final phase was handled by the digitizer, an add-on for the Apple II that cost $599 in the 80s ($1,250 adjusted for inflation). It was weeks of work, processing and converting individual frames.
Memory, Combat, and The Shadow
However, each frame equates to memory, and we already mentioned that the Apple II didn't have much... 48 kilobytes. Furthermore, new systems were about to hit the market, and the feeling that the Apple II was "dying" was increasingly tangible. Another point of conflict was that Mechner had imagined Prince of Persia as a survival game... but it wasn't entertaining. The solution? Add combat, following the suggestion of his colleague Tomi Pierce, one of the founders of Brøderbund.
But how do you add combat when you no longer have memory to work with? The answer was hidden in the "Exclusive-OR" function: If two bits are equal you get 0, if they are different, you get 1. By using Exclusive-OR shifted by one bit and writing the code in just five minutes, "The Shadow" was born, the opponent Prince of Persia so desperately needed. For the guards, Mechner managed to access an extra 12K hidden in the auxiliary memory card on the Apple II, and got their animations from the 1938 adaptation of "Robin Hood" with Errol Flynn.
On October 3, 1989, Prince of Persia hit the shelves, and the video game world had thrown in the towel with the Apple II, seeking systems more abundant in resources. But the ports managed to rescue this fabulous game. The memory limits disappeared, leading to even smoother animations, excellent backgrounds, vibrant colors, and an exciting adventure from start to finish. Would you like to play it again? It's available on the Windows store, for free!
https://old.neoteo.com/el-primer-juego-de-pc-comercializado-en-cd/