Hello, I'm working on a simple desktop UI library for my project, and I wanted to get some info about how people like to lay out their in-game UI in order to scale for different resolutions (and potentially slightly different aspect ratios, e.g. 16:9 vs 16:10.)
I'm specifically looking at doing mostly image-based UI components, so I'll be looking at scaling images (or exporting multiple sizes) instead of dynamically drawing.
Most frameworks/engines I've worked in give you a few options for positioning/sizing:
- Absolute value in pixels (or one of the pixel variants like dp)
- Absolute value in % of screen size
- Anchors/relative value
Additionally, they'll have some sort of scaling based on selected resolution.
But I've never made a full game, so I don't know what's typically used. Say you have a basic hotbar, health/mana, and some menus like inventory and stuff. What would you use? Does your approach change when you're making something like settings menus? I'm just looking to get some insight.