Re:JavaScript Code Plays Google Dinosaur/T-Rex Game Automati...
by jestanoff on Saturday August 15, 2020 @05:32AM
(#24167455)
May be it is something small as dividing the width by 2 and setting a lower milliseconds value for the setinterval so it runs the checks more often.
Essentially this is the same solution as in the post, just stripped down to the bare minimum of code, but I haven't tested it enough. There must be some edge case that it fails on
Re:JavaScript Code Plays Google Dinosaur/T-Rex Game Automati...
by nestorD on Friday August 14, 2020 @05:15PM
(#24163368)
I have a t-shirt that features the Google T-Rex Game and I found that a large number of people do not recognisee the dinosaur nor know the game despite using chrome daily!
Re:JavaScript Code Plays Google Dinosaur/T-Rex Game Automati...
by Gaelan on Friday August 14, 2020 @09:07PM
(#24165073)
Edit: after I did that, I discovered jsnice.org, which managed to do all the deobfuscation I did (including inferring variable names from usage!) automatically. I'm very impressed. I replaced the gist above with the JSNice output.
https://www.youtube.com/watch?v=L2NtMpQml-A
setInterval(() => {
}, 100);So, I think the code I mentioned in the article is more efficient.
Essentially this is the same solution as in the post, just stripped down to the bare minimum of code, but I haven't tested it enough. There must be some edge case that it fails on
https://gist.github.com/Gaelan/a0c5461055437dca9618a12f68949...
(it does look safe though)
But actually, I minified this code so that people can quickly try it out. I'll try to explain it in some other article.
But, I had to make it as simple as possible for non-programmers.
https://vitovan.com/dino.html