Search code examples
javalibgdxdpi

Does DPI matter for desktop in LibGDX?


I am working with LibGDX at the moment.

I understand why DPI matters for android, but was wondering if it even mattered for desktop development.

My question is this, does DPI matter at all or affect games for desktop?

If so, is it in the same way that it does for android?

If not, how is it different?


Solution

  • It depends.

    If you need to keep the same physical size across devices, then it matters. Eg. You need an image to be 1" on both phone and tablet.

    If you need to keep the same proportions across devices and are only dealing with different aspect ratio's, then DPI will only be useful if you want to have a good idea on what a finger can achieve on a screen, which is usually 50 dp.