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

161–170 of 285 posts

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

#162

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

From the source, Shift = Brake

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

#163

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

As far as logic goes, I totally agree, but personal preference nit pick, from a code writer and reader perspective, I think all subproperty access (`hero.acceleration.x`) could be cached to a variable, or just operate on plain variables and assign property access after mutations and only manipulate objects as needed. It makes the code easier to write and read, IMHO, and I believe older engines had infinitesimal chang…

He did the game in a week, not learn JS from what I understand from the title

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

#164
post #136

Earlier quoted context omitted.

My code when i was kid was half english and half swedish, heck even today when i write simple "run once"-code they often have some swedish named variable. Funny story from ~2005, a company developed a jvm for a special cpu and was aquired by a bigger company. After the aquasition 2 developers had to search the code base for two weeks after swedish swear words, they replaced them with the word of dandelion in swedish…

Even in a professional context it's reasonable to use the language your customer (business expert) is using. Beware of mapping technical terminology into another language! And if that means you write Swedish code, that's perfectly valid.

I've definitively had the case of having all the codebase in English (not our native language), since all concepts mapped easily, and then a new concept appears and damned if I know how to translate it! So now we're stuck with a single non-English term in the codebase, which is a blot on the whole work :(

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

#165

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!

Wooooah, that's why it was speeding around without any input from me! My laptop has a gyro in it as well that I forgot about!

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

#167
post #90

That's impressive. Can you provide more info such as how old he is, did he have any kind of programming experience prior, and how did you go about teaching him?

Of course I can. My brother is 15, he is smart and he had programmed before, but only on his calculator (in TI-BASIC, I think). He already knew the basics of programming. He got his first real computer for Christmas. I was with him at my parents house, behind his shoulder as we created the skeleton of the game together over a weekend. After that I left, and he kept adding features on his own.

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

#168

Earlier quoted context omitted.

Or your Macbook Pro if it originally came with an HDD. Apparently the device orientation API can utilize the triaxial accelerometer that Apple used for drop detection. Really neat experience tilting my laptop around like a mad man.

Do MacBooks that shipped with an SSD not have the accelerometer?

My MacBook with an SSD (12", 2017) does not have an accelerometer as far as either my web browser or `pmset -g` can tell.

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

#169

Wow, the maths are more impressive than coding IMHO Bien joué Noé :)

Il est en première. Do not underestimate the french education system ;) What you need for such a game are Pythagorean and Thales's theorems. I gave him hints so that he poses the problem correctly, but he came up with the formula for moving the red square on his own!
Post reply on HN