Game Development Reference
In-Depth Information
3.2T ITLE S AFE A REA
On standard television sets, the area around the edges of the screen could become distorted
or obscured, so any information that should be readable needs to be displayed within a title
safe area. This is an area that represents a reduction of the viewport by 10 to 20%.
Newerdisplayssuchasflatpanels,plasma,LCDs,areabletodisplaymostoftheimageout-
side the safe area, however, it still remains important if your game may run on a game con-
sole that needs to support a large variety of television displays and configurations. In fact,
many console manufacturer's state in their guidelines that any critical text should be within
the inner 80% of the game's viewport.
Figure 32 - The title safe area lies within the viewport, anything within this area is guaranteed to be visible even on old CRT displays.
We can calculate the title safe area of a viewport when we construct the viewport,
float safeAreaWidth = (Width * ( 1.0 - titleSafeRatio));
float safeAreaHeight = (Height * (1.0 - titleSafeRatio));
Rectangle titleSafeArea = Rectangle(Left + (safeAreaWidth * 0.5), Top + (safeAreaHeight * 0.5), Width - safeAreaWidth, Height -
safeAreaHeight);
Thecalculatedtitlesafeareaisaccessiblethroughtheviewportbycallingthefunction view-
port.TitleSafeArea() , we will use it to be certain that when we display UI elements we con-
strain them within this area to ensure maximum compatibility with devices and compliance
with certification requirements.
Search WWH ::




Custom Search