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

241–250 of 285 posts

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

#245
post #176

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

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?

No, right now it's the RPG elements that are trendy, RTS is soooo 2000.

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

#246
post #221

Earlier quoted context omitted.

I do agree it’s a complaint about the language. However, I think it does ultimately fall on the developer to know how to work with the language including the bad/ugly/awful parts. I also think not polluting the global scope is a pretty foundational thing to know or be aware of. It’s really easy to shoot yourself in the foot or have naming collisions/overwrites happen if you aren’t careful. Another example would be me…

> However, I think it does ultimately fall on the developer to know... This person has been programming for a week. I think we can let this slide

Great comment. Great comment.

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

#247
post #221

Earlier quoted context omitted.

I do agree it’s a complaint about the language. However, I think it does ultimately fall on the developer to know how to work with the language including the bad/ugly/awful parts. I also think not polluting the global scope is a pretty foundational thing to know or be aware of. It’s really easy to shoot yourself in the foot or have naming collisions/overwrites happen if you aren’t careful. Another example would be me…

> However, I think it does ultimately fall on the developer to know... This person has been programming for a week. I think we can let this slide

Feedback is pretty useful for new programmers though. It's how they learn!

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

#249
post #218

Earlier quoted context omitted.

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.

Definitely great job. Reminds me of when I taught my physicist friend C and he wrote a raytracer and a game to demo it the next day. I had never witnessed so many trig functions used on a global context.

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

#250
In "taught" did you mean "write 80% of the code"? This follows coding conventions far too much for me to believe it's written by an complete beginner.

To me it smells like karmafarming. How is everyone buying this? Where's your reasonable doubt?

Post reply on HN