Live data from Hacker News

Prince of Persia in JavaScript

princejs.com

141–150 of 237 posts

Re: Prince of Persia in JavaScript

#141
post #76
post #7

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.

Re: Prince of Persia in JavaScript

#142

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 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.

Re: Prince of Persia in JavaScript

#143
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.

Re: Prince of Persia in JavaScript

#144

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 lay…

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 com…

[deleted]

Re: Prince of Persia in JavaScript

#145

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.

Re: Prince of Persia in JavaScript

#146

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 lay…

> 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 accompl…

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.

Re: Prince of Persia in JavaScript

#147

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 lay…

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

Re: Prince of Persia in JavaScript

#149
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?

Re: Prince of Persia in JavaScript

#150

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.

Where did you watch walk-thrus in the 80s?
Post reply on HN