The classic is still better than what Ubisoft came up with!
Retro games fans will be heading over to Github, where Jordan Mechner has posted the source code to his original classic, Prince of Persia. The posting follows the discovery in March of the original software in “a carton at the back of a closet”, as Mechner explains in this blog post. To recover the data, Mechner called on the …
I'm downloading the code as I type ... My eldest niece (13 years old) has an interest in programming close to the hardware. Dunno why ... Probably my fault :-)
This will be a wonderful tool for any teacher who understands that there is no such thing as software ... software is merely the current state of the hardware.
Beyond historical interest, there's not really much point. It's in 6502 assembly for a dead platform. Even if you went to the effort of converting it to something vaguely cross-platform and useful, there's not much in the game to actually worry about. It's not like Doom or Quake code where they are miraculous code shortcuts and fabulous bits of computer science embedded and explained in the code.
The tech document tells you everything you would be able to guess for yourself. It's a tile-based game, with some thought given to make a pseudo-3D (really layered 2D) appearance so that the Prince appears behind certain objects and in front of others and you have "3D-like" appearance of vertical walls and gates. Literally, as the tech document shows, they just print the background, print the next layer, the next, the next, etc. until the whole image is full up. How they do that is pretty uninteresting - there's no fancy blending, caching, compression, etc. it looks just a plain blit.
There's really nothing I've seen there that's actually interesting. I imagine 95% of the value of that game was in the artist's tiles, sprites (which, admittedly, had some seriously smooth and detailed animation for the time) and the sound . Even the gameplay is easy to code just after a single run through - what could the character do? Run, jump, grab, take out sword, strike, defend (and if I remember the "parry" defence animation was atrocious and looked like the previous frames of the "take the sword out" animation looped). The AI wasn't interesting in any way - if they saw you, they chased you and tried to stab you (pretty much at random).
Sure, at the time, the graphics and gameplay sold the game but now? I can't see what use the code would be. If I'm honest, those technical documents look like hasty sketches that could have been written in the first day of coding and never referred to again. And the code seems seriously undocumented.
It's nice to have for historical reference but there's no practical use in that code any more. Anyone wanting to write a remake would probably just start from scratch - it'd be easier. And without the same kind of high-quality animations, anything you built with it would be quite dull.
I'm not sure that any "big" project had any interesting notes preserved, probably because most of the time they didn't exist or would never be released. I mean, this is Prince of Persia, a big-name game that sold well and spawned several sequels (2 was better in my opinion). And there's a scrappy tech doc that basically describes tile order and sizes and some other details and NOTHING in the code at all.
When the Doom/Quake code was released, it was interesting to read through and well-commented and professional. It even went on to spawn no end of remakes and sequels on the basis of its code quality alone. Hell, I remember parts of the original Syndicate code being published in one of the computer magazines at the time as a "simple C programming" tutorial. Again, the value was in the assets and the testing and the gameplay, not in how to blit a sprite to the screen in an isometric game.
Personally, I'd much rather see some decent commented disassemblies of old Spectrum games (48K for an entire game and all working RAM?!) or something that pushed boundaries. This seems just-another 2D scroller to me, without any interesting code.
writing a 6502 emulator would be quite trivial by itself. Emulating the hardware - address mapping is more challenging.
sweet memories: 6502assembler was the real deal back in the days (i was around 9.5y when started doing it, basic was just too slow for anything remotely interesting).
I will give the source a look, although I never played the game on apple II but PC.
Wow, you really upset some people here, I mean, you got people comparing Prince of Persia to Shakespeare & Rubens. Soon they'll be comparing it to the Babbage difference engine & a Bombe.
It's always amusing to see an insightful comment modded down, especially as you never stated that the code should have been left to rot, just that it's nothing spectacular (I can't comment on that seeing as I haven't seen it, but it appears you have).
Biting the hand that feeds IT © 1998–2019