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!
The APIs powering this are in the process of being heavily restricted or removed altogether -- if you think games like this should exist, you should voice your concern here: https://github.com/w3c/deviceorientation/issues/57.
It seems to me that gyroscope data is merely input, rather than personal data. In other words, I'm not sure asking permission before accessing gyroscope data makes any more sense than asking permission before accepting touch screen input. Or for desktop applications, asking permission before accepting keyboard/mouse input.
I think it needs some sort of prompt about the tilting. Also the mechanism might need some calibration, I tested it with my SO and the tilting was too sensitive for her to control it accurately.
What would one feasibly do with this data? I guess an app could tell if someone is holding their phone in their had, and maybe put together a pedometer bases on gyroscope input. Maybe a concern if a app has access to gyro input over a period of days.
But as long as it's only for actively open apps and web pages I don't really see much harm.
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.
With sufficiently high-frequency gyroscope data, it is possible to infer what a user types in with moderate precision. In some cases, it has even been shown to be possible to recover coarse audio data from the surrounding environment.
https://bugs.chromium.org/p/chromium/issues/detail?id=421691 Browsers have added rate limiting to mitigate this threat. (Prior to that, my former team in Google Ads added our own rate limiting to the gyroscope API we provided for ads.) The risk now seems pretty minor, but I wouldn't be shocked if someone clever still managed to find some way to abuse it.
Facebook has a patent for using gyroscope data in conjunction with location to know who you are facing with other people around to enhance friend suggestions.
You can also determine things like health and other physical characteristics, similar to gait detection.
If the mouse cursor is outside the browser window, sure. Gyroscope data is relatively personal and not easy to modify, so it serves as a much better tracking tool than the mouse cursor.
My thought exactly. Totally surprised me. I thought the only inputs a web site could get from me from hardware without asking permission is key presses and cursor movement.
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.
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.
To be fair, in my experience rewrites always take longer regardless of technology choices. You are often reverse engineering requirements which is really consuming both in time and energy. That said, I agree with the point you're trying to make though (I strongly prefer software with less dependencies/frameworks)
Yes one should assume most frameworks will be dead 2 years from now. Dependencies problems suck. And create security holes. When development starts going into the cloud get ready for a lot of pain the world has never seen before.
It depends on your needs... Are you building a complex application with several developers. You probably want a build system and module based JS. I prefer react + redux + material-ui. Some of the new stuff around hooks and context could displace redux for smaller apps easily.
If you need a one-off page that does a little dynamic stuff? Drop in jquery+bootstrap and a little wiring js and be done with it. Not a huge fan of the size of jquery + bootstrap, but it's a fast path to done depending on your one-off needs.
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 changes in performance with updating objects, so it's more of a habit and code clarity thing for me.
Of course, that's far less important than the fact that the logic is clear and concise, especially after learning JS in a week :)
This is... really impressive actually. Such a simple mechanic, but well executed. I like how the red block concept is introduced to you after the first few points are scored. The details of the implementation are really impressive for a first project, or even for a game project in general tbh.
Anyone noticed that you can click the game board to go full screen. This kid is doing more with less than many developers do with years of training. I think he's got a career in programming ahead.
Comments (270) 108 threads
This is awosome on mobile!
Continue this thread — 2 replies
Continue this thread — 2 replies
I think it needs some sort of prompt about the tilting. Also the mechanism might need some calibration, I tested it with my SO and the tilting was too sensitive for her to control it accurately.
But as long as it's only for actively open apps and web pages I don't really see much harm.
Continue this thread — 3 replies
https://bugs.chromium.org/p/chromium/issues/detail?id=421691
Browsers have added rate limiting to mitigate this threat. (Prior to that, my former team in Google Ads added our own rate limiting to the gyroscope API we provided for ads.) The risk now seems pretty minor, but I wouldn't be shocked if someone clever still managed to find some way to abuse it.
Continue this thread — 3 replies
Know what you are typing: https://www.newscientist.com/article/mg21128255-200-smartpho...
You can also determine things like health and other physical characteristics, similar to gait detection.
Continue this thread — 3 replies
Continue this thread — 2 replies
Continue this thread — 6 more replies
[1] https://github.com/S-poony/Ultra-Square-Catcher-USC-/blob/ma...
Don't want to be the killjoy here but isn't line 77-79 the same as 85-87? With the rest I can agree.
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.
Continue this thread — 1 reply
If you need a one-off page that does a little dynamic stuff? Drop in jquery+bootstrap and a little wiring js and be done with it. Not a huge fan of the size of jquery + bootstrap, but it's a fast path to done depending on your one-off needs.
Continue this thread — 6 more replies
Continue this thread — 1 reply
All comments shown.
Couldn't load more comments. Check your connection and try again.