17 ms·
Prince of Persia in JavaScript
- febin 5y agoCheats https://princejs.com/?level=2&health=3&time=59&strength=100&width=0 https://princejs.com/?level=2&health=3&time=59&strength=100&... You can change the parameters here.
- kottaram 5y agowas gonna say the same thing XD
- astronautjones 5y agoFinally, 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!
- pmarreck 5y agoTIL 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-netflix-ta-dum-sound-20200812-2 https://www.news24.com/channel/tv/news/the-story-behind-the-...
- FrankyHollywood 5y agonice story, reminds me of https://www.mentalfloss.com/article/50824/creating-windows-95-startup-sound https://www.mentalfloss.com/article/50824/creating-windows-9...
- pmarreck 5y agoOF COURSE they used Brian Eno...
- krisgenre 5y agoWow! this is too good except for the sound though which seems a bit modern to me.
- dissent 5y agoSound is definitely the same as the Amiga version at least.
- luckydata 5y agothe difficulty is maddening just as I remember it :)
- otagekki 5y agoThanks 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
- omgitsabird 5y agoI found the input latency made this unplayable.
- argc 5y agoIt feels very much like the original game.
- omgitsabird 5y agoTo 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/ http://phaser.io/ and is a complete rewrite of the original game.
- deleted 5y ago[deleted]
- therein 5y agoYeah, 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.
- spider-mario 5y agoYeah, 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.
- usaphp 5y agoIt was exactly the same in the original game, that what made it difficult to play back in the days
- gajus 5y agoIndeed. You can compare it to emulated version. https://www.retrogames.cz/play_102-DOS.php?language=EN https://www.retrogames.cz/play_102-DOS.php?language=EN Feels exactly the same.
- ncfausti 5y agoCan 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)
- cheschire 5y agoTap on the screen at diagonals. It’s location context aware.
- blondin 5y agoi 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.
- unityByFreedom 5y agoSlash 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.
- surajs 5y ago
- wruza 5y agoHow 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.
- justinclift 5y agoInteresting. 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.
- mikeytown2 5y agoIncredibly hard to play on a phone. The fact that swipes on a screen actually does something is impressive nonetheless.
- screed 5y agoVolume buttons please.
- bhrgunatha 5y agoThis is a constant gripe for me. If you're going to play audio on your website, you really should provide a volume control.
- comboy 5y agoWhy? 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.
- ikiris 5y agoBecause we don't want to have to readjust everything else around your special snowflake site?
- comboy 5y agoI 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.
- Beldin 5y agoHear, 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.
- computershit 5y agoI just spent the last five minutes playing this with a huge grin on my face. Thanks for the quick trip down nostalgia lane.
- Waterluvian 5y agoI don’t know how I did it but I teleported to level 2 before even leaving the first screen of level 1.
- orliesaurus 5y agoHope you don't mind I decided to start with 9 health hearts... because I always sucked at this game...
- shmerl 5y agoYou can also check: * https://archive.org/details/msdos_Prince_of_Persia_1990 https://archive.org/details/msdos_Prince_of_Persia_1990 * https://archive.org/details/msdos_4D_Prince_of_Persia_1994 https://archive.org/details/msdos_4D_Prince_of_Persia_1994 * https://archive.org/details/msdos_Prince_of_Persia_2_-_The_Shadow__The_Flame_1993 https://archive.org/details/msdos_Prince_of_Persia_2_-_The_S...
- snihalani 5y agoIf anyone's taking requests: Dangerous Dave/Road rash pls
- amznbyebyebye 5y agoWhat a nice Christmas gift! Takes me down memory lane.
- aenis 5y agoOh this is soo good! Now, would someone kindly reimplement the Railroad Tycoon? Pretty please?...
- nope96 5y agoThis 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 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.
- pmarreck 5y agoI had no idea Roku had games (!!)
- anandsuresh 5y agoSo fucking good it felt like the 90s again. :)
- NithurM 5y agoYou made my day
- riskneutral 5y agoThis is awesome, takes me back to my childhood. Thanks for making this!
- Andrew_nenakhov 5y agoDamn. I used to pass this game without dying in ~35 minutes or so. There goes my next few hours, I guess...
- livinglist 5y agoI really admire thisss guy
- livinglist 5y agono you don’t
- Sniffnoy 5y agoWhat the hell are the controls? I can't figure out how to swing the sword.
- deleted 5y ago[deleted]
- comboy 5y agoIt's part of the experience. I remember it taking me a long time to figure out on my 386DX.
- djmips 5y agoControls 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_Manual.pdf http://www.abandonia.com/files/extras/26916_Extra%20document...
- thrdbndndn 5y ago>Controls are same as original (linked) Is it? Num7/9 don't work regardless if num lock is on or not.
- therein 5y agoSomeone should make Dave, or Volfied. Spent way too much time playing those back in the day.
- sagia 5y agoQuite 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
- arn 5y agoyou might enjoy this https://www.youtube.com/watch?v=wKgLfqOVHco https://www.youtube.com/watch?v=wKgLfqOVHco
- 1_player 5y agoThis 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...
- ximeng 5y agohttps://m.youtube.com/watch?v=ZW_eExHpTZI 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.
- hasitseth 5y agoWonderful programming and the game too. Great effort. Kudos.
- mehrdada 5y agoI 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.
- deleted 5y ago[deleted]
- jclevy 5y agoGreat 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!
- NikolaNovak 5y agoWas that version ever released? We're you at Broderbund at the time? :-)
- Fuzzwah 5y agoCould be the Atari ST version https://www.mobygames.com/game/atari-st/prince-of-persia https://www.mobygames.com/game/atari-st/prince-of-persia
- jclevy 5y agoYes it is this one!
- dreadnaut 5y agoDid you, by any chance, work on "Stunts" at Broderbund too? There's a reverse engineering effort around http://forum.stunts.hu/ http://forum.stunts.hu/ that would dream to have a glimpse of the source code :)
- jclevy 5y agoI'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-/ 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 https://www.youtube.com/watch?v=6V5JZGHox7I) - Prince of Persia (port from Apple II to Atari ST)
- max_ 5y agoSo much nostalgia! Thanks!
- dirkk0 5y agoThis seems to be the corresponding repo? https://github.com/ultrabolido/PrinceJS https://github.com/ultrabolido/PrinceJS
- dasefx 5y agoI think is this one https://github.com/oklemenz/PrinceJS https://github.com/oklemenz/PrinceJS
- heroku 5y agoNice work. How did you generate the assets?
- halt40 5y agoIt'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.
- aniijbod 5y agoWhy?
- ricardobayes 5y agoIt's weird that the character 'overruns' like in a cartoon and makes control quite annoying.
- pantulis 5y agoKind of "uncanny valley"
- dgerges 5y agoThank you ! I loved this game, sensations are exactly the same.
- lisperforlife 5y agoThis 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?
- ariedro 5y agoLove 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.
- VMtest 5y agothis really depends on the developer though....
- pmarreck 5y agoOne 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.
- 5y ago
- fareesh 5y agoAfter you start you can edit the url and change your life bar. More fun IMO
- fareesh 5y agoAfter you start you can edit the url and give yourself more life
- wilhil 5y agoIt's accurate.... I suck at this as much as I suck at the original.
- ChrisMarshallNY 5y agoThis was my thought, as well...
- jstummbillig 5y agoThe game's controls feel exactly as frustratingly washy as I remember them. Amazing.
- luisnuxx 5y agoSo many days spent playing this game. Good old days.
- nojs 5y agoSo 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
- sparker72678 5y agoThis! Somewhere down the line we managed to get a copy of the manual — we played a lot more after that!
- thanatos519 5y agoThis is great and I also enjoy https://github.com/NagyD/SDLPoP 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!
- edgarvm 5y agothere is a bug in level 1, I lifted the sword but it still appeared on the ground.
- coryk135 5y agoHow do you unpause the game? Hiding the tool bar in Safari on iOS pauses the game but there's no way to unpause...
- 867-5309 5y agothere was a similar game to purchase on the old pre-WiFi Sony Ericsson phones where the marketplace and checkout system was squashed into ~240x160px
- FrankyHollywood 5y agoAwesome! 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.
- 999900000999 5y agoThen 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
- micmankos 5y agoYou say this while games like FTL exist :)
- mgh2 5y agoHow was this achieved? Who is the author? I would love to see other retro games!
- atomflunder 5y agoIf 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.
- Daniel_sk 5y agoI 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.
- spider-mario 5y agoYou 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.
- magicalhippo 5y agoYou 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.
- kristianpaul 5y agoGood memories
- krisgenre 5y agoIt 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.
- appel 5y agoMuscle memory is a hell of a drug.
- norswap 5y agoIs this playable without a num pad?
- Narishma 5y agoYes. Just like the original.
- norswap 5y agoDo 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.
- skocznymroczny 5y agoin the original DOS version you used shift to strike and up to block.
- bgitarts 5y agoIs this open source?
- lleb97a 5y agoI've gotten further in this version than any other I can remember. Great work with the mobile controls.
- ajdoingnothing 5y agoIf 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=ArsTechnica https://www.youtube.com/watch?v=sw0VfmXKq54&ab_channel=ArsTe...
- mtlynch 5y agoHe published a book containing his journal entries from the time as well: https://jordanmechner.com/store/the-making-of-prince-of-persia/ https://jordanmechner.com/store/the-making-of-prince-of-pers... My notes about it: https://mtlynch.io/book-reports/making-of-prince-of-persia/ https://mtlynch.io/book-reports/making-of-prince-of-persia/
- atum47 5y agoCan you tell more about this project? Is this wasm?
- pedro2 5y agoSerious question: is the game beatable in 60 mins?
- Sammi 5y agoYes. Source: https://www.youtube.com/watch?v=6dOhUCvqV7o https://www.youtube.com/watch?v=6dOhUCvqV7o
- hrithwikbha 5y agoI can finally pass levels by just changing the url query
- shmde 5y agoWas just going to comment this, can even increase the health bar now :)
- aledalgrande 5y agoextremely well done, even the same quirks when jumping up and not directly under the edge!
- benstrumental 5y agoDoes anyone know how the game was implemented in JavaScript?
- aix1 5y agoHere's the source code: https://github.com/oklemenz/PrinceJS https://github.com/oklemenz/PrinceJS
- tdrdt 5y agoOw 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.
- beardedwizard 5y agoSoooooo, 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.
- ricardobayes 5y agoNot 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.
- TedDoesntTalk 5y agoWhere did you watch walk-thrus in the 80s?
- egypturnash 5y agoYou bought books. At the same store you bought the games.
- beardedwizard 5y agoExactly, and in every gaming magazine you bought.
- pow_pp_-1_v 5y agoThank 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!
- mysterydip 5y agoI'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?
- gregsadetsky 5y agoThe css directives here are probably a part of the answer: https://github.com/oklemenz/PrinceJS/blob/master/assets/web/game.css https://github.com/oklemenz/PrinceJS/blob/master/assets/web/... And also see the <meta name="viewport" ... values in the page itself.
- kazinator 5y agoPrince of Persia is very reminiscent of Aztec: https://en.wikipedia.org/wiki/Aztec_(video_game) 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.
- deleted 5y ago[deleted]
- flanbiscuit 5y agoI 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/ https://phaser.io/
- martinsuchan 5y agoIs it just me or the Space key for jump is not working?
- shmde 5y agoUP arrow for jump.
- jonnycomputer 5y agoNever played the original. Are there any controls besides the arrow keys? None of the other keys I pressed seemed to do anything.
- Geee 5y agoShift for walking, hanging, picking up, fighting...
- jonnycomputer 5y agoThanks.
- shmde 5y agoPlayed 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.
- cronix 5y agoIIRC, 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 https://www.youtube.com/watch?v=ut3LFdJS_lk
- arepublicadoceu 5y agoOh 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!
- wantsanagent 5y agoOh man I hate this game so much. What a blast from the past :) Very cool to see it reproduced like this though!
- Geee 5y agoFighting 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.
- chromejs10 5y agoJust as hard as I remember
- NKCSS 5y agoVery 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
- NKCSS 5y agoI kindda expected a WASM project, but this looks to be a full port? Amazing and it's very readable as well
- skocznymroczny 5y agoPrince 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.
- L0g4n 5y agoGreat 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