What does high_dpi do, exactly?

Hi. To my shame, I haven’t actually started Defold in a while and I just noticed that, when built with the latest version of Defold, my game looked pixelated on my retina mac. I ticked the HiDPI option in game.project and everything was fine. It seems the semantics of this option changed (or some bug got fixed). Can somebody care to explain it to me? How does it affect different metrics (render.get_width(), render.get_window_width()) on different screen types and platforms?

3 Likes

Hi. Sorry for not responding sooner. The high_dpi option will change the back-buffer by increasing the pixel density. With high_dpi checked you’ll get render.get_window_width/height values that are twice as large. The window size is still the same and nothing is changed in terms of game object coordinates or anything like that.

2 Likes