Closed yell0wsuit closed 3 years ago
Thanks for contributing! I just got my laptop repaired, so I will try to look at this and merge it within the next day.
Any updates for this @jackbuehner?
Looks good to me! Thank you for updating and organizing.
I originally committed this in my repo; however, since the
localStorage
workaround is from here, so I feel like I should also contribute to this.Description It's weird that Microsoft silently updated the game code of Let's Surf (the game's name in the
strings.js
file) a year later. While the core is the same, there are some quality-of-life changes. The notable change is now there's a green trail when you use the boost powerup, which is a useful visual feedback. However, the code is changed to some extent. I just use the old code as a reference and add into the new code, and it works as usual. Unfortunately old stats aren't kept since they change some function names (classic
becomesendless
for example).Game now adapts to screen size properly. Actually, the game is already responsive, but the flaw is that in the old code, sometimes the game generates obstacles at the beginning that makes it hard to surf through without losing a life. New code apparently fixed this issue. I tested on my mobile and can confirm it works so I'm confident enough to add
<meta name="viewport" content="width=device-width, initial-scale=1.0">
in the HTML file.Besides that, I fixed some CSS issues with Firefox. First is that Firefox does not use
image-rendering: pixelated
so I have to add alternatives. Second is it has problems withbackdrop-filter
, so I have to add@support
tag as well to exclude Firefox from using that filter.Due to code changes, the repo is also cleaned up so it's more organized. I also updated the README file so it's a bit more detailed. Please review to see if there are something wrong.