Windows Phone 7 XNA Cookbook

Over 70 recipes for making your own games with this Microsoft Windows Phone 7 XNA book and eBook

Windows Phone 7 XNA Cookbook

Cookbook
Zheng Yang

Over 70 recipes for making your own games with this Microsoft Windows Phone 7 XNA book and eBook
$26.99
$44.99
RRP $26.99
RRP $44.99
eBook
Print + eBook
$12.99 p/month

Get Access

Get Unlimited Access to every Packt eBook and Video course

Enjoy full and instant access to over 3000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781849691208
Paperback450 pages

About This Book

  • Complete focus on the best Windows Phone 7 game development techniques using XNA 4.0
  • Easy to follow cookbook allowing you to dive in wherever you want.
  • Convert ideas into action using practical recipes

Who This Book Is For

If you are an aspiring programmer with some basic concepts in C# and object-oriented knowledge who wants to create games for Windows Phone 7, this book is for you. This book is also for the experienced programmers want to transfer from Windows or Xbox to the Windows Phone 7 platform. Only basic knowledge of C# and .Net is required.

Table of Contents

Chapter 1: Jump into Windows Phone Developer Tools and XNA Game Studio 4.0
Introduction
Installing Windows Phone Developer Tools
Creating your first Windows Phone XNA application
Deploying your game on an emulator or device
Getting familiar with orientation
Using DrawableComponent and GameServices
Chapter 2: Playing with Windows Phone Touch and Sensors
Introduction
Creating your first touch application/game
Taking your touch application to the next level
Creating a Touch Directional Pad (D-pad)
Dragging and swiping objects
Controlling images with Multi-Touch control
Using accelerometer to make a ball move on your phone
Chapter 3: Coordinates and View Your First Step into XNA Game Development on Windows Phone 7
Introduction
Drawing the axes for a 2D game
Setting up the position, direction, and field of view of a fixed camera
Drawing the axes for a 3D game
Implementing a first-person shooter (FPS) camera in your game
Implementing a round rotating camera in a 3D game
Implementing a chase camera
Using culling to remove the unseen parts and texture mapping
Chapter 4: Heads Up Display (HUD) Your Phone Game User Interface
Introduction
Scaling an image
Creating a Simple Sprite Sheet animation in a 2D game
Creating a Complex Sprite Sheet animation in a 2D game
Creating a text animation in Adventure Genre (AVG) game
Creating a text-based menu the easiest menu to create
Creating an image-based menu
Creating a 3D model-based menu
Creating a progress bar for game content loading and value status
Creating buttons in your game
Creating a listbox to speed up your information management in a game
Creating a text input control to communicate with others in a game
Chapter 5: Content Processing
Introduction
The architecture and flow of content processing
Creating a custom importer and processor for your text
Processing XML files
Manipulating the extracted information from an image in the content pipeline
Extracting BoundingSphere and BoundingBox information from models
Chapter 6: Entering the Exciting World of 3D Models
Introduction
Controlling a model with the help of trackball rotation
Translating the model in world coordinates
Scaling a model
Viewing the model hierarchy information
Highlighting individual meshes of a model
Implementing a rigid model animation
Creating a terrain with texture mapping
Customizing vertex formats
Calculating the normal vectors from a model vertex
Simulating an ocean on your CPU
Chapter 7: Collision Detection
Introduction
Detecting the intersection of line segments
Implementing per pixel collision detection in a 2D game
Implementing BoundingBox collision detection in a 3D game
Implementing BoundingSphere collision detection in a 3D game
Implementing ray-triangle collision detection
Mapping a tapped location to 3D
Implementing sphere-triangle collision detection
Making a 3D ball move along a curved surface
Chapter 8: Embedding Audio in your Game
Introduction
Controlling an audio file
Adding sound effects to your game
Adding stereo sounds to your game
Chapter 9: Special Effects
Introduction
Using dual texture effects
Using environment map effects
Rendering different parts of a character into textures using RenderTarget2D
Creating a screen transition effect using RenderTarget2D
Chapter 10: Performance Optimization Fast! Faster!
Introduction
Optimizing your game's performance
Using the EQATEC Profiler to profile your game's running time
Reducing the game contents' loading time
Improving game performance with garbage collection
Preferring struct rather than class when just an instance is needed
Chapter 11: Launching to the Marketplace
Introduction
Preparing to submit your application to the Marketplace
Application submission checklist
Submitting your application to the Marketplace

What You Will Learn

  • Full 2D sprite animation, texture presentation.
  • Concise and clear instructions for high performance 3D graphics rendering.
  • Using accelerometer to control the game object.
  • Apply the tap, flick, hold and drag gestures on Windows Phone 7 touch screen for different situations.
  • Understanding the XNA content pipeline for improved game asset processing and management.
  • A practical guide for collision detection.
  • Explore the GUI system development.
  • Add sound and apply the 3D effect to your game.
  • Render terrain and water on CPU.
  • Work with game cameras.
  • Learn key-frame based and skeletal animation techniques.
  • Hook up your game to Xbox Live.

In Detail

Developing games for Windows Phone 7, a new mobile platform, is your big chance to impact the world of mobile games. The XNA 4.0 for Windows Phone 7 integrates a lot of capabilities from software and hardware for you to create incredible games. The next generation of mobile games will be built by you.

Windows Phone 7 XNA Cookbook is the best choice for you to make a game on Windows Phone 7. The book helps you to master the indispensable techniques to create your games using XNA 4.0. From the basics such as animating a 2D sprite and interacting with the customized graphical user interface to the more challenging such as 3D graphic rendering and collision detection.

This comprehensive cookbook covers all the essential areas of XNA game development for Windows Phone 7, such as approaches to control the sensors, gestures and typical kinds of cameras. We also have recipes for sprite animation, texture rendering, and graphical user interface development that will give you a powerful tool to work with 2D effects. After this we move onto the more juicy stuff with recipes covering 3D graphic rendering and collision detection, and major ways to improve your loading efficiency. You will also work with Xbox live so you can take your game global. Finally, no mobile game development book would be complete without a look at performance optimization to make your games run faster. Windows Phone 7 XNA Cookbook will equip you with the firepower to rock the game world.

Authors

Table of Contents

Chapter 1: Jump into Windows Phone Developer Tools and XNA Game Studio 4.0
Introduction
Installing Windows Phone Developer Tools
Creating your first Windows Phone XNA application
Deploying your game on an emulator or device
Getting familiar with orientation
Using DrawableComponent and GameServices
Chapter 2: Playing with Windows Phone Touch and Sensors
Introduction
Creating your first touch application/game
Taking your touch application to the next level
Creating a Touch Directional Pad (D-pad)
Dragging and swiping objects
Controlling images with Multi-Touch control
Using accelerometer to make a ball move on your phone
Chapter 3: Coordinates and View Your First Step into XNA Game Development on Windows Phone 7
Introduction
Drawing the axes for a 2D game
Setting up the position, direction, and field of view of a fixed camera
Drawing the axes for a 3D game
Implementing a first-person shooter (FPS) camera in your game
Implementing a round rotating camera in a 3D game
Implementing a chase camera
Using culling to remove the unseen parts and texture mapping
Chapter 4: Heads Up Display (HUD) Your Phone Game User Interface
Introduction
Scaling an image
Creating a Simple Sprite Sheet animation in a 2D game
Creating a Complex Sprite Sheet animation in a 2D game
Creating a text animation in Adventure Genre (AVG) game
Creating a text-based menu the easiest menu to create
Creating an image-based menu
Creating a 3D model-based menu
Creating a progress bar for game content loading and value status
Creating buttons in your game
Creating a listbox to speed up your information management in a game
Creating a text input control to communicate with others in a game
Chapter 5: Content Processing
Introduction
The architecture and flow of content processing
Creating a custom importer and processor for your text
Processing XML files
Manipulating the extracted information from an image in the content pipeline
Extracting BoundingSphere and BoundingBox information from models
Chapter 6: Entering the Exciting World of 3D Models
Introduction
Controlling a model with the help of trackball rotation
Translating the model in world coordinates
Scaling a model
Viewing the model hierarchy information
Highlighting individual meshes of a model
Implementing a rigid model animation
Creating a terrain with texture mapping
Customizing vertex formats
Calculating the normal vectors from a model vertex
Simulating an ocean on your CPU
Chapter 7: Collision Detection
Introduction
Detecting the intersection of line segments
Implementing per pixel collision detection in a 2D game
Implementing BoundingBox collision detection in a 3D game
Implementing BoundingSphere collision detection in a 3D game
Implementing ray-triangle collision detection
Mapping a tapped location to 3D
Implementing sphere-triangle collision detection
Making a 3D ball move along a curved surface
Chapter 8: Embedding Audio in your Game
Introduction
Controlling an audio file
Adding sound effects to your game
Adding stereo sounds to your game
Chapter 9: Special Effects
Introduction
Using dual texture effects
Using environment map effects
Rendering different parts of a character into textures using RenderTarget2D
Creating a screen transition effect using RenderTarget2D
Chapter 10: Performance Optimization Fast! Faster!
Introduction
Optimizing your game's performance
Using the EQATEC Profiler to profile your game's running time
Reducing the game contents' loading time
Improving game performance with garbage collection
Preferring struct rather than class when just an instance is needed
Chapter 11: Launching to the Marketplace
Introduction
Preparing to submit your application to the Marketplace
Application submission checklist
Submitting your application to the Marketplace

Book Details

ISBN 139781849691208
Paperback450 pages
Read More