Hacker News new | past | comments | ask | show | jobs | submit login
Prince of Persia in JavaScript (princejs.com)
887 points by colinprince on Dec 28, 2021 | hide | past | favorite | 225 comments



Awesome! Takes me back :)

My 8 yo son is playing it now, he knows all the modern consoles, but this is challenging him. He is frustrated things are hard from the beginning, jumps don't work right away and he stopped after a few minutes. I remember my perseverance as a kid.

I was thinking about that lately, I see my kids don't have this strong motivation as I had, not for anything. Everything works for them and is layed out. For example, when I was young I had a lego technic motor, but the wires sometimes got oxidatid or just broke, and I had to fix it. My son has a new lego set, and the motor always works, except when the wireless remote runs out of battery. Same with gaming, it always works, while in the past even getting a game to run could be a challenge on its own. And when he gets stuck in a game he watches a YouTube. No hours of frustration and endless searching and figuring for a solution.

I see my kids don't have much of these challenges, everything works for them.

Don't know how this will affect them on the long run. Now it's only my observation.


For older kids, I think bricolage and manual labor can bring some of this attitudes you talk about.

The digital world is mostly done. Everything, from social networks, to videogames is studied to avoid frustration, be addictive, and generate a dopamine rush. When not, like competitive gaming and so... the skill gap is too big and the entrance barrier too high

Manual labor cannot be so easily simplified and automatized. Yes, you need to perform a task and, if it's common enough, you'll have a Youtube tutorial at one click reach. But that's not so easy in the real world, because you'll eventually find obstacles and unforeseen problems. Usually, the uploader is a skilled guy for whom, some situations, are not even worth mentioning, but will be a problem for a newbie.

Furthermore many basic manual task are not to be found in Youtube, because they're too specific. Yes, you can find a tutorial on how to hang something to a wall, but you need to hang an object of an specific shape, between two walls corner, where some other object is an obstacle.

In those cases, you're mostly on your own, but the task is achievable


This is a good related video: https://www.youtube.com/watch?v=qP1AmDRhoas


My teenager plays a game called Celeste (among other pretty difficult games). I grew with 80s and 90s games and Celeste looks like I would not bother (or possibly even be capable) to learn it, but he did over several painful and repetitive hours.

So it could be that the children are both ok and broken in new ways, like our generation was.


This is an important point. I don't think it's fair to assume today's kids won't play Prince of Persia because they lack perseverance or because the game is hard. It may just as well be because the game is bad.

I played Prince of Persia as a kid, the game is amazing for its time. But game design has evolved in these 30 years, and it shows. When we were kids we didn't have better games to play so we had to persevere with PoP.

Nowadays, if you want hard platforming you can play Super Meat Boy or Celeste and fight with your ability to perform the required movements, not with the clunky controls.

If you want to explore an unknown world you can play Hollow Knight or Ori and enjoy a much larger and more developed setting.

Neither of these games are easy, but they have much more well crafted learning curves for example. PoP simply drops you in a dungeon and you have to die there until you manage to get the timing of the jumps, while Celeste has an "easy" first level and constantly ramps up the difficulty.


Celeste is a masterpiece. It's well worth the investment in beating the base game, though I did quickly give up on the significantly-more-difficult B- and C-side content.

If you're interested in understanding some of why Celeste is so important to a lot of people but don't feel up for playing it yourself, these two video essays are a great watch:

https://www.youtube.com/watch?v=0QRZyei6dBo

https://www.youtube.com/watch?v=eSxo9JnB1iI


This doesn't counter anything the OP said. No one is claiming the new generations aren't both ok and broken in new ways. Pointing out that you have a teenager that plays a somewhat difficult game doesn't add much to the discussion. Also, the fact that you won't even try the game and yet have made a judgement about how difficult it is says more about you than anything else.

And in fact, I don't think anyone would be surprised if that very same teenager looks up YouTube videos about how to beat the most difficult parts, find all the secrets, and so on.

Even less like the hard old games, Celeste comes with an assist mode:

> Assist Mode allows you to modify the game’s rules to fit your specific needs. This includes options such as slowing the game speed, granting yourself invincibility or infinite stamina, and skipping chapters entirely. Celeste is intended to be a challenging and rewarding experience.


Celeste was a great game, difficult and with finally a well written woman protagonist that is not tokenized. Deserves all the praise it gets!


Well, I grew up in the 80s and I do like Celeste quite a bit.


If you want to counteract this tendency, consider getting them into (competitive) sports. Nothing will work right away, they will have to „grind“ (train/practice) a lot, failures are all but certain; but hard work and perseverance get rewarded, and the successes are all the sweeter. As a young guy who has had a modern and easy childhood not unlike the one you describe, many of my most cherished memories come from competing in a sport.


Sports and musical instruments - if you can keep them motivated/interested, the results of focused practice can’t be ignored.

To some extent I only realized this late in life myself. I don’t play a musical instrument, schoolwork through undergraduate never required really hard work and as an athlete I was a lackluster football player who never really put in the time to get better. But as an adult, computer programming and crossword puzzles were things which I applied myself to and was astonished to see how much better I could get at them by putting in the time and effort. (That being said I am an awful teacher - as an autodidact myself, I often - unfairly - feel that others aren’t putting enough effort in.)


> results of focused practice can’t be ignored

Throngs of well-rehearsed, talented, yet ignored musicians cannot agree. ;)


In many ways esport games (MOBAs, some FPS, etc) have many of the same mechanics!


Getting Over It with Bennett Foddy specifically calls this out. It's brutally difficult from the jump, and his narration talks about how videogames used to ask a lot of their user. They were unforgiving challenges with no guarantee of obvious success. My brain instantly flashed over to TMNT on the NES and just how hard that and Battletoads were.

If you haven't played Getting Over It, it's a tremendous meditation on failure, and Bennett's narrations as you struggle are brilliant from a philosophical standpoint. He talks about how the challenge and failure and difficult ARE the point for a certain class of gamer and how that's the game he wanted to build.

For another take, Super Hexagon provides that same "this is impossible but I'm getting closer to possible and that feels good."


There are also a lot of games out there that are just bad and difficult for the wrong time wasting reasons, and there is also a ton of selection compared to back then. Kids are probably showing rational behavior in picking the 'best' experiences. Old NES games and such were hard either to get more quarters out of you in an arcade and because they didn't have much space to program games, so they made them hard to increase the play time and 'satisfaction' feeling.

Also when I was a kid, early childhood I just couldn't really play the harder games, late childhood I could play the hard games. When they're just too hard you stop playing. Also different kids have different strengths and they will gravitate to games that play to their strengths. I have below the mean reaction times so I just did bad in reaction time platformers and eventually gravitated towards games that weren't hard because of reaction times, like RPGs, strategy games, installing linux on my computer and troubleshooting it and what not.

There are also new 'hard' games out there that demand a lot out of their players, and be careful if your kid gets obsessed about them. Like many esports games.


I remember another proof of that: MKIII. Second hardest level made me swear so much I'm probably excommunicated in multiple religions. I had to build muscle memory to even have a chance, on my Sega Mega Drive II controller. And for the Fatalities, the timespan and combination of keys (that you had to discover yourself or find in some obscure gaming zines) was so hard it was an achievement to do one.


MK2 was notorious for the CPU reading player inputs, so cheesing it was necessary to even have a chance.


I think it's unfair to actual games to call Battletoads a challenge. It's a trial and error puzzle with more in common with kaizo rom hacks. Battletoads and Double Dragon, basically the same thing but with a human-friendly difficulty curve, almost feels like an apology from the developers.


> I was thinking about that lately, I see my kids don't have this strong motivation as I had, not for anything.

> Don't know how this will affect them on the long run. Now it's only my observation.

I realize that you're only talking about your own kids, but I have a feeling that many people on here consider this to be some kind of general rule for all kids, akin to the "back in my day" rhetoric of the generations before us.

I think it's good to consider that your kids will likely live in a world where this attitude is actually a very effective one:

* Instead of spending days trying to solve some problem yourself, download an app that solves it for you in minutes.

* Instead of coming up with a very well informed opinion about everything relevant in today's politics, listen to trusted others who have taken the time to form opinions on the matter.

* Instead of trying to "earn" that promotion by working 80 hour weeks and "keeping your head down" at your office, apply for a different job elsewhere that offers better pay and work/life balance.

As most of us here are programmers, we all know the benefits of greedy algorithms vs brute-force solutions. Yes, sometimes a brute force solution can be very satisfying, but taking "smart" shortcuts in life really does pay off, whether we like it or not.

And before you tell me that I'm probably one of those millenials who doesn't do anything and thinks everything will just be handed to them: well.. yeah, that's kinda true. I've never worked at a single job for more than a year, I've never really put more effort into my education than what was strictly needed to pass (and sometimes less), and now I'm a data engineer at Apple.


Thanks for saying this.

There is always a generational tendency to point out that the next one has it easy or that they are weak because $OBSERVATION. I would like more folks to counter that. I’m a millennial but absolutely love how Gen Z is incredibly adept at navigating the always online culture, calling bullshit on dated traditions around work ethics and so on.

You can look at change and either pat yourself on the back for being better for having overcome challenges they didn’t have to. Or you can see what other generations bring to the table and work with that.


There is a big part of gen Z that is about working hard and grinding it out, but to grind it out on the right shit. Grind smart and hard, not just hard!


I would hate to work with a person who subscribes to these strategies. Someone who can't form their own opinion and looks for the easy way out above all else.

Suddenly anyone in the future with the ability for critical thinking and problem solving beyond "do they have an app for that?" is going to inherit the Earth.


You automate the solved, so you can focus on the unsolved. The unspoken conclusion to that. It's how humanity progresses.

We don't do our laundry manually anymore either for the most part in the developed world, and we are fine!

Also if you talk to your parents, you'll find out you probably had many instances of a lack of 'grit' in early childhood, but you forgot.


> * Instead of trying to "earn" that promotion by working 80 hour weeks and "keeping your head down" at your office, apply for a different job elsewhere that offers better pay and work/life balance.

I think the reason the "head down" strategy doesn't work so well now is at least partially because it's still the dominant approach. Some time after it becomes the exception, it may become the path to success it once was.


My biggest problem with this: this effect does not affect only children. I see students learning to program giving up at the first syntax error; some don't even care about reading compiler messages and trying to fix them.

The first successful code I wrote was the following:

10 input a 20 input b 30 print a+b

I was around 12, without manual or online help and it was trial and error for an entire weekend until I got this right. Very few people I know today used to tech would have such perseverance.


> My 8 yo son is playing it now, he knows all the modern consoles, but this is challenging him. He is frustrated things are hard from the beginning, jumps don't work right away and he stopped after a few minutes. I remember my perseverance as a kid.

That’s why it’s your parental responsibility to start playing games with your kid early, starting with the oldest consoles up to modern times: https://medium.com/message/playing-with-my-son-e5226ff0a7c3


This is really good. In the meantime my Chinese parents who believe video games are evil and whoever make them are moral monsters will only agree that I try something similar for my son over their dead bodies.


Hmm I see the exact opposite. If I wanted to know how something worked or how to build something I had to go to a physical library and hope some dusty encyclopaedia had a minimal entry, and if I needed supplies it would be a specialist catalogue.

If my daughter wants to know how something works she can find a brilliant well-produced video on YouTube of an expert explaining it, and she can easily buy tools and supplies from anywhere in the world for esoteric hobbies.

From what I see the next generation are far more practical and hands on and involved in constructive and creative hobbies than mine was. When I see young people’s resumés today they are frighteningly practical and talented in advanced hobbies.

Sometimes I worry about how to keep up and compete with them!


> I see my kids don't have much of these challenges, everything works for them.

This is one of the reasons I recommend teaching kids C++ early.

Between build systems, ABI issues, compiler error messages, and undefined behavior it really builds perseverance and a great sense of accomplishment when your program compiles and runs correctly.

I am not aware of any other production language that gives that sense of accomplishment and requires that level of perseverance.


This comment hits the nail on the part just between eyes.

There is an effort we can put in teaching our kids c++ and even better if we can start them on leetcode at an early age

This will help them improve their problem solving ability and they will also get frustrated when they are not able to solve a hard graph problem.

But the hardest problem never is the problem itself, but the inability to keep on going when the problem seems very hard.

When kids learn how to handle that and when all the kids in the world know how to handle that, then surely we are looking at a future generation that will help solve all the hard problems that we are not able to solve like World Proverty, income inequality and global warming.


I can't tell whether this satire.


To be fair, as an old player of PoP back in the day, I still think the jump controls were pretty shitty in that particular game. Please jump when my optical nerves tells me the signal that I want to jump and I convert that into a physical action. Otherwise it feels like if I was playing a screen-captured game on a faraway computer through WebRTC streaming.


I think a key part of the puzzle of PoP was the precise controls it asked from you. Also I get a feeling they assume you read the manual, because there are a bunch of unintutive controls it explains in there. When I was a kid playing it, I didn't realize there was a manual: http://www.abandonia.com/files/extras/26916_Extra%20document...


I never felt the controls where shitty, it just felt like jumping needed some foresight and that was part of the fun, just like jumping in real life requires you to bend down your knees first before actually getting some air; even in modern games I get that feeling, like how in Dark Souls you have to time the parry and pressing the button does not instantly makes the shield teleport in front of the character.


I guess you're right but in PoP it feels more like an arbitrary latency that you were required to learn. OTOH I guess I was spoiled by games like Super Mario World (the very first videogame I ever played), where jumps are instantaneous.


I recall being as a teenager hearing of Linux and distros on the internet in the early 2000s and experimenting with different ones. Not sure what motivated me, but everytime things would break and I'd google and try fixing it myself so that the rest of the family could use the same one computer. Perhaps Linux can still function the same and help pose a challenge to kids these days too.


This is an interesting take. I was speaking with my brother about the Genesis game Shinobi (part 3). What drew me to it was that it was so hard. You had to concentrate and really get good at it if you needed to play the game and reach the (rather disappointing by modern standards) end.

Modern games which I've played are more like movies with a limited amount of interactivity. Maybe it's just generational but I do think there's a good amount of "dumbing down" in not just games but educational and other content in general.

Apart from that, I was tickled at playing this. I used to smuggle this game from friends at school on 2 5.25" double density disks. There was so much trouble to get games and play them. Damaged disks, the fear of getting caught by the school staff, "friends" who would give me games other than the ones we agreed upon. Hard to imagine a world like that in a world where I can type a URL into a browser and play the game.


I had countless selfmade bootdisks to config DOS to play games. Almost every game did need it's own bootdisk.


Then again, it's much easier to branch out and build your own games now. .

I dislike Roblox since at that point you might as well open up Unity and ship your own game. That's how I learned to program in my early twenties, a bit later than most of y'all


How was this achieved? Who is the author? I would love to see other retro games!


Teach him Factorio. It's not frustrating but you need to work to get good layouts done.


There is also Satisfactory which is more 3D but I haven't played either so can't compare.


You say this while games like FTL exist :)


Great job! It's amazing to be able to feel again the sensations I had 30 years ago while developing the Atari version of this game. Thanks again!


Then, thanks a lot. I spent countless hours on this very version !


You are very welcome! From time to time I meet people that played that PoP Atari version and each time it is heartwarming. Thanks.


Oh, Atari ST; I assume that's where the graphics for the JS edition are from? It looks far to good to be the Apple version...

[edit]

Looks like there were many ports with similar looking graphics: https://www.mobygames.com/game/apple2/prince-of-persia/scree...


The graphics and sound are from the PC version.


Was that version ever released? We're you at Broderbund at the time? :-)


Yes of course it was released ;-) https://www.youtube.com/watch?v=aIscoVqTwpY And yes, I was working with Broderbund (from Paris) at that time, it was a great time! Translating 6502 Apple II code to Atari 1040ST 68000 code was funny...


Interesting... Care to share what was overall approach? I. E. More bottom up in literally translating instructions and assuming it will lead to same results if translated accurately enough ; or top down looking to code specific results / behaviour and using original code more as a reference... Or some other approach :)


Um, that was really a long time ago...

As I can remember, my approach was the first one: "bottom up in literally translating instructions and assuming it will lead to same results if translated accurately enough". That was not to difficult to achieve.

The funny thing was that Jordan Mechner used every bit of available memory in the Apple II computer, so I had to be very careful ;-)

Then the hard part: create the input and output codes that were totally different on the two computers, then the code for sounds and music also totally specific and then I wanted to have better graphics. So I ended up by creating a sprite editor, in assembly language, for my graphic artist colleague so that we can recreate all graphic assets and put color in it...


Is still Paris a great place to develop games? I heard that the studio responsible for Netflix's 'Arcane' AKA 'League of Legends' TV series are in Paris [1]

[1] Fortiche Productions, a small Paris-based studio who specializes in creating animated projects with a unique blend of 2D and 3D art. src https://www.techradar.com/news/inside-arcane-netflixs-animat...


Yes Paris is still a great place to develop video games (even if I'm not anymore in this field).

Here is a link to interesting and creative French game people and projects (it is in French, so here is a Google translated version: https://gamingcampus-fr.translate.goog/tomorrow-lab/gaming-i...)

Outside of Paris are also great teams like the Asobo teams in south west of France who developed Microsoft Flight Simulator 2020...



Yes it is this one!


Did you, by any chance, work on "Stunts" at Broderbund too? There's a reverse engineering effort around http://forum.stunts.hu/ that would dream to have a glimpse of the source code :)


I'm really sorry, I did not work on "Stunts". I was also developing at that time a Formula 1 game, that was finally not released.

With Broderbund I worked on:

- Showoff (https://www.whatisthe2gs.apple2.org.za/show-off-/), a kind of PowerPoint software

- Downhill Challenge (port from Atari to Apple II GS - https://www.youtube.com/watch?v=6V5JZGHox7I)

- Prince of Persia (port from Apple II to Atari ST)


Thank you, I enjoyed playing the Atari ST version of PoP many years ago, I remember it as one of the best games of the time!


You are very welcome! I thank Jordan Mechner for creating this game and the Broderbund team for letting me be part of this extraordinary adventure...


No problem, thank you!


So many memories playing this, thanks!

I expected after finishing level 1 to see the “page 4 line 2 character 6” challenge room, where you were supposed to prove you owned the official manual.

When I was a kid we had it on floppy disk but never had the original book, and I remember diligently filling in a table of failures each time I drank the wrong letter and died. Eventually I got them all!

Because of this I remember level 1 extremely well :D


This! Somewhere down the line we managed to get a copy of the manual — we played a lot more after that!


Can you add action buttons? The directional buttons were easy enough to infer, but not sure what other types of input are possible. (I’m on mobile)



I'm not on mobile and I also cannot figure out where the action button is. One can get as far as finding the sword, but I have to idea how to pick it up.


Seems like the controls are the same as the original!

Use the Shift key to pick up the sword. And I think Space to attack and the Up cursor key to block when you get to the swordsman.


I'm using a Windows laptop with an external USB keyboard. The Shift key didn't do anything. But the Shift key on the laptop's own keyboard worked.


i just tried it on mobile and i am very impressed.

the movement controls are very intuitive. they don't hit accurately but they work in an intuitive way. i tapped the four directions and four quadrants of the play screen. and the character responded as i expected.

i am with you though. i have no idea how i will use the sword when i get it.


Interesting. Only the four direction buttons work for me, regardless of num lock setting. eg 2, 4, 6, 8. None of the corner buttons nor middle button have any kind of effect.

This is when using Firefox on Linux, and using a standard 101-key external keyboard.


Slash sword is the middle tap. Took me awhile to figure that out but makes sense now that I know since you can't slash backwards.


How do you walk forward slowly? Tapping bottom edges does “run” action for me.

Edit: figured it out, tap on the center and swipe to the left/right to walk.


Hm, I couldn’t get it to work on my iPhone (not that I actually expected it to) - I could do some things but the controls didn’t seem to work consistently.


I managed to get halfway through level 2 on my phone. I think the screen is a 3x3 button grid. Center is 'action' for swords and potions.


Tap on the screen at diagonals. It’s location context aware.



was gonna say the same thing XD


I was fully expecting this to be an emscripten to Web Assembly port but was delighted to see that this is built with Phaser[1] from scratch! Great job! Feels just like it did when I originally played it.

1 - https://phaser.io/


It's accurate.... I suck at this as much as I suck at the original.


This was my thought, as well...


If you haven't seen Jordan Mechner talking about the development of Prince of Persia yet (definitely recommended): https://www.youtube.com/watch?v=sw0VfmXKq54&ab_channel=ArsTe...


He published a book containing his journal entries from the time as well:

https://jordanmechner.com/store/the-making-of-prince-of-pers...

My notes about it:

https://mtlynch.io/book-reports/making-of-prince-of-persia/


This is great and I also enjoy https://github.com/NagyD/SDLPoP where my favourite feature is the ability to take a screenshot of the whole level... which usually fits well within my 4K display.

Oh, and playing at 3840x1200 means that every original 320x200 pixel is ... 144 pixels!


This was also ported to Roku, and is the best game I've played on Roku

(remember when Roku was going to be a Wii competitor, with the fancy motion remote?)

https://github.com/lvcabral/Prince-of-Persia-Roku

It has a 9 screen (3x3) mode that is pretty cool to see on a big TV.


I had no idea Roku had games (!!)


This is awesome. Brings back so many memories as a kid. Thank you. This is built with phaser. I am not very good at this game but if you need to recover life mid game, you can use this.

Phaser.GAMES[0].state.getCurrentState().ui.player.addLife()

Is this open source?



Love that the cheats are just program statements that can be understood, instead of some obscure rom or memory hacking. This is how software always should have been like.


One of the most valuable lessons I learned early on from hacking the binaries of savegames is that if you make it too easy, it stops being fun.

And yet, I still sometimes go to places like flingtrainer.com when a game "feels too hard" for me (and therefore is also not fun... the recently-released 2021 "Dark Alliance" is one example)

I think editing game state should be "difficult, but not impossible". The thing is, if it's "difficult", then someone somewhere's just going to make a free save editor...

"Fun" is a delicate balance in these things and probably varies by person. For example, I CANNOT STAND inventory management in games (it's not immersive, it's WORK!) so Skyrim became 100% more fun once I figured out how to console up my carryweight (and installed a mod to make the inventory UI searchable/sortable by type). To me, all this did is prevent me having to spend time traveling in-game back to a home stash to retrieve some odd thing and then traveling all the way back... that's literally "work, inside a game" to me, and takes away time better spent exploring, questing, fighting etc. Similarly, I have no idea why Blizzard limits Diablo 2 stash size (I mean... the extra database cost has to be practically... negligible for them?) because all it does is cause lots of login/logout churn for them as people switch off to mule characters to hold all their set items/uniques/runes/etc.


this really depends on the developer though....


It’s probably this: https://phaser.io/

Which is open source.


I just spent the last five minutes playing this with a huge grin on my face. Thanks for the quick trip down nostalgia lane.



Prince of Persia is very reminiscent of Aztec:

https://en.wikipedia.org/wiki/Aztec_(video_game)

The basic idea is the same in Aztec: you control a character that descends into a multi-level tomb. Like in PoP, there isn't any sideways scrolling. You step from screen to screen sideways, or fall through traps or go down stairs and such.


The game's controls feel exactly as frustratingly washy as I remember them. Amazing.


They always felt super precise to me, without requiring a lot of dexterity.


Lizard man spotted...


I can finally pass levels by just changing the url query


Was just going to comment this, can even increase the health bar now :)


Oh this is soo good!

Now, would someone kindly reimplement the Railroad Tycoon? Pretty please?...


You might like this one: https://www.openttd.org/


> Railroad Tycoon

Transport Fever?


Thank you very much. This just ruined my productivity for January :-)


It must be at least 20+ years since I played this game and yet can remember the controls correctly (up + side arrows to jump) even though I haven't used this combination in any other game since.


Muscle memory is a hell of a drug.


IIRC, PoP was revolutionary in the way the character moved. It was fluid and natural. A big step up from a blocky character just moving around with no motion. I remember being mesmerized as a kid in Jr High on the C64 when it came out and it was unlike any game before, at least that I recall. Jumpman[1] was similar in that respect, but less detail since the character was a lot smaller.

[1] https://www.youtube.com/watch?v=ut3LFdJS_lk


What a nice Christmas gift! Takes me down memory lane.


I think the spikes behave a bit differently than original, but I haven't compared. You can't run through them because they will activate and kill you, but you can slow walk safely. But in this implementation I slowed walked right on top of them (they activated but didn't kill me - that's correct) and then I started to run and I was killed instantly.


You are correct, they are more sensitive here. They also kill you even if a guard is already impaled on them, which they did not in the original.


You have to be well clear of the spikes to run, I recall quite the number of starting again back in the day due to this, as I was impatient.


Thanks for the little trip back into my childhood years! first time I played this game was on an old Windows 95 back in January 2001, indeed a long time ago. . .

I played the game 10 years ago in an DOS emulator and while the feeling was a bit different (details hereafter), the graphics are spot on.

About the mechanics, the kid shouldn't get killed instantly while beginning to run over an already triggered pike. furthermore, there is a a bug in level 4 where the game freezes while attempting a jump over the gap that takes us to the mirror room. Also the fat guard on level 5 seems to be less reactive than in the original game. I'm saying that because the level 8 guard is still as annoying as in the original game if not more :D

Maybe I'm rusted but I ran out of time at level 8


I'm interested in the tech behind this. Most javascript game stuff I've tried on my iPhone have had issues because of safari "helpfully" scrolling or zooming or showing the address bar when tapping or swiping. This one doesn't seem to do that for me. What's the trick?


The css directives here are probably a part of the answer:

https://github.com/oklemenz/PrinceJS/blob/master/assets/web/...

And also see the <meta name="viewport" ... values in the page itself.


This seems to be the corresponding repo? https://github.com/ultrabolido/PrinceJS



Quite impressive, it's amazing how embedded that "stop" animation the character does when he runs in my memory, used to play this quite a bit when i was small



This is fantastic, thanks for linking it! Yes like GP I haven't played this game in more than 2 decades but the movements are still etched into my memory, and how brutal the difficulty is.

I used to love two games at the time, this and Zak McKraken and the Alien Mindbenders. I managed to played the latter to completion in my teenage years, but I never finished PRINCE.EXE, perhaps it's time...


https://m.youtube.com/watch?v=ZW_eExHpTZI

There is a link in the description of the video you shared to an extended version showing more how the animations were created from videos.


Volume buttons please.


This is a constant gripe for me. If you're going to play audio on your website, you really should provide a volume control.


Why? You have global volume control, music players have it. To me it's the same as asking every website for brightness adjustment bar or font size control.


I've been working on an audio player for my current project and debated whether to include a volume control or not. This led me to realize how different the experience is depending on the OS.

On macOS and mobile, the vast majority of users are used to controlling the volume with hardware buttons. There are many media players that do not include a volume control precisely because of this (eg: Apple's podcast player for the web).

On Windows and Linux, users do not always have hardware volume controls so the majority of users are accustomed to doing that in the media players themselves.


Because we don't want to have to readjust everything else around your special snowflake site?


I mean it sincerely. Are you listening to something else while using a website with sound? I usually just pause the music.

If it's some music/podcast isn't it more handy to have a known volume knob on that instead of finding one on every website?

I don't care about the right opinion. I'm just curious about scenarios where lack of volume control is a problem.


Hear, hear.

I know where my computer's volume controls are - and if I have a keyboard with volume controls, that's what they work on. I almost never want to touch a specific app's or website's volume control... unless its volume is way too soft even at max system volume.

Basically, I don't need a gazillion interfaces. One suffices. Just don't go out of your way to make that generic, system-wide interface insufficient for your app and it'll be fine.


Suppose you use different apps that output sound. I use audacious, Firefox (Youtube) and mplayer on a regular basis. All these have their own volumes adjusted at different levels. Having a single volume isn't good enough. One app would be too loud and another too quiet. Plus I'm used to being able to change the volume on one app without affecting the others. Not having this control would be annoying.


I think you answered your own question. Not everyone needs just a single audio-playing app at the same time.

Audio is also things like warning sounds, it isn't just music and games.


Yes, discord and twitch stream at minimum.


Hmmm, pulseaudio volume control allow me to change the volume and device used for every single source (app, firefox tab...) I am running.


Why isn't this built into the browser? Volume per tab or something.


You can mute a tab. That's something.


Gotta wait for web 4.0 for that


On Linux at least, it is


Prince of Persia is a fun game. I never really got beyond level 6 without cheats, and the time limit always got me.

A year ago I wanted to really finish it the intended way, so I did a challenge - I'd play the game, but whenever I died, I start from the beginning. Took me about two days to get a no death run, but I managed to do it. Had about 18 minutes left of the ingame clock.


It's neat to see this in a browser, but I never really liked playing the game. The visuals are cool, but the life-like movement always annoyed me.


Why?


It's weird that the character 'overruns' like in a cartoon and makes control quite annoying.


Kind of "uncanny valley"


Can you tell more about this project? Is this wasm?


Incredibly hard to play on a phone. The fact that swipes on a screen actually does something is impressive nonetheless.


Great game! I am wondering though why the prince of Persia has blonde hair with a white skin tone. I know this came out in '89 or so, still even for this time it seems kind of silly since I think even back then everybody knew Arabs don’t have blonde hair


Damn. I used to pass this game without dying in ~35 minutes or so. There goes my next few hours, I guess...


Hope you don't mind I decided to start with 9 health hearts... because I always sucked at this game...


Very cool that you allow to set the initial params via querystring. Starting with more health/life is a nice addition to make it easier/harder

    ?level=1 &health=9 &time=59 &strength=100 &width=0


I used to play this in college in the back of the classroom in DOSBox. I was good enough at it that I would only need to look at the screen on occasion, so the instructor wouldn’t notice, and almost had the key sequences and time to hold in muscle memory.


Soooooo, walkthroughs weren't a thing when you were kids? They definitely existed for every space/police/kings quest game, and many others.

I'm not sure things are so different now, perhaps we are looking at the past through rose colored glasses.


Not really, there were magazines where you could ask questions - and some cheats were provided. If you were badly stuck and you had no buddies playing the same game you would be just stuck.


Where did you watch walk-thrus in the 80s?


You bought books. At the same store you bought the games.


Exactly, and in every gaming magazine you bought.


Played it first on my Windows 98 PC or was it the counterfeit nintendo ? I don't exactly remember, but me and my big bro had a blast playing this during the early 2000s. Did not remember the jumps were this dysfunctional tbh.


If anyone's taking requests: Dangerous Dave/Road rash pls


And if it’s automated, all dos games, please!



Fighting is really difficult (on level 5). I'm wondering if it's supposed to be this way or not. I don't remember how it was in the original.


Key Up is your friend


It's too laggy.


Thank you! It's fascinating that I still remember the controls all these years later. One of the very few games I completed - without cheats, mind you!


Oh my god, I was just happy with myself for beating Sekiro a few hours ago and now I'm having my ass kicked by a 30 years old game. Great job!


Ow wow! I remember that the sounds were so real after I purchased a sound card!

I am still amazed by the animations. They are still looking very good. Great game.


I kindda expected a WASM project, but this looks to be a full port? Amazing and it's very readable as well


I found the input latency made this unplayable.


The prince doesn't stop on a dime, this was a design choice. This recreated version plays the same as it did on OG hardware. If you're having difficulty, focus on holding and releasing the inputs and think of it as applying acceleration, where you want to release before you want the object to stop.


The controls are very similar to the original, however there's somethings you can't do like step then crouch.


Interesting. I think you can but the animation is way clumsier? I was testing against https://archive.org/details/msdos_Prince_of_Persia_1990


That's false. The controls are identical to the original and you can indeed step then crouch (⇧+→ ↓).


It was exactly the same in the original game, that what made it difficult to play back in the days


Indeed. You can compare it to emulated version. https://www.retrogames.cz/play_102-DOS.php?language=EN

Feels exactly the same.


It's an acquired skill. I remember hating it, then adapting.


It feels very much like the original game.


To me, there is a very large difference between the original game in an emulator and this.

It appears that this is using http://phaser.io/ and is a complete rewrite of the original game.


Yeah, not to take away from the great work that the author put into the game but it indeed feels very very different to the original.


Yeah, it’s a lot of very small things but they add up, especially in such a game where there is often a fine line between surviving and dying.


How do you unpause the game? Hiding the tool bar in Safari on iOS pauses the game but there's no way to unpause...


Oh man I hate this game so much. What a blast from the past :) Very cool to see it reproduced like this though!


Never played the original.

Are there any controls besides the arrow keys? None of the other keys I pressed seemed to do anything.


Shift for walking, hanging, picking up, fighting...


Thanks.


I've gotten further in this version than any other I can remember. Great work with the mobile controls.


I don’t know how I did it but I teleported to level 2 before even leaving the first screen of level 1.


Someone should make Dave, or Volfied. Spent way too much time playing those back in the day.


Wow! this is too good except for the sound though which seems a bit modern to me.


Sound is definitely the same as the Amiga version at least.


You're probably right. Though I played it originally on a 286 with a simple internal speaker and it sounded a lot more basic.


Adlib/Sound Blaster gave you a similar experience, although I also like the PC speaker version better.


What the hell are the controls? I can't figure out how to swing the sword.


Controls are same as original (linked) where on desktop the arrows are joystick and shift is your joystick button. On mobile it's covered elsewhere in the comments (it's screen controls)

http://www.abandonia.com/files/extras/26916_Extra%20document...


>Controls are same as original (linked)

Is it? Num7/9 don't work regardless if num lock is on or not.


It's part of the experience. I remember it taking me a long time to figure out on my 386DX.


Pirate. ;-)


Oops. In my (8yo) defense at that point in time I had no idea that games can be bought.

* I think I'm still somewhat afraid of sliding doors ;)


After you start you can edit the url and change your life bar. More fun IMO


Just as hard as I remember


This is awesome, takes me back to my childhood. Thanks for making this!


After you start you can edit the url and give yourself more life


Thank you ! I loved this game, sensations are exactly the same.


Does anyone know how the game was implemented in JavaScript?


Here's the source code: https://github.com/oklemenz/PrinceJS


Wonderful programming and the game too. Great effort. Kudos.


Is it just me or the Space key for jump is not working?


UP arrow for jump.


there was a similar game to purchase on the old pre-WiFi Sony Ericsson phones where the marketplace and checkout system was squashed into ~240x160px


So many days spent playing this game. Good old days.


Serious question: is the game beatable in 60 mins?



So fucking good it felt like the 90s again. :)


Nice work. How did you generate the assets?


Is this playable without a num pad?


Yes. Just like the original.


Do you mind telling me how? I looked in the manuel other people linked, but the "mac" key controls (using u,i,o,j,k,l) don't work. The directional keys (up, down, etc) work but then I can't use combat because I don't have a numpad.


in the original DOS version you used shift to strike and up to block.


extremely well done, even the same quirks when jumping up and not directly under the edge!


there is a bug in level 1, I lifted the sword but it still appeared on the ground.


So much nostalgia! Thanks!


I really admire thisss guy


no you don’t


Is this open source?


You made my day


Good memories


the difficulty is maddening just as I remember it :)


Finally, a thought is able to form from the depths of my mind - the netflix noise is just straight up the falling noise from prince of persia!


TIL there is a whole story behind the "ta-dum" sound (which is also its name, btw) and that the core of it is a wedding ring rapping on a cabinet:

https://www.news24.com/channel/tv/news/the-story-behind-the-...



OF COURSE they used Brian Eno...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: