Windows Phone 7 Game Development

Book description

Windows Phone 7 is a powerful mobile computing platform with huge potential for gaming. With "instant on" capabilities, the promise of gaming on the move is a reality with Windows Phone 7 devices. It's an ideal environment for .NET developers looking to create fun, sophisticated games for large audiences.

Windows Phone 7 Game Development will guide you through all of the stages required to develop your own games for the Windows Phone 7 platform using the powerful industry standard .NET programming environment and the C# programming language within Visual Studio 2010. You'll be guided though using Silverlight and XNA for the presentation layer of your games. You'll also see the inner workings on the Windows Phone, and learn to take advantage of the phone's gaming capabilities. Finally, you'll receive instructions on distributing your applications through the Windows Marketplace for Mobile.

Table of contents

  1. Copyright
  2. About the Author
  3. About the Technical Reviewer
  4. Acknowledgments
  5. Introduction
    1. This Goal of This Book
      1. Who This Book Is For
      2. Chapter Overview
  6. I. The Beginning
    1. 1. Windows Phone and .NET
      1. 1.1. Looking Closely at Visual Studio Development for Windows Phone
        1. 1.1.1. Language Choices
        2. 1.1.2. IDE Features
          1. 1.1.2.1. Emulators
          2. 1.1.2.2. Silverlight Page Designer
          3. 1.1.2.3. Breakpoints
          4. 1.1.2.4. Debug Output
      2. 1.2. Windows Phone Platform
        1. 1.2.1.
          1. 1.2.1.1. Screen Hardware
          2. 1.2.1.2. Hardware Buttons
          3. 1.2.1.3. Processors
          4. 1.2.1.4. Graphics Hardware
          5. 1.2.1.5. Location and Orientation
          6. 1.2.1.6. Cooperation with the Device
      3. 1.3. Using Visual Studio for Windows Phone Development
        1. 1.3.1. Installing Visual Studio
        2. 1.3.2. Creating a Windows Phone Project
          1. 1.3.2.1. Project Templates
        3. 1.3.3. Designing a Page
        4. 1.3.4. Running the Application
        5. 1.3.5. Running on a Real Device
          1. 1.3.5.1. Registering the Device
          2. 1.3.5.2. Deploying to the Device from Visual Studio
        6. 1.3.6. Debugging
          1. 1.3.6.1. Breakpoints
          2. 1.3.6.2. Debug Output
        7. 1.3.7. Getting Help
          1. 1.3.7.1. MSDN
          2. 1.3.7.2. Search Engines
          3. 1.3.7.3. Microsoft's Windows Phone Developer Center
          4. 1.3.7.4. Community Sites
      4. 1.4. Windows Phone Game Development
        1. 1.4.1. Suitable Games
        2. 1.4.2. Selecting an Application Framework
          1. 1.4.2.1. XNA
          2. 1.4.2.2. Silverlight
      5. 1.5. Welcome to the World of Windows Phone Development
  7. II. XNA
    1. 2. Getting Started with XNA
      1. 2.1. What Is XNA?
      2. 2.2. Your First XNA Project
        1. 2.2.1. Creating the Project
        2. 2.2.2. Adding Some Content
        3. 2.2.3. Displaying the Graphic
        4. 2.2.4. Moving the Graphic
        5. 2.2.5. Examining the Solution in More Detail
          1. 2.2.5.1. The Game Project
          2. 2.2.5.2. The Content Project
      3. 2.3. Sprites in Detail
        1. 2.3.1. Supported Graphic Formats
        2. 2.3.2. Scaling
          1. 2.3.2.1. Using a Uniform Scaling Factor
          2. 2.3.2.2. Using a Non-uniform Scaling Factor
          3. 2.3.2.3. Using a Destination Rectangle
        3. 2.3.3. Rotation
        4. 2.3.4. Tinting
        5. 2.3.5. Partial Image Rendering
        6. 2.3.6. Layer Depth
        7. 2.3.7. Sprite Transparency
          1. 2.3.7.1. Color Key Transparency
          2. 2.3.7.2. Alpha Channel Transparency
        8. 2.3.8. Alpha Tinting
      4. 2.4. Useful Sprite Effects
        1. 2.4.1. Setting a Background Image
        2. 2.4.2. Fading to Black
        3. 2.4.3. Fading between Images
      5. 2.5. Displaying Text
        1. 2.5.1. Font Support
        2. 2.5.2. Creating SpriteFont Objects
        3. 2.5.3. Displaying Text
      6. 2.6. Other Graphics Options
        1. 2.6.1. Rendering in Full Screen Mode
        2. 2.6.2. Supporting Portrait and Landscape Orientations
          1. 2.6.2.1. Using Portrait Orientation
          2. 2.6.2.2. Using Landscape Orientation
          3. 2.6.2.3. Allowing Landscape and Portrait Orientations
        3. 2.6.3. Graphic Scaling
        4. 2.6.4. Suppressing Drawing
      7. 2.7. Experiment and Play with XNA
    2. 3. Creating a Game Framework
      1. 3.1. Designing the Game Framework
        1. 3.1.1. The GameObjectBase Class
        2. 3.1.2. The SpriteObject Class
        3. 3.1.3. The TextObject Class
        4. 3.1.4. The GameHost Class
        5. 3.1.5. The GameHelper Class
      2. 3.2. Using the Game Framework
        1. 3.2.1. Referencing the GameFramework Project
        2. 3.2.2. Setting Inheritance for the Main Game Class
        3. 3.2.3. Creating Derived SpriteObject Classes
          1. 3.2.3.1. The BoxObject Class
          2. 3.2.3.2. The BallObject Class
        4. 3.2.4. Adding Game Objects to the Game Host
        5. 3.2.5. Removing Objects from the Game Host
        6. 3.2.6. Overriding Object Properties
      3. 3.3. Benchmarking and Performance
        1. 3.3.1. The BenchmarkObject Class
        2. 3.3.2. Using BenchmarkObject
        3. 3.3.3. Performance Considerations
          1. 3.3.3.1. Texture Loading
          2. 3.3.3.2. Creating and Destroying Objects
          3. 3.3.3.3. Using for and foreach Loops
      4. 3.4. Game in Focus: Cosmic Rocks (Part I)
        1. 3.4.1. Designing the Game
        2. 3.4.2. Creating the Graphics
        3. 3.4.3. Creating the Game Objects
          1. 3.4.3.1. The RockObject Class
          2. 3.4.3.2. The SpaceshipObject Class
          3. 3.4.3.3. The ParticleObject Class
          4. 3.4.3.4. The StarObject Class
        4. 3.4.4. Running the Game
      5. 3.5. Creating XNA Games
    3. 4. User Input
      1. 4.1. Using the Touch Screen
        1. 4.1.1. Reading Raw Touch Data
          1. 4.1.1.1. The Life and Times of a Touch Point
          2. 4.1.1.2. Finding a Touch Point's Previous Location
          3. 4.1.1.3. Touch Panel Capabilities
          4. 4.1.1.4. Working with Rotated and Scaled Screens
        2. 4.1.2. Reading Input Using the Touch Gestures
          1. 4.1.2.1. Enabling the Gestures
          2. 4.1.2.2. Processing Gestures
          3. 4.1.2.3. Tap and DoubleTap
          4. 4.1.2.4. Hold
          5. 4.1.2.5. VerticalDrag, HorizontalDrag and FreeDrag
          6. 4.1.2.6. Flick
          7. 4.1.2.7. Pinch
          8. 4.1.2.8. Working with Rotated and Scaled Screens
          9. 4.1.2.9. Experimenting with the Gestures API
        3. 4.1.3. Sprite Hit Testing
          1. 4.1.3.1. Bounding Box Hit Tests
          2. 4.1.3.2. Rectangular Hit Tests
          3. 4.1.3.3. Elliptical Hit Tests
          4. 4.1.3.4. Building the Hit Tests into the Game Framework
          5. 4.1.3.5. Retrieving the Objects at a Hit Location
          6. 4.1.3.6. Hit Testing Example Projects
        4. 4.1.4. Initiating Object Motion
          1. 4.1.4.1. Dragging Objects
          2. 4.1.4.2. Flicking Objects
        5. 4.1.5. Finger-Friendly Gaming
      2. 4.2. Reading the Keyboard and Text Input
        1. 4.2.1. Using a Hardware Keyboard
          1. 4.2.1.1. Direct Keyboard Polling
          2. 4.2.1.2. Checking for Key Pressed and Key Released States
        2. 4.2.2. Prompting the User to Enter Text
      3. 4.3. Reading the Accelerometer
        1. 4.3.1. Initializing the Accelerometer
        2. 4.3.2. Using the Accelerometer Data
        3. 4.3.3. Simulating the Accelerometer in the Emulator
      4. 4.4. Game in Focus: Cosmic Rocks (Part II)
        1. 4.4.1. Making the Player's Ship Shoot
          1. 4.4.1.1. Rotating the Ship to Face a Point
          2. 4.4.1.2. Firing a Bullet
        2. 4.4.2. Making the Player's Ship Move
        3. 4.4.3. Implementing Hyperspace
      5. 4.5. Considering Input Design
    4. 5. Sounding Out with Game Audio
      1. 5.1. Sound Effects and Music
      2. 5.2. Playing Sound Effects
        1. 5.2.1. Adding Sound Effects to your Project
        2. 5.2.2. Playing the Sound Effects
        3. 5.2.3. Integrating Sound Effects into the Game Framework
        4. 5.2.4. Sound Effect Instances
        5. 5.2.5. Other Sound Effect Properties
        6. 5.2.6. Obtaining Sound Effects for your Game
        7. 5.2.7. An Interactive Example
      3. 5.3. Playing Music
        1. 5.3.1. To Play or Not To Play
        2. 5.3.2. Adding Music to your Project
        3. 5.3.3. Playing the Music
      4. 5.4. Game in Focus: Cosmic Rocks (Part III)
      5. 5.5. Make Some Noise
    5. 6. Drawing with Vertices and Matrices
      1. 6.1. A New Approach to Drawing
        1. 6.1.1. Matrix-Based Positioning
        2. 6.1.2. Abstract Coordinate System
        3. 6.1.3. Drawing Primitives
        4. 6.1.4. Textures
        5. 6.1.5. XNA is a State Engine
      2. 6.2. Creating our First Vertex Rendering Project
        1. 6.2.1. Setting Up the Environment
        2. 6.2.2. Rendering the Object
        3. 6.2.3. Moving the Object
        4. 6.2.4. Adding some Sparkle
      3. 6.3. Tinting Objects
      4. 6.4. Understanding Matrix Transformations
        1. 6.4.1. Setting the Identity Matrix
        2. 6.4.2. Applying Translation Transformations
        3. 6.4.3. Applying Rotation Transformations
        4. 6.4.4. Applying Scaling Transformations
        5. 6.4.5. Applying Multiple Transformations
          1. 6.4.5.1. Rotating Objects
          2. 6.4.5.2. Scaling Objects
          3. 6.4.5.3. Applying Multiple Transformations in XNA
        6. 6.4.6. Specifying Vertex Positions
        7. 6.4.7. Drawing Multiple Objects at Different Positions
      5. 6.5. Drawing Primitives
        1. 6.5.1. Drawing Lines
        2. 6.5.2. Drawing Triangles
        3. 6.5.3. Drawing Points
      6. 6.6. Applying Textures
        1. 6.6.1. Loading Graphics
        2. 6.6.2. Setting the Active Texture
        3. 6.6.3. Applying the Texture to an Object
        4. 6.6.4. Preparing the Effect for Texture Mapping
        5. 6.6.5. Configuring the Sampler State
          1. 6.6.5.1. Updating the Sampler State
          2. 6.6.5.2. Texture Addressing Modes
          3. 6.6.5.3. Texture Filtering
        6. 6.6.6. Supported Texture Image Formats
        7. 6.6.7. Using Different Textures Within the Same Draw Call
      7. 6.7. Using Transparency and Alpha Blending
        1. 6.7.1. Enabling and Disabling Alpha Blending
        2. 6.7.2. XNA's Built-In Blend States
          1. 6.7.2.1. Opaque
          2. 6.7.2.2. AlphaBlend
          3. 6.7.2.3. Additive
        3. 6.7.3. Creating Custom Blend States
        4. 6.7.4. Object Transparency
      8. 6.8. Handling Orientations
      9. 6.9. Graphic Scaling
      10. 6.10. Integration into the Game Framework
        1. 6.10.1. The MatrixObjectBase Class
          1. 6.10.1.1. Object Transformation
          2. 6.10.1.2. Object Rendering
        2. 6.10.2. Updates to the GameHost Class
        3. 6.10.3. Using the Game Framework for Matrix Rendering
      11. 6.11. Enter the Matrix
    6. 7. The World of 3D Graphics
      1. 7.1. Perspective Projection
        1. 7.1.1. The Viewing Frustum
        2. 7.1.2. Defining the Viewing Frustum in XNA
      2. 7.2. Rendering 3D Objects
        1. 7.2.1. Defining a 3D Object
      3. 7.3. The Depth Buffer
        1. 7.3.1. Enabling and Disabling the Depth Buffer
        2. 7.3.2. Clearing the Depth Buffer
        3. 7.3.3. Rendering Transparent Objects with the Depth Buffer
      4. 7.4. Hidden Surface Culling
      5. 7.5. Vertex and Index Buffers
        1. 7.5.1. Using Vertex Buffers
        2. 7.5.2. Using Indexed Vertices
        3. 7.5.3. Using Vertex Buffers and Indexing Together
      6. 7.6. Lighting
        1. 7.6.1. Lights and Materials
        2. 7.6.2. Types of Illumination
          1. 7.6.2.1. Ambient Light
          2. 7.6.2.2. Diffuse Light
          3. 7.6.2.3. Specular Light
        3. 7.6.3. Material Properties
          1. 7.6.3.1. Diffuse Material
          2. 7.6.3.2. Specular Material
          3. 7.6.3.3. Emissive Material
        4. 7.6.4. Light and Material Interaction
        5. 7.6.5. Using Multiple Lights
        6. 7.6.6. Reusing Lights
        7. 7.6.7. Types of Light Source
        8. 7.6.8. How XNA Calculates Light Reflections
          1. 7.6.8.1. Describing a Triangle's Face Direction
          2. 7.6.8.2. Calculating Normals
          3. 7.6.8.3. Surface Normals and Vertex Normals
        9. 7.6.9. Adding Lighting to Games
          1. 7.6.9.1. Enabling and Disabling Lighting
          2. 7.6.9.2. Light Configuration
          3. 7.6.9.3. Ambient Light
          4. 7.6.9.4. Specular Light
          5. 7.6.9.5. Emissive Light
          6. 7.6.9.6. The Standard Lighting Rig
          7. 7.6.9.7. Programmatic Calculation of Normals
      7. 7.7. Orthographic Projection
        1. 7.7.1. The Viewing Frustum
        2. 7.7.2. Defining the Orthographic Viewing Frustum in XNA
        3. 7.7.3. Isometric Projection
        4. 7.7.4. Pixel-Aligned Projection
      8. 7.8. Mastering the 3D World
    7. 8. Further 3D Features and Techniques
      1. 8.1. Importing Geometry
        1. 8.1.1. SketchUp
          1. 8.1.1.1. Creating 3D Objects in SketchUp
          2. 8.1.1.2. Exporting 3D Geometry
        2. 8.1.2. Importing Saved Geometry into XNA Projects
        3. 8.1.3. Rendering Imported Geometry
        4. 8.1.4. Adding Support into the Game Framework
        5. 8.1.5. The Google SketchUp 3D Warehouse
        6. 8.1.6. Importing Other File Formats
      2. 8.2. Working with the Camera
        1. 8.2.1. Camera Position and Orientation
        2. 8.2.2. Integrating Camera Support into the Game Framework
          1. 8.2.2.1. The Camera Class
          2. 8.2.2.2. Camera Positioning
          3. 8.2.2.3. The Camera Object in Action
        3. 8.2.3. Creating a Chase Cam
          1. 8.2.3.1. Adding the Paper Plane
          2. 8.2.3.2. Animating the Plane
          3. 8.2.3.3. Implementing the Chase Cam
          4. 8.2.3.4. Using the Chase Cam
      3. 8.3. Adding Fog
      4. 8.4. Adding a Skybox
        1. 8.4.1. Creating Skyboxes
        2. 8.4.2. Implementing the Skybox into the Game Framework
      5. 8.5. Particles
        1. 8.5.1. How Particles are Implemented
        2. 8.5.2. Billboarding
        3. 8.5.3. Adding Particle Support to the Game Framework
        4. 8.5.4. Creating Fire and Smoke
        5. 8.5.5. Vapor and Smoke Trails
        6. 8.5.6. Fairy Dust
      6. 8.6. Using Effect Objects
        1. 8.6.1. Effect Capabilities
        2. 8.6.2. AlphaTestEffect
        3. 8.6.3. DualTextureEffect
        4. 8.6.4. EnvironmentMapEffect
          1. 8.6.4.1. Preparing the Environment Map
          2. 8.6.4.2. Environment Map Properties
          3. 8.6.4.3. Rendering Untextured Objects with Environment Maps
        5. 8.6.5. SkinnedEffect
      7. 8.7. Mixing Sprite and Matrix Rendering
      8. 8.8. A Universe of Possibilities
    8. 9. Enhancing Your Game
      1. 9.1. Managing Game Settings
        1. 9.1.1. Class Structure
        2. 9.1.2. Setting and Retrieving Values
        3. 9.1.3. Displaying a Settings Screen
        4. 9.1.4. Creating the Settings User Interface
          1. 9.1.4.1. Opening the Settings Screen
          2. 9.1.4.2. Updating the Settings Values
          3. 9.1.4.3. Leaving the Settings Screen
      2. 9.2. Planning a Game's Navigation Model
      3. 9.3. Adding a High Score Table
        1. 9.3.1. Implementing the High Score Table
          1. 9.3.1.1. Defining Tables
          2. 9.3.1.2. Working with High Score Tables
          3. 9.3.1.3. High Score Entries
          4. 9.3.1.4. Clearing Existing High Scores
          5. 9.3.1.5. Loading and Saving Scores
          6. 9.3.1.6. Reading and Writing Files in Isolated Storage
        2. 9.3.2. Using the HighScore Classes in a Game
      4. 9.4. Reusing Game Components
    9. 10. The Application Life Cycle
      1. 10.1. The Effects of Losing Focus
      2. 10.2. Life Cycle Events
        1. 10.2.1. The Launching Event
        2. 10.2.2. The Closing Event
        3. 10.2.3. The Deactivated Event
        4. 10.2.4. The Activated Event
        5. 10.2.5. Handling the Life Cycle Events
        6. 10.2.6. Seeing the Events in Action
      3. 10.3. Persisting Session State
        1. 10.3.1. Controlling Serialization
        2. 10.3.2. DataContracts and Inheritance
        3. 10.3.3. Persisting Nonserializable Data
      4. 10.4. Tombstoning in the Game Framework
        1. 10.4.1. Setting up the GameHost Event Handlers
        2. 10.4.2. Preparing the Classes for Serialization
        3. 10.4.3. Persisting Content References
        4. 10.4.4. Automatic Storage and Retrieval of Game Objects in the State Dictionary
        5. 10.4.5. Identifying Specific Objects After Tombstoning
        6. 10.4.6. Game Initialization
        7. 10.4.7. Troubleshooting Serialization
      5. 10.5. Returning from the Grave
  8. III. Silverlight
    1. 11. Getting Started with Silverlight
      1. 11.1. A Brief History of Silverlight
        1. 11.1.1. Windows Presentation Foundation
        2. 11.1.2. Silverlight
        3. 11.1.3. Silverlight on Windows Phone
      2. 11.2. Creating Silverlight Projects for Windows Phone
        1. 11.2.1. Choosing a Project Template
          1. 11.2.1.1. Windows Phone Application Template
          2. 11.2.1.2. Windows Phone Databound Application Template
          3. 11.2.1.3. Windows Phone Class Library Template
          4. 11.2.1.4. Windows Phone Panorama Application Template
          5. 11.2.1.5. Windows Phone Pivot Application Template
        2. 11.2.2. Working with Silverlight Projects
        3. 11.2.3. Examining the Solution in More Detail
          1. 11.2.3.1. The Project Structure
          2. 11.2.3.2. Project Images
          3. 11.2.3.3. The App.xaml File
          4. 11.2.3.4. The MainPage.xaml file
          5. 11.2.3.5. The Hidden Source Files
        4. 11.2.4. Referencing Other Projects
      3. 11.3. Exploring XAML
        1. 11.3.1. What Is XAML For?
        2. 11.3.2. The Silverlight Page Structure
        3. 11.3.3. XAML's Syntax
          1. 11.3.3.1. Starting Off with App.xaml
          2. 11.3.3.2. Moving On to MainPage.xaml
          3. 11.3.3.3. Returning to App.xaml
          4. 11.3.3.4. XAML Syntax Summary
      4. 11.4. Working with the Page Designer
        1. 11.4.1. Adding and Positioning Elements
        2. 11.4.2. The Document Outline Window
        3. 11.4.3. Using the Properties Window
        4. 11.4.4. Understanding Control Alignment
      5. 11.5. Colors and Brushes
        1. 11.5.1. Color Specifications
        2. 11.5.2. Brushes
          1. 11.5.2.1. SolidColorBrush
          2. 11.5.2.2. LinearGradientBrush
          3. 11.5.2.3. RadialGradientBrush
          4. 11.5.2.4. ImageBrush
        3. 11.5.3. Setting Colors in Code
        4. 11.5.4. Using Brushes Together
      6. 11.6. Exploring Silverlight
    2. 12. Silverlight Controls and Pages
      1. 12.1. The Silverlight Controls
        1. 12.1.1. Display Controls
          1. 12.1.1.1. TextBlock Controls
          2. 12.1.1.2. Image Controls
          3. 12.1.1.3. ProgressBar Controls
          4. 12.1.1.4. Ellipse and Rectangle Controls
          5. 12.1.1.5. Line, Polyline, and Polygon Controls
        2. 12.1.2. Interactive Controls
          1. 12.1.2.1. TextBox Controls
          2. 12.1.2.2. ListBox Controls
          3. 12.1.2.3. ComboBox Controls
          4. 12.1.2.4. CheckBox Controls
          5. 12.1.2.5. RadioButton Controls
          6. 12.1.2.6. Button Controls
          7. 12.1.2.7. ApplicationBar Controls
        3. 12.1.3. Layout Controls
          1. 12.1.3.1. Grid Controls
          2. 12.1.3.2. StackPanel Controls
          3. 12.1.3.3. Canvas Controls
          4. 12.1.3.4. ScrollViewer Controls
          5. 12.1.3.5. Border Controls
        4. 12.1.4. User Interface Design
      2. 12.2. Using Control Transforms and Projections
        1. 12.2.1. Using RotateTransform
        2. 12.2.2. Using ScaleTransform
        3. 12.2.3. Using SkewTransform
        4. 12.2.4. Using TranslateTransform
        5. 12.2.5. Using TransformGroups
        6. 12.2.6. Using CompositeTransform
        7. 12.2.7. Using Projection
      3. 12.3. Orientation
      4. 12.4. Running in Full Screen Mode
      5. 12.5. Multipage Projects
        1. 12.5.1. Adding New Pages to a Project
        2. 12.5.2. Navigating Between Pages
        3. 12.5.3. Passing Values When Navigating
          1. 12.5.3.1. Adding URI Query String Elements
          2. 12.5.3.2. Passing Values with the DataContext Object
      6. 12.6. Game On. . .
    3. 13. Gaming with Silverlight
      1. 13.1. Creating Sprites
        1. 13.1.1. Sprite User Control
        2. 13.1.2. Sprite Image Handling
        3. 13.1.3. Positioning the Sprite
        4. 13.1.4. Sprite Transformations
        5. 13.1.5. Adding Sprites to a Silverlight Page
        6. 13.1.6. Creating Sprites at Runtime
        7. 13.1.7. Sprite Examples
      2. 13.2. Sprite Movement
        1. 13.2.1. Procedural Animation
        2. 13.2.2. Storyboard Animation
          1. 13.2.2.1. Storyboard Features
          2. 13.2.2.2. Using Storyboards
          3. 13.2.2.3. Integrating Storyboard Support into the Sprite Control
          4. 13.2.2.4. Storyboard Raindrops
      3. 13.3. Silverlight Performance
        1. 13.3.1. Reading the Frame Rate Counters
          1. 13.3.1.1. Compositor Thread Frame Rate
          2. 13.3.1.2. GPU Surface Count
          3. 13.3.1.3. Fill Rate Counter
        2. 13.3.2. Using Cache Visualization
        3. 13.3.3. Viewing Redraw Regions
      4. 13.4. User Input
        1. 13.4.1. Control Events
          1. 13.4.1.1. Mouse Events
          2. 13.4.1.2. Manipulation Events
          3. 13.4.1.3. Event Bubbling
        2. 13.4.2. Touch Events
          1. 13.4.2.1. Single-Touch Input
          2. 13.4.2.2. Multitouch Input
        3. 13.4.3. Gestures
        4. 13.4.4. Accelerometer
      5. 13.5. Game in Focus: Diamond Lines, Part I
        1. 13.5.1. Sprite Configuration
        2. 13.5.2. Game Flow
        3. 13.5.3. Input Processing
        4. 13.5.4. Sprite Animation
      6. 13.6. Using Silverlight for Game Development
    4. 14. Enhancing Your Silverlight Games
      1. 14.1. Game Navigation
        1. 14.1.1. Defining the Navigation Flow
        2. 14.1.2. Redirecting Navigation
        3. 14.1.3. Implementing the Navigation Flow
        4. 14.1.4. Navigating Between Pages
        5. 14.1.5. Maintaining Game State
      2. 14.2. Game Settings
      3. 14.3. Creating a High Score Table
        1. 14.3.1. The High Score Table Classes
        2. 14.3.2. Instantiating the HighScores Object
        3. 14.3.3. Adding New Score Entries
        4. 14.3.4. Displaying the Scores
      4. 14.4. Playing Music and Sound Effects
        1. 14.4.1. Accessing the XNA Audio Library
        2. 14.4.2. Initializing the XNA Dispatch Timer
        3. 14.4.3. Playing Sound Effects
        4. 14.4.4. Playing Music
      5. 14.5. Application Life Cycle
        1. 14.5.1. Exploring Tombstoning Behavior in Silverlight
        2. 14.5.2. Storing and Restoring State
      6. 14.6. Game in Focus: Diamond Lines, Part II
        1. 14.6.1. Adding Game Navigation
        2. 14.6.2. Maintaining Game State
        3. 14.6.3. Tombstoning Support
        4. 14.6.4. Adding Game Settings
        5. 14.6.5. Implementing the Sound Effects
      7. 14.7. Gaming with Silverlight
  9. IV. Distribution
    1. 15. Distributing Your Game
      1. 15.1. Testing Your Game
      2. 15.2. Trial Mode
        1. 15.2.1. Detecting Trial Mode
        2. 15.2.2. Purchasing the Full Version
        3. 15.2.3. Offering Promotional Upgrades
      3. 15.3. Submission Requirements
        1. 15.3.1. Content Policies
        2. 15.3.2. Application Requirements
        3. 15.3.3. Localization
        4. 15.3.4. Application Features
        5. 15.3.5. Reliability and Performance
        6. 15.3.6. Technical Information
        7. 15.3.7. Music and Sound
      4. 15.4. Preparing for Distribution
        1. 15.4.1. Setting the Assembly Information
        2. 15.4.2. Setting the Assembly Version
        3. 15.4.3. Setting the Project Properties
        4. 15.4.4. Setting the Manifest Properties
        5. 15.4.5. Providing Graphics Files
        6. 15.4.6. Compiling the Game
      5. 15.5. Selling or Giving Your Game for Free
      6. 15.6. Submitting Your Game to the Marketplace
      7. 15.7. Promoting Your Game
        1. 15.7.1. Capturing Your Game in Motion
        2. 15.7.2. Editing Your Video Clip
      8. 15.8. Go Create!
    2. 16. Running on Other Platforms
      1. 16.1. Running XNA Projects in Windows
        1. 16.1.1. Porting Projects to Windows
        2. 16.1.2. Using Conditional Compilation
        3. 16.1.3. Project Differences
        4. 16.1.4. Display Differences
          1. 16.1.4.1. Setting the Window Size
          2. 16.1.4.2. Using Full Screen Mode
          3. 16.1.4.3. Showing and Hiding the Mouse Cursor
        5. 16.1.5. Input Differences
          1. 16.1.5.1. Mouse Input
          2. 16.1.5.2. Gestures
          3. 16.1.5.3. Keyboard Input
          4. 16.1.5.4. GamePad Input
        6. 16.1.6. Isolated Storage
        7. 16.1.7. Application Life Cycle
        8. 16.1.8. Converting the Game Framework to Run on Windows
          1. 16.1.8.1. Storing and Retrieving Game Settings
          2. 16.1.8.2. Application Life Cycle Events
          3. 16.1.8.3. High Scores
          4. 16.1.8.4. Everything Else
        9. 16.1.9. Trial Mode
        10. 16.1.10. Distribution
        11. 16.1.11. Revisiting Some Example Projects
          1. 16.1.11.1. The FireAndSmoke Project
          2. 16.1.11.2. The VaporTrailTS project
        12. 16.1.12. Developing Games for Windows Phone 7 and Windows
      2. 16.2. Running Silverlight Projects in the Browser
        1. 16.2.1. Differences between Silverlight and Silverlight for Windows Phone
        2. 16.2.2. Converting Projects from Windows Phone 7
          1. 16.2.2.1. Creating a New Silverlight Project
          2. 16.2.2.2. Silverlight Navigation Model
          3. 16.2.2.3. Adding the Project Pages
        3. 16.2.3. Example Projects
          1. 16.2.3.1. Navigation
          2. 16.2.3.2. Diamond Lines
      3. 16.3. Let's Play. . .

Product information

  • Title: Windows Phone 7 Game Development
  • Author(s):
  • Release date: December 2010
  • Publisher(s): Apress
  • ISBN: 9781430233060