Linked by Thom Holwerda on Tue 17th Apr 2012 07:56 UTC
Games While many won't understand the significance of this, this really is kind of a big deal. After accidentally stumbling on the source code for the original Prince of Persia, its creator, Jordan Mechner, has released it as open source. It took some magic to get the code, written in Apple II assembly, off the 23-year old disks. Prince of Persia created an entire genre and left an impression on the games industry that lasts to this very day. Having the original code out and about is huge.
Order by: Score:
Comment by Verunks
by Verunks on Tue 17th Apr 2012 08:10 UTC
Verunks
Member since:
2007-04-02

prince of persia was the first game I tried when I got my first pc(a 486), I had to go back to school that afternoon but I couldn't stop playing, I guess that's when my videogame addiction started

Reply Score: 3

Why not the pc version?
by rimzi on Tue 17th Apr 2012 08:40 UTC
rimzi
Member since:
2009-12-17

Or is this the same code built with different utils?

Or just not found yet? ;)

Reply Score: 1

RE: Why not the pc version?
by steve_s on Tue 17th Apr 2012 09:46 UTC in reply to "Why not the pc version?"
steve_s Member since:
2006-01-16

The PC version will be a completely different codebase.

The Apple ][ source code that's been posted to github is all in 6502 assembler. PC's ran (and still run) on x86. Even all the graphics are encoded into 6502 assembler - there'd be zero common code between the two versions.

Reply Score: 3

RE: Why not the pc version?
by Moredhas on Tue 17th Apr 2012 10:37 UTC in reply to "Why not the pc version?"
Moredhas Member since:
2008-04-10

Jordan Mechner's journals of the time he spent working on Prince of Persia 1 and 2 are on his site, and they are an amazingly interesting read. These aren't blogs, in the modern sense, where the content is exclusively about the development, they're his personal journals, and reading them feels like modern archaeology digging up fragments of the game industry as it was, and the hardware that was used, and it's a good personal story, too, since being his personal journals, they're mostly concerning Jordan's life at the time. I really recommend you check them out. To my point, though, the journals contain some interesting stuff about the development process on the Apple II and the Macintosh, and the lengths he went to to port it to PC.

Reply Score: 5

I understand the significance
by Laurence on Tue 17th Apr 2012 08:46 UTC
Laurence
Member since:
2007-03-26

I understand the significance of the original Prince of Persia, but I always hated that game. I just found it repetitive and dull (yet weirdly I was always hooked on Pacman and breakout clones -stuff a great deal more repetitive- around the same sort of time)

It's funny how different games have made a different impression on different people.

Reply Score: 2

RE: I understand the significance
by MOS6510 on Tue 17th Apr 2012 12:52 UTC in reply to "I understand the significance"
MOS6510 Member since:
2011-05-12

When I worked at a police station it was a very popular game (together with Wolfenstein). I never liked it either, probably because it had to be played using the keyboard while as a Commodore 64 and Amiga user I was used to joysticks.

As I recall it was mainly the graphics and animation what excited people. The game itself never impressed me. Probably because I had played a lot of games by then and most people back then only were able to play games at work or had an Atari 2600.

At work I preferred to play X-Wing, which wasn't easy to control with a mouse either.

Reply Score: 2

Laurence Member since:
2007-03-26

Wolf3D*. How had I forgotten about that game? I loved Wolfenstine so much.

Was that really around the same time as Prince of Persia? I though it was more recent than that.

I could see the appeal of PoP for the graphics, but the game play always felt a little sluggish for it. I guess I was just used to 2 frame sprites ;)

* though Wolf-pseudo-3D would have been a more accurate name. More than 8 chars though.

Edited 2012-04-17 13:13 UTC

Reply Score: 2

MOS6510 Member since:
2011-05-12

Too lazy to ask Google, but I think Wolf 3D predated Pop. I'm guessing this because PoP showed up at the police station after Wolf 3D.

If you enjoy Wolf 3D and have a ZX Spectrum around doing nothing:

http://www.youtube.com/watch?v=vzm9KkJ5lGI

Reply Score: 2

moondevil Member since:
2005-07-08

Too lazy to ask Google, but I think Wolf 3D predated Pop. I'm guessing this because PoP showed up at the police station after Wolf 3D.


Not at all.

I was playing the original PoP for PC on a PCW 1512 running on EGA graphics, around 1990. Way back anyone would come with an idea to create Wolf 3D.

Reply Score: 2

MOS6510 Member since:
2011-05-12

Okay, I looked it up.

PoP was released for the Apple ][ in 1989 and for DOS and the Amiga in 1990. Wolfenstein 3D was released for DOS in 1992.

In 1994 PoP 2 was released. I worked at the police station between 1993 and 1995.

My guess is after people got bored with Wolfenstein 3D the sequel to PoP made the rounds.

Reply Score: 2

Soulbender Member since:
2005-08-18

Was that really around the same time as Prince of Persia? I though it was more recent than that.


PoP was released in 1989, Wolf3d in 1992. Considering the time it was released PoP was pretty darn spectacular.
Also, you could play it with a joystick if you wanted, at least on the PC.

Reply Score: 2

Assembly language source code
by YEPHENAS on Tue 17th Apr 2012 08:58 UTC
YEPHENAS
Member since:
2008-07-14

To most of today's programmers having assembly language source code is like having no source code at all. Maybe someone should cross-compile it to JavaScript and HTML5 canvas for them. Wait, I just heard that JavaScript is the assembly language of the web and thus too low-level. So CoffeeScript it should be.

Edited 2012-04-17 09:13 UTC

Reply Score: 12

RE: Assembly language source code
by l3v1 on Tue 17th Apr 2012 09:06 UTC in reply to "Assembly language source code"
l3v1 Member since:
2005-07-06

You maybe should've included a few dozen smileys here and there, since that "them" might just not be enough for survival ;)

Anyway, events like this can make my day. It's really a nice experience to be able to go back to such old memories and look at them with a really "deeper" look, right down to these sources, it's just plain fun.

Reply Score: 3

Valhalla Member since:
2006-01-24

Heh, yes as someone who first learned programming back on the c64 in 6502 assembly (turbo assembler FTW!) stuff like this brings me sweet nostalgia.

Also I really liked Prince of Persia (unlike Mechner's previous game Karateka). There's a recent 'reverse engineered' remake made for the C64 here together with an interesting devlog:

http://popc64.blogspot.se/2011/10/prince-of-persia-for-commodore-64...

Bet he would have loved to have had this source code and is likely having alot of fun right now comparing the way he solved certain things compared to Mechner.

Reply Score: 2

Thom_Holwerda Member since:
2005-06-29

I voted +1 funny but actually it's not funny at all but a sad reality.

Adam, please add an +1 sad reality voting option. Using JS, of course.

Reply Score: 7

RE: Assembly language source code
by stew on Tue 17th Apr 2012 11:19 UTC in reply to "Assembly language source code"
stew Member since:
2005-07-06

Having written my share of 6510 and 68k assembly, I looked at the linked source code and thought to myself "thank god we're not writing things in assembly any more". There are already too many moments when I wish I was using more Python and less C++ at work.

Reply Score: 3

MOS6510 Member since:
2011-05-12

Assembler code does look very cool.

Reply Score: 2

ricegf Member since:
2007-04-25

I wrote a fairly large (for the time) GA flight displays package in 6502 assembler for NASA back in 1983 (I think). We took it to the Oshkosh Air Show, running on two Atari 800s and the flight sim proper on a small minicomputer, all linked with RS-232.

While I mostly write Python now (when I have time to code at all), the one thing I miss about those halcyon days is that I controlled every single machine instruction running on each 6502. And given De Re Atari, I've never had as deep of an understanding of any machine before or since. Well, except perhaps the CPU I designed and built as my senior project - but it lacked a good display processor. :-D

Abstraction is great, but sometimes you need to understand what's happening at the bare metal.

Raspberry Pi, perhaps? ;-)

Reply Score: 2

Comment by Gusar
by Gusar on Tue 17th Apr 2012 11:23 UTC
Gusar
Member since:
2010-07-16

Now this is just awesome. Prince of Persia was one of my first games. When I had a machine with a 286 processor and Hercules monochrome graphics. Yeah, those were the times...

Reply Score: 3

RE: Comment by Gusar
by anevilyak on Tue 17th Apr 2012 13:10 UTC in reply to "Comment by Gusar"
anevilyak Member since:
2005-09-14

This makes me remember my 8 year old self being blown away by being able to hear things like footsteps, tiles crashing down on you, and sword noises when we added an original 8-bit Sound Blaster to our 286.

Reply Score: 3

Really Clean Code
by jburnett on Tue 17th Apr 2012 13:40 UTC
jburnett
Member since:
2012-03-29

Wow, this guy wrote some really clean, well documented code.

Reply Score: 3

Port
by panzi on Tue 17th Apr 2012 20:12 UTC
panzi
Member since:
2006-01-22

Who will be the first to port it to JavaScript? If I'd more time and/or would know that no one would beat me to it, I'd do it.

Reply Score: 2

How do I build it?
by biffuz on Wed 18th Apr 2012 12:12 UTC
biffuz
Member since:
2006-03-27

Anybody has some clue on how to build it? I never had an Apple II, all my assembly skills are in x86 (DOS, Win32, and BeOS).

Reply Score: 2