Skip to Main Content
Learning XNA 3.0
book

Learning XNA 3.0

by Aaron Reed
November 2008
Beginner content levelBeginner
510 pages
16h 24m
English
O'Reilly Media, Inc.
Content preview from Learning XNA 3.0

The Title Safe Region

There's one more thing that you'll need to consider when developing for the Xbox 360: in standard-tube televisions, the actual display area is not a perfect rectangle. In fact, as much as 10% of the screen in any direction may or may not be visible, depending on the type of television you're using.

Because of this, when developing games for the Xbox 360, you should always display critical information within the inner 80% of the screen (offset by 10% up, down, left, and right). This inner area is known as the safe region. You'll still want to draw the background and other objects on the whole screen, so that the screen doesn't have black edges if those areas are visible on a particular television, but anything that needs to be seen by the user and/or needs to be interacted with should be placed within the safe region.

So, how do you make your text display in the safe region on an Xbox 360? Luckily, the GraphicsDevice object has a member called Viewport which represents the viewport used to draw the current scene. This Viewport object has a member of type Rectangle called TitleSafeArea which represents the title safe region mentioned previously. In a Windows game, the Top and Left elements of the TitleSafeArea rectangle will be 0 (indicating that it is safe to draw at location 0, 0). In an Xbox 360 game however, the Top and Left elements will reflect the top left corner of the title safe region as described earlier. So, you'll want to use these values as offset ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning XNA 4.0

Learning XNA 4.0

Aaron Reed
Beginning C# 7 Programming with Visual Studio 2017

Beginning C# 7 Programming with Visual Studio 2017

Benjamin Perkins, Jacob Vibe Hammer, Jon D. Reid

Publisher Resources

ISBN: 9780596154905Supplemental ContentErrata Page