𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

Windows Phone 7 Game Development

✍ Scribed by Adam Dawes


Publisher
Springer
Year
2010
Tongue
English
Leaves
579
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


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 these devices. The platform is an ideal environment for .NET developers looking to create fun, sophisticated games.

Windows Phone 7 Game Development gives you everything you need to maximize your creativity and produce fantastic mobile games. With a gaming device always in your pocket, as a phone always is, this is too good an opportunity to miss!

✦ Table of Contents


Title Page
Copyright Page
Contents at a Glance
Table of Contents
About the Author
About the Technical Reviewer
Acknowledgments
Introduction
This Goal of This Book
Who This Book Is For
Chapter Overview
PART 1 The Beginning
CHAPTER 1 Windows Phone and .NET
Looking Closely at Visual Studio Development for WindowsPhone
Language Choices
IDE Features
Emulators
Silverlight Page Designer
Breakpoints
Debug Output
Windows Phone Platform
Screen Hardware
Hardware Buttons
Processors
Graphics Hardware
Location and Orientation
Cooperation with the Device
Using Visual Studio for Windows Phone Development
Installing Visual Studio
Creating a Windows Phone Project
Project Templates
Designing a Page
Running the Application
Running on a Real Device
Registering the Device
Deploying to the Device from Visual Studio
Debugging
Breakpoints
Debug Output
Getting Help
MSDN
Search Engines
Microsoft’s Windows Phone Developer Center
Community Sites
Windows Phone Game Development
Suitable Games
Selecting an Application Framework
XNA
Silverlight
Welcome to the World of Windows Phone Development
PART 2 XNA
CHAPTER 2 Getting Started with XNA
What Is XNA?
Your First XNA Project
Creating the Project
Adding Some Content
Displaying the Graphic
Moving the Graphic
Examining the Solution in More Detail
The Game Project
The Content Project
Sprites in Detail
Supported Graphic Formats
Scaling
Using a Uniform Scaling Factor
Using a Non-uniform Scaling Factor
Using a Destination Rectangle
Rotation
Tinting
Partial Image Rendering
Layer Depth
Sprite Transparency
Color Key Transparency
Alpha Channel Transparency
Alpha Tinting
Useful Sprite Effects
Setting a Background Image
Fading to Black
Fading between Images
Displaying Text
Font Support
Creating SpriteFont Objects
Displaying Text
Other Graphics Options
Rendering in Full Screen Mode
Supporting Portrait and Landscape Orientations
Using Portrait Orientation
Using Landscape Orientation
Allowing Landscape and Portrait Orientations
Graphic Scaling
Suppressing Drawing
Experiment and Play with XNA
CHAPTER 3 Creating a Game Framework
Designing the Game Framework
The GameObjectBase Class
The SpriteObject Class
The TextObject Class
The GameHost Class
The GameHelper Class
Using the Game Framework
Referencing the GameFramework Project
Setting Inheritance for the Main Game Class
Creating Derived SpriteObject Classes
The BoxObject Class
The BallObject Class
Adding Game Objects to the Game Host
Removing Objects from the Game Host
Overriding Object Properties
Benchmarking and Performance
The BenchmarkObject Class
Using BenchmarkObject
Performance Considerations
Texture Loading
Creating and Destroying Objects
Using for and foreach Loops
Game in Focus: Cosmic Rocks (Part I)
Designing the Game
Creating the Graphics
Creating the Game Objects
The RockObject Class
The SpaceshipObject Class
The ParticleObject Class
The StarObject Class
Running the Game
Creating XNA Games
CHAPTER 4 User Input
Using the Touch Screen
Reading Raw Touch Data
The Life and Times of a Touch Point
Finding a Touch Point’s Previous Location
Touch Panel Capabilities
Working with Rotated and Scaled Screens
Reading Input Using the Touch Gestures
Enabling the Gestures
Processing Gestures
Tap and DoubleTap
Hold
VerticalDrag, HorizontalDrag and FreeDrag
Flick
Pinch
Working with Rotated and Scaled Screens
Experimenting with the Gestures API
Sprite Hit Testing
Bounding Box Hit Tests
Rectangular Hit Tests
Elliptical Hit Tests
Building the Hit Tests into the Game Framework
Retrieving the Objects at a Hit Location
Hit Testing Example Projects
Initiating Object Motion
Dragging Objects
Flicking Objects
Finger-Friendly Gaming
Reading the Keyboard and Text Input
Using a Hardware Keyboard
Direct Keyboard Polling
Checking for Key Pressed and Key Released States
Prompting the User to Enter Text
Reading the Accelerometer
Initializing the Accelerometer
Using the Accelerometer Data
Simulating the Accelerometer in the Emulator
Game in Focus: Cosmic Rocks (Part II)
Making the Player’s Ship Shoot
Rotating the Ship to Face a Point
Firing a Bullet
Making the Player’s Ship Move
Implementing Hyperspace
Considering Input Design
CHAPTER 5 Sounding Out with Game Audio
Sound Effects and Music
Playing Sound Effects
Adding Sound Effects to your Project
Playing the Sound Effects
Integrating Sound Effects into the Game Framework
Sound Effect Instances
Other Sound Effect Properties
Obtaining Sound Effects for your Game
An Interactive Example
Playing Music
To Play or Not To Play
Adding Music to your Project
Playing the Music
Game in Focus: Cosmic Rocks (Part III)
Make Some Noise
CHAPTER 6 Drawing with Vertices and Matrices
A New Approach to Drawing
Matrix-Based Positioning
Abstract Coordinate System
Drawing Primitives
Textures
XNA is a State Engine
Creating our First Vertex Rendering Project
Setting Up the Environment
Rendering the Object
Moving the Object
Adding some Sparkle
Tinting Objects
Understanding Matrix Transformations
Setting the Identity Matrix
Applying Translation Transformations
Applying Scaling Transformations
Applying Multiple Transformations
Rotating Objects
Scaling Objects
Applying Multiple Transformations in XNA
Specifying Vertex Positions
Drawing Multiple Objects at Different Positions
Drawing Primitives
Drawing Lines
Drawing Triangles
Drawing Points
Applying Textures
Loading Graphics
Setting the Active Texture
Applying the Texture to an Object
Preparing the Effect for Texture Mapping
Configuring the Sampler State
Updating the Sampler State
Texture Addressing Modes
Texture Filtering
Supported Texture Image Formats
Using Different Textures Within the Same Draw Call
Using Transparency and Alpha Blending
Enabling and Disabling Alpha Blending
XNA’s Built-In Blend States
Opaque
AlphaBlend
Additive
Creating Custom Blend States
Object Transparency
Handling Orientations
Graphic Scaling
Integration into the Game Framework
The MatrixObjectBase Class
Object Transformation
Object Rendering
Updates to the GameHost Class
Using the Game Framework for Matrix Rendering
Enter the Matrix
CHAPTER 7 The World of 3D Graphics
Perspective Projection
The Viewing Frustum
Defining the Viewing Frustum in XNA
Rendering 3D Objects
Defining a 3D Object
The Depth Buffer
Enabling and Disabling the Depth Buffer
Clearing the Depth Buffer
Rendering Transparent Objects with the Depth Buffer
Hidden Surface Culling
Vertex and Index Buffers
Using Vertex Buffers
Using Indexed Vertices
Using Vertex Buffers and Indexing Together
Lighting
Lights and Materials
Types of Illumination
Ambient Light
Diffuse Light
Specular Light
Material Properties
Diffuse Material
Specular Material
Emissive Material
Light and Material Interaction
Using Multiple Lights
Reusing Lights
Types of Light Source
How XNA Calculates Light Reflections
Describing a Triangle’s Face Direction
Calculating Normals
Surface Normals and Vertex Normals
Adding Lighting to Games
Enabling and Disabling Lighting
Light Configuration
Ambient Light
Specular Light
Emissive Light
The Standard Lighting Rig
Programmatic Calculation of Normals
Orthographic Projection
The Viewing Frustum
Defining the Orthographic Viewing Frustum in XNA
Isometric Projection
Pixel-Aligned Projection
Mastering the 3D World
CHAPTER 8 Further 3D Features and Techniques
Importing Geometry
SketchUp
Creating 3D Objects in SketchUp
Exporting 3D Geometry
Importing Saved Geometry into XNA Projects
Rendering Imported Geometry
Adding Support into the Game Framework
The Google SketchUp 3D Warehouse
Importing Other File Formats
Working with the Camera
Camera Position and Orientation
Integrating Camera Support into the Game Framework
The Camera Class
Camera Positioning
The Camera Object in Action
Creating a Chase Cam
Adding the Paper Plane
Animating the Plane
Implementing the Chase Cam
Using the Chase Cam
Adding Fog
Adding a Skybox
Creating Skyboxes
Implementing the Skybox into the Game Framework
Particles
How Particles are Implemented
Billboarding
Adding Particle Support to the Game Framework
Creating Fire and Smoke
Vapor and Smoke Trails
Fairy Dust
Using Effect Objects
Effect Capabilities
AlphaTestEffect
DualTextureEffect
EnvironmentMapEffect
Preparing the Environment Map
Environment Map Properties
Rendering Untextured Objects with Environment Maps
SkinnedEffect
Mixing Sprite and Matrix Rendering
A Universe of Possibilities
CHAPTER 9 Enhancing Your Game
Managing Game Settings
Class Structure
Setting and Retrieving Values
Displaying a Settings Screen
Creating the Settings User Interface
Opening the Settings Screen
Updating the Settings Values
Leaving the Settings Screen
Planning a Game’s Navigation Model
Adding a High Score Table
Implementing the High Score Table
Defining Tables
Working with High Score Tables
High Score Entries
Clearing Existing High Scores
Loading and Saving Scores
Reading and Writing Files in Isolated Storage
Using the HighScore Classes in a Game
Reusing Game Components
CHAPTER 10 The Application Life Cycle
The Effects of Losing Focus
Life Cycle Events
The Launching Event
The Closing Event
The Deactivated Event
The Activated Event
Handling the Life Cycle Events
Seeing the Events in Action
Persisting Session State
Controlling Serialization
DataContracts and Inheritance
Persisting Nonserializable Data
Tombstoning in the Game Framework
Setting up the GameHost Event Handlers
Preparing the Classes for Serialization
Persisting Content References
Automatic Storage and Retrieval of Game Objects in the State Dictionary
Identifying Specific Objects After Tombstoning
Game Initialization
Troubleshooting Serialization
Returning from the Grave
PART 3 Silverlight
CHAPTER 11 Getting Started with Silverlight
A Brief History of Silverlight
Windows Presentation Foundation
Silverlight
Silverlight on Windows Phone
Creating Silverlight Projects for Windows Phone
Choosing a Project Template
Windows Phone Application Template
Windows Phone Databound Application Template
Windows Phone Class Library Template
Windows Phone Panorama Application Template
Windows Phone Pivot Application Template
Working with Silverlight Projects
Examining the Solution in More Detail
The Project Structure
Project Images
The App.xaml File
The MainPage.xaml file
The Hidden Source Files
Referencing Other Projects
Exploring XAML
What Is XAML For?
The Silverlight Page Structure
XAML’s Syntax
Starting Off with App.xaml
Moving On to MainPage.xaml
Returning to App.xaml
XAML Syntax Summary
Working with the Page Designer
Adding and Positioning Elements
The Document Outline Window
Using the Properties Window
Understanding Control Alignment
Colors and Brushes
Color Specifications
Brushes
SolidColorBrush
LinearGradientBrush
RadialGradientBrush
ImageBrush
Setting Colors in Code
Using Brushes Together
Exploring Silverlight
CHAPTER 12 Silverlight Controls and Pages
The Silverlight Controls
Display Controls
TextBlock Controls
Image Controls
ProgressBar Controls
Ellipse and Rectangle Controls
Line, Polyline, and Polygon Controls
Interactive Controls
TextBox Controls
ListBox Controls
ComboBox Controls
CheckBox Controls
RadioButton Controls
Button Controls
ApplicationBar Controls
Layout Controls
Grid Controls
StackPanel Controls
Canvas Controls
ScrollViewer Controls
Border Controls
User Interface Design
Using Control Transforms and Projections
Using RotateTransform
Using ScaleTransform
Using SkewTransform
Using TranslateTransform
Using TransformGroups
Using CompositeTransform
Using Projection
Orientation
Running in Full Screen Mode
Multipage Projects
Adding New Pages to a Project
Navigating Between Pages
Passing Values When Navigating
Adding URI Query String Elements
Passing Values with the DataContext Object
Game On…
CHAPTER 13 Gaming with Silverlight
Creating Sprites
Sprite User Control
Sprite Image Handling
Positioning the Sprite
Sprite Transformations
Adding Sprites to a Silverlight Page
Creating Sprites at Runtime
Sprite Examples
Sprite Movement
Procedural Animation
Storyboard Animation
Storyboard Features
Using Storyboards
Integrating Storyboard Support into the Sprite Control
Storyboard Raindrops
Silverlight Performance
Reading the Frame Rate Counters
Compositor Thread Frame Rate
GPU Surface Count
Fill Rate Counter
Using Cache Visualization
Viewing Redraw Regions
User Input
Control Events
Mouse Events
Manipulation Events
Event Bubbling
Touch Events
Single-Touch Input
Multitouch Input
Gestures
Accelerometer
Game in Focus: Diamond Lines, Part I
Sprite Configuration
Game Flow
Input Processing
Sprite Animation
Using Silverlight for Game Development
CHAPTER 14 Enhancing Your Silverlight Games
Game Navigation
Defining the Navigation Flow
Redirecting Navigation
Implementing the Navigation Flow
Navigating Between Pages
Maintaining Game State
Game Settings
Creating a High Score Table
The High Score Table Classes
Instantiating the HighScores Object
Adding New Score Entries
Displaying the Scores
Playing Music and Sound Effects
Accessing the XNA Audio Library
Initializing the XNA Dispatch Timer
Playing Sound Effects
Playing Music
Application Life Cycle
Exploring Tombstoning Behavior in Silverlight
Storing and Restoring State
Game in Focus: Diamond Lines, Part II
Adding Game Navigation
Maintaining Game State
Tombstoning Support
Adding Game Settings
Implementing the Sound Effects
Gaming with Silverlight
PART 4 Distribution
CHAPTER 15 Distributing Your Game
Testing Your Game
Trial Mode
Detecting Trial Mode
Purchasing the Full Version
Offering Promotional Upgrades
Submission Requirements
Content Policies
Application Requirements
Localization
Application Features
Reliability and Performance
Technical Information
Music and Sound
Preparing for Distribution
Setting the Assembly Information
Setting the Assembly Version
Setting the Project Properties
Setting the Manifest Properties
Providing Graphics Files
Compiling the Game
Selling or Giving Your Game for Free
Submitting Your Game to the Marketplace
Promoting Your Game
Capturing Your Game in Motion
Editing Your Video Clip
Go Create!
CHAPTER 16 Running on Other Platforms
Running XNA Projects in Windows
Porting Projects to Windows
Using Conditional Compilation
Project Differences
Display Differences
Setting the Window Size
Using Full Screen Mode
Showing and Hiding the Mouse Cursor
Input Differences
Mouse Input
Gestures
Keyboard Input
GamePad Input
Isolated Storage
Application Life Cycle
Converting the Game Framework to Run on Windows
Storing and Retrieving Game Settings
Application Life Cycle Events
High Scores
Everything Else
Trial Mode
Distribution
Revisiting Some Example Projects
The FireAndSmoke Project
The VaporTrailTS project
Developing Games for Windows Phone 7 and Windows
Running Silverlight Projects in the Browser
Differences between Silverlight and Silverlight for Windows Phone
Converting Projects from Windows Phone 7
Creating a New Silverlight Project
Silverlight Navigation Model
Adding the Project Pages
Example Projects
Navigation
Diamond Lines
Let’s Play…
Index


πŸ“œ SIMILAR VOLUMES


Windows Phone 7 Game Development
✍ Adam Dawes πŸ“‚ Library πŸ“… 2010 πŸ› Apress 🌐 English

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 these devices. The platform is an ideal environment for .NET developers looking to create fun, sophisticated games. Window

Windows Phone 7 Game Development
✍ Adam Dawes πŸ“‚ Library πŸ“… 2010 πŸ› Apress 🌐 English

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 these devices. The platform is an ideal environment for .NET developers looking to create fun, sophisticated games. W

Windows Phone 7 development internals: C
✍ Andrew Whitechapel πŸ“‚ Library πŸ“… 2012 πŸ› Microsoft Press 🌐 English

Drill into Windows Phone 7 design and architecture β€” and learn best practices for building a variety of applications. Each chapter focuses on a single Windows Phone building block or feature area, and shows you how to apply it in your applications. If youΒ’re an experienced .NET developer familiar wi

Windows Phone 7 development internals: C
✍ Andrew Whitechapel πŸ“‚ Library πŸ“… 2012 πŸ› Microsoft Press 🌐 English

Drill into Windows Phone 7 design and architecture β€” and learn best practices for building a variety of applications. Each chapter focuses on a single Windows Phone building block or feature area, and shows you how to apply it in your applications. If you're an experienced .NET developer familiar wi

Windows Phone 7 Development Internals: C
✍ Andrew Whitechapel πŸ“‚ Library πŸ“… 2012 πŸ› Microsoft Press 🌐 English

Build Windows Phone applications optimized for performance and security. Drill into Windows Phone 7 design and architecture - and learn best practices for building a variety of applications. Each chapter focuses on a single Windows Phone building block or feature area, and shows you how to apply it