Chapter 10. It's Your Turn!

WHAT'S IN THIS CHAPTER?

  • Understanding Microsoft Push Notifications and how to use pop-up toasts

  • Handling in-game notifications

  • Using push notifications to update your game's start tile

  • Knowing whether your game is running on a device or in emulation

  • Vibrating your phone with the VibrateController class

A key aspect of building a great Windows Phone 7 game experience is leveraging the platform's features. Push notifications can be used to send updates and alerts in a variety of ways: in-game (also known as "raw") updates, pop-up toasts, and tile updates.

These types of notifications have many uses, such as informing players when it is their turn, how many active games are waiting for them, or that a message has arrived from another player in a multiplayer game.

In addition to learning about push notifications in this chapter, you will learn how to vibrate the phone and detect your game environment.

UNDERSTANDING PUSH NOTIFICATIONS

The Microsoft Push Notification Service provides a dedicated channel for sending information to a mobile application or game from a web service. This is a significant improvement over having to frequently poll a service to look for updates or notifications, since that would have a negative impact on battery life. Push notifications work the opposite way, allowing you to create cloud services that can push information to your phone, even when your game is not running.

One important thing you need to understand about push notifications as ...

Get Professional Windows® Phone 7 Game Development: Creating Games using XNA Game Studio 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.