Live data from Hacker News

Show HN: I taught my little brother JS, and he made this videogame in a week

s-poony.github.io

231–240 of 285 posts

Re: Show HN: I taught my little brother JS, and he made this videogame in a week

#232

Hasn’t been mentioned before: try this on a phone. It uses the gyroscope for control and it quickly becomes second nature to balance/guide the square around the screen. Also a very nice and rewarding discovery process, as it starts out with squares speeding by, until you realize it’s the tilt of your phone that is causing it. Congrats, super fun!

holy crap - works on my hp spectre 360 too! - i'm doubly impressed.

Re: Show HN: I taught my little brother JS, and he made this videogame in a week

#233
post #218

Look at the code guys [1]. I love it. This is simple. There is not a single line of bullshit. I hope he gonna become a great programmer and continue to make beautiful code like that. [1] https://github.com/S-poony/Ultra-Square-Catcher-USC-/blob/ma...

Really well done and I like the brevity. Here are some ideas for revising the code: 1. There are two functions called "distance" and they're identical. Only the outermost appears to be needed. 2. As written, the game places variable and function names into the global scope. It doesn't matter for this game, but will be a problem for larger games. One idea would be to use the Immediately Invoked Function Expression (II…

Also never use Math.pow for squaring numbers (used in the distance function) because it is significantly slower as it is designed for abitrary real exponents, not just integer ones. Cannot be learned soon enough IMO :)

Still a very good job for just a week of coding though.

Re: Show HN: I taught my little brother JS, and he made this videogame in a week

#234
post #176

Earlier quoted context omitted.

But what if he wanted to turn it into a AAA FPS game with RTS elements in a persistent online world that supports millions of simultaneous users?

That was the next logical step during the early 2000s. Every bright-eyed college freshman on IRC was "recruiting" for his next awesome MMORPG idea.

It's still a thing. On gamedev forums and subreddits you still have people assembling a team. Of course he can't do any programming, he's only an idea guy and needs 5 programmers, 3 writers, 7 artists etc.

Re: Show HN: I taught my little brother JS, and he made this videogame in a week

#236
post #218

Look at the code guys [1]. I love it. This is simple. There is not a single line of bullshit. I hope he gonna become a great programmer and continue to make beautiful code like that. [1] https://github.com/S-poony/Ultra-Square-Catcher-USC-/blob/ma...

Really well done and I like the brevity. Here are some ideas for revising the code: 1. There are two functions called "distance" and they're identical. Only the outermost appears to be needed. 2. As written, the game places variable and function names into the global scope. It doesn't matter for this game, but will be a problem for larger games. One idea would be to use the Immediately Invoked Function Expression (II…

Fork it and submit him a PR!

Re: Show HN: I taught my little brother JS, and he made this videogame in a week

#237
Wow I really enjoyed that! When I was still trying to "win" my eyes were watering like crazy because you just can't blink once the score gets high. Am I the only one who at some point got suicidal? You're like OMG I need a break and the only way is to start chasing the red dot. When I got back below 10 and the red dot disappeared I was like holy shit there is no way out! Felt like a great twisted ending to some intense psycho thriller. Also my right (arrows) hand is now aching.

Great job!

Re: Show HN: I taught my little brother JS, and he made this videogame in a week

#238

Earlier quoted context omitted.

The gyroscope is a datapoint that can be used for fingerprinting. Plus it gives quite a bit of information about you: whether you are lying down, sitting, walking, etc.

doesn't this assume the user is walking around with the page open, the front tab, and the phone unlocked for a reasonably long period? which websites do I spend enough time on for that to be true? I don't generally walk and read

> I don't generally walk and read

That's how I spend 10-ish% of my time on Hacker News

Re: Show HN: I taught my little brother JS, and he made this videogame in a week

#240
post #77

I love that the red block doesn't understand the concept of wrapping. It reminds me of playing with my dog.

I was actually going to ask what the rationale behind this was. I found that because of this, the best strategy was usually to wrap around to distract the block. I personally felt like the game would have worked better without that, although hard to know without trying it.

I felt wrapping added a strategic depth for me to explore and a positive sensation of "outsmarting" the red block.
Post reply on HN