3 ms·
Thanks for mentioning this code. Actually, I've just tried your solution. But, the dinosaur dies quickly. So, I think the code I mentioned in the article is mo
by truly_furqan 6y ago
Thanks for mentioning this code. Actually, I've just tried your solution. But, the dinosaur dies quickly.
So, I think the code I mentioned in the article is more efficient.
- jestanoff 6y agoMay 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