Game Development Reference
In-Depth Information
Figure 10.9 A UI element is positioned relative to the bottom-right corner of the
screen.
Relative coordinates can be expressed relative to key points on the screen (usually
the corners or the center of the screen), or even relative to other UI elements. Im-
plementing this second approach is a bit more complex, and beyond the scope of
this chapter.
One refinement might also be to scale the size of UI elements depending on the
resolution. The reason for this is that at very high resolutions, the UI might just
become too small to be usable. So at higher resolutions, the UI can be scaled up so
it's more easily seen by the player. Some MMORPGs even have a UI scale slider
that allows the player to adjust the UI with a high degree of granularity. If scaling
is to be supported, it's doubly important that relative coordinates are utilized.
Search WWH ::




Custom Search