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...
Show HN: I taught my little brother JS, and he made this videogame in a week
171–180 of 285 posts
Re: Show HN: I taught my little brother JS, and he made this videogame in a week
#172how little is little? why didnt he post it here himself? feels a little suspect.
He is 15. I should have written younger brother and not little brother; english is not my native language.
Re: Show HN: I taught my little brother JS, and he made this videogame in a week
#173Earlier 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?
EDIT: I should add that both the HDD Macs I owned (a 2009 Macbook Pro and a 2004 or 03 Macbook) had accelerometers and I found a cool app for oldest that made a lightsaber noise. This was pre smartphones, so it was novel. My Late 2013 Macbook Pro does not seem to have one.
Re: Show HN: I taught my little brother JS, and he made this videogame in a week
#174Re: Show HN: I taught my little brother JS, and he made this videogame in a week
#175Re: Show HN: I taught my little brother JS, and he made this videogame in a week
#176Look 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...
Re: Show HN: I taught my little brother JS, and he made this videogame in a week
#177Re: Show HN: I taught my little brother JS, and he made this videogame in a week
#178Look 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...
Agreed. There are so many JS projects these days composed of a dozen abstraction layers and barely-used libraries all mixed together and spread out across multiple files with an insanely complex "build system" on top, that it's very refreshing to see simple, self-contained JS.
Our company needed an internal tool, and they wanted remote access to it, but it was basically just a tool to generate a file based on a few inputs. We already had a command line program for it, so I wrapped it up in a web server and had it take input as a form input without any JS. It worked great for years, and then someone got tasked with updating it (mostly just combining it with other tools). He couldn't figure out how it worked, so he rewrote it to use a ton of JS, using Angular and other stuff. And guess what? He took longer to rewrite it than I spent the first time and made no functional changes besides some CSS and a ton of JS.
With all these fancy new frameworks and browser features, it seems that many developers have forgotten (or never learned) how to do things simply. Frameworks and browser features have their place (I built an interactive HTML5 app as my first project at that company), but they're often completely unnecessary.
Re: Show HN: I taught my little brother JS, and he made this videogame in a week
#179Earlier quoted context omitted.
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
#180Hasn’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!
In fact, I didn't realize that the gyro worked in both dimensions! I thought it was just a fast downward fall and it was actually hard to hit the red block since it kept moving. Then I found out you could lay the phone flat and slow the green block down and it was way more fun!
I like the concept and could see a more complete game making a ton of sense.