3 ms·
Show HN: Janken – A rock paper scissors game
- aryamaan 5y agoThis is a nice site. I thought it would have a camera cause for such a thing you want to control is that the site is not reading your input first and then showing its cards.
- aryamaan 5y agoBut that's true for taking the input from the camera too.
- neet-vc 5y agoI made this to learn a little about CSS animations and brush up on my frontend skills while learning Clojure and ClojureScript. For whatever reason, it seems that hand choice is unevenly distributed.
- neet-vc 5y agoFrom a recent 30 minute window: - 995 rock - 516 paper - 888 scissors
- deleted 5y ago[deleted]
- captn3m0 5y agoRandomize the order of the buttons on new games.
- quickthrower2 5y agoConclusions?
- neet-vc 5y agoNot sure -- could be button order like captn3m0 suggested. Something like mobile users outnumbering desktop users and most people being right handed resulting in people clicking on what's easiest to reach with their thumb.
- brailsafe 5y agoare you using any other css animations besides having the middle emote float up and down?
- neet-vc 5y agoYes, the throw animation for the hands and the new emote popping in.
- rasengan 5y agoPon!
- woah 5y agoTakes a moment to learn... but a lifetime to master
- mysterydip 5y agoNice and to the point. I clicked on the "..." bubble out of curiousity, and it brought up some ad, which is fine. When I went to leave by hitting back, the ad came up again. I had to hit back again to close it, then back to come here. Just FYI.
- neet-vc 5y agoThanks. I think this is a consequence of me using URL hashes for modal state instead of implementing my own logic. That modal is also for resetting your score, if you'd like.
- koolba 5y agoURL based state is fine but you should use “replace” or “replaceState” so that each new location isn’t considered a new history page: https://developer.mozilla.org/en-US/docs/Web/API/Location/replace https://developer.mozilla.org/en-US/docs/Web/API/Location/re... https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState https://developer.mozilla.org/en-US/docs/Web/API/History/rep...
- neet-vc 5y agoRight, I was using CSS :target and plain links without click handlers.
- neet-vc 5y agoFixed -- thanks again for surfacing this.
- junon 5y agoURL state is super hostile, didn't realize until it was too late. From your other comment it doesn't seem like malicious intent, however. Also, warning to those who care: this site is Amazon-affiliated and uses Google Analytics. Author discloses this, which is fine, it's just hidden behind a modal. Doesn't appear answers are being reported to a server, no AJAX is being performed. Sorry for the dissection, these sorts of little toy apps are often facades for data mining projects or the like. I'm always skeptical but it seems relatively harmless.