kennethlarsen / thecatgame

#GitHubGameOff
MIT License
1 stars 3 forks source link

Make game responsive #26

Closed paulgoetze closed 6 years ago

paulgoetze commented 6 years ago

At the moment the game is not playable on devices without a keyboard and only works on large resolution displays.

Making it responsive and playable on all devices includes:

kennethlarsen commented 6 years ago

I think we have to pick a sweet spot for desktop. What is the minimum size we should support?

paulgoetze commented 6 years ago

Yes, I think that’s a good point. Currently we use 1280x800px on itch.io. I guess this should pretty much cover desktop and tablets. I’m also working on some full screen mode right now, so that it just scales to your viewport size even if it is smaller.

For smartphones we will have to scale down the sprites though, this is what I get in the firefox dev tools for an iPhone 6s: grafik

Not playable yet :/

paulgoetze commented 6 years ago

Yay. With the latest commits in #27 The full scene is now smoothly resizeable, to whatever resolution or screen size you have 😃.

I took an HD reference resolution (1080x1920) which I used for setting the default proportions and scaled based on the height. Changing the screen width will just infinitely scale the landscape and alter the position of the cat.

grafik