Closed Rob-bie closed 4 years ago
No you are wrong. I draw my assets in 360*640@4 but this strategy uses the entire screen width and height times DPR. When you code your game you simply have to keep in mind to place your sprites relative to the scene.
Ah, I misread. That makes much more sense. Thanks!
Stumbled upon this repo through some discussion that's happening on Discord. I use similar methods for designing my games for mobile. I see that you're using a base resolution of
640
x360
and have assets saved out at4x
,3.5x
, etc. Because the scale mode is set toFIT
you're going to see letterboxing on any device that doesn't have an aspect ratio of16:9
. What's your strategy for handling this case? One trick that I use when applicable is making the canvas background transparent and using a large css background (or better yet, a background that tiles) to make it appear that the device's entire display is being utilized.Another option is using the device's full resolution
width
xdpr
,height
xdpr
(or some fraction of the dpr for performance) but then depending on the game a user on a larger device might be seeing more of the game which could give them an advantage. I think this is more of a ramble than a question at this point but this is a topic I have been thinking about a lot recently.