Is there a way to make my game displayed pixel perfect? It may be critical if game has pixel art graphics. Tried some render samples and it seems that’s not what I am looking for. My initial resolution is 240x320, so I need only proportional scaling x2. I.e. 480x640, 640x980, 720x960, 960x1280 depending on game window size. I know already that working with resolutions in Defold is not that simple, so is this actually possible?
You can try flappy bird game example. It is pixel, and contains complicated logic for scaling. If you need only proportional scaling , you should check aspect ration of screen, and then add some border in x or y, if aspect of screen is different then your. https://github.com/d954mas/defold-flappy-bird/blob/master/lib/screen_helper.lua
Thank you. Your approach is really nice, results are predictable. But, actually, scaling works only in Defold redactor (windows and android builds also works well, I think macOS versions will be ok too). But HTML5 build doesn’t scale in browser Hm… Seems that HTML5 build doesn’t support scaling of game window regardless of the render script.
Thank you britzl for your help. This extension It is really useful, as always. Without this and other extensions it would be really painful to use Defold for non-programmers such as me.