Pixel-perfect GUI: resolution fixed or scaleable?

Started by
13 comments, last by Max_Payne 19 years, 7 months ago
You should make the GUI textures at close to the maximum resolution and scale down at run time. Test it at all resolutions. If anything looks funky you might need an additional medium res textureto scale down. Warcraft 3 scales the GUI and it looks good at every resolution fro 800x600 to 1600x1200.

If you do not do scale the GUI people with high res screens (like my UXGA laptop) will be very annoyed when they play in 1600x1200. Also since there are now a lot of wide screen notebooks you probably want to account for non standard aspect ratios by allowing your GUI elements to be anchored to one side (or corner) of the screen, so that these uses do not have wierd looking gaps or have to play with black bars on the sides of the screen.
Advertisement
Quake 3 has a fixed GUI, it works quite well. Quake 2 had a scaling GUI, and it didnt work so well I find... Complicated things and the text was way too small in 1600x1200.

For a game, which does not need the flexibility of an operating system, I would advise going with simplicity, and making a fixed GUI.

Looking for a serious game project?
www.xgameproject.com
I personally prefer a GUI where the widgets do not occupy the same screen real estate when run in higher resoultions.

Some games in 640x480 have GUI's that almost fill the screen, so running in a higher resoution means that the GUI will end up smaller and leave more room for the "game" to be displayed.

This really depends on the game. Currently I'm playing games like Everquest and World of Warcraft and some other MMORPG that I cant talk about. =)

-=[ Megahertz ]=-
-=[Megahertz]=-
I wrote simple gui system and I have used scaleable GUI - it's not a feature of the GUI rendering system, but in app I change sizes of controls according to resolution. Program supports resolutions from 640x480 to 1600x1200 and I scale all gui elements (fonts, controls...) with simle function:

int CS(int x, int min = -1)
{
int res = (int) (((float) wnd.GetWidth() / 1024.0f) * x);

if (min != -1)
{
if (res < min) return min;
}

return res;
}

I have designed whole gui in 1024x768 (default res) and in other resolutions everything scales using this function. I looks good, only in 640 there is a little problem with font readability, so I have to clamp values for font heights (it'sthe second param of function, -1 does not clamp). Fonts are generated on app startup, so there is no problem with blurring.
I don't use textures for gui controls and everything looks ok.

But I have another problem with my gui: I use OpenGL to render all controls and they look differnetly on radeon 8500 than on GeForce. On my card the borders (I use GL_LINE_LOOP) don't have one pixel in upper-left corner. On nvidia it looks OK.
I think it is caused by the driver, but i dont know ho to fix it.
I don't want to test for card type, because it would be pretty stupid.
Quote:Original post by Megahertz
I personally prefer a GUI where the widgets do not occupy the same screen real estate when run in higher resoultions.

Some games in 640x480 have GUI's that almost fill the screen, so running in a higher resoution means that the GUI will end up smaller and leave more room for the "game" to be displayed.

This really depends on the game. Currently I'm playing games like Everquest and World of Warcraft and some other MMORPG that I cant talk about. =)

-=[ Megahertz ]=-


Well in this case you're talking about a game where the GUI is an actual part of the game. That is a different situation than FPS and other action games. I agree that the GUI should scale with the resolution in an RTS, but things like the configuration menu and the main menu of an FPS have not many reasons to scale.

Looking for a serious game project?
www.xgameproject.com

This topic is closed to new replies.

Advertisement