4 ms·
Show HN: Diff Collection Game
- gren 11y agoaddictive game
- mkagenius 11y agoWow! Thank you so much. So glad you liked it.
- axemclion 11y agoHow about this bot - var timer = window.setInterval(function(){parseInt($('#ltext').text()) > parseInt($('#rtext').text()) ? rightPressed() : leftPressed();},1);window.setTimeout(function(){window.clearInterval(timer)},60000) ? Getting a huge score, but the server is overloaded, so cannot post high scores :P
- kenrick95 11y agoNice game, though you can wrap all your JS in an anonymous function to disable direct access by the user (i.e. the bot written by axemclion won't work anymore); but one can still trigger "left press" and "right press" keyboard event, so be aware. Another thing is, this game does not work on mobile because mobile user cannot use keyboard to trigger the actions; maybe give those two boxes clickable?
- mkagenius 11y agoGood idea about javascript. Thanks. Forgot to mention: You can swipe on mobiles, I had already added it :)
- jpmoral 11y agoDoesn't seem to be working for me. Firefox 39 on OS X.
- mkagenius 11y agoSorry about that. Maybe its going for HTTPS somehow. Try http://mkagenius.github.io/ http://mkagenius.github.io/ without the https.
- cxam 11y agoThe issue is that your jQuery library is loaded over http and fails since it's a different protocol from the main site. More info regarding this here: https://developer.mozilla.org/en-US/docs/Security/MixedContent#Mixed_active_content https://developer.mozilla.org/en-US/docs/Security/MixedConte... To fix, simply change http://cdnjs http://cdnjs to //cdnjs to make your request protocol independent.
- jsnell 11y agoSo there's two reasonable strategies. One is to maximize the score per action by doing the mental arithmetic to determine whether you can still add the current number to the larger number and maximize the diff, or whether you need to add it to the smaller one. The other is to simply maximize the number of actions by always clicking on the smaller of the two numbers which requires much less cognitive effort. I tried both strategies, and on clean runs got scores of 266 (maximize score per action) and 270 (maximize action count). It's a bit unsatisfying that the dumb strategy can be effective. I think you'd need to be only about 30% faster when executing the simple action than the complicated one to break even. Maybe it'd make sense to make the scoring rule non-linear? E.g. instead of 0/2/4/6/8 points give 0/1/2/4/8.
- zzleeper 11y agoWell if 8 comes up the correct solution is to click the smaller number, so you can just do the math for 2-4-6
- sethhovestol 11y agoBut you still need to recognise the 8, speed you don't even look for the number
- mkagenius 11y agoTop 11 so far: (1) 678 (2) 306 (3) 292 (4) 280 (5) 278 (6) 274 (7) 270 (8) 268 (9) 268 (10) 266 (11) 266
- hughdbrown 11y agoSo someone tried it once and got a score higher than the next two combined? I am calling shenanigans. And I got the 280.
- mkagenius 11y ago:) Most probably that's a bot. I have the gameplay logs, I will dig it and find out. Till then, lets consider 2nd place as the best. Edit: 1st Place seems genuine. Edit2: Here is his/her logs: https://github.com/mkagenius/mkagenius.github.io/blob/master/README.md https://github.com/mkagenius/mkagenius.github.io/blob/master... Edit3: Actually, can't say if its a bot or not unless someone accepts it.