Handling different resolutions

Started by
1 comment, last by dawidjoubert 18 years, 3 months ago
I have a display settings dialog that comes up when my game runs allowing the user to pick their desired screen resolution. I'm wondering what is the easiest way to handle font sizes for all possible screen resolutions. Right now, I am just using 12 pt font, so it looks good on my res of 1024x768 but when I go up or down it's smaller or bigger. And this makes some of my menu items go off screen or way too small to read, etc. I tried using the DX framework's DrawTextScaled function, but the output quality is pretty bad. Should I just use different point sized fonts with different resolutions or is there a better/easier way? Thanks!
Advertisement
You could render your GUI to a virtual resolution of 1024x1024 or something like that, and then scale it (the rendered bitmap) proportionally to your screen res.
i.e. scale the rendered text as well, it should look good enough.

Or use the font that best suits the resolution, like you suggested. But it's difficult for artists (I think) to design a GUI that dynamically change font size.
u could simple set a relation between width & font size and regen font when resizing

like

1280 : 14pt
thus
640 : 6pt
----------------------------

http://djoubert.co.uk

This topic is closed to new replies.

Advertisement