Preface
The Microsoft XNA 4.0 Game Development Cookbook is all about what happens once you've completed the various introductory tutorials, and want to create something with a little more substance.
In this book, you'll find examples of how to flesh out some of the more complex, or initially less intuitive, pieces of what goes into a full-blown game.
Not sure what it takes to add water to your Xbox 360 Indie game? Confused about maps for your Windows Phone game? Curious over what it takes to get started using Kinect with XNA? Then this book may just be for you.
What this book covers
Chapter 1, Applying Special Effects: Discover the principles behind some common special effects used in big budget titles, and add them to your own games.
Chapter 2, Building 2D and 3D Terrain: Learn some of the tricks behind creating landscapes in both two and three dimensions.
Chapter 3, Procedural Modeling: Explore what's involved in creating models in code, instead of using an external 3D modeling package.
Chapter 4, Creating Water and Sky: Add depth to your worlds with some virtual atmosphere.
Chapter 5, Non-Player Characters: Inhabit your virtual worlds with characters that can move and interact in intelligent and interesting ways.
Chapter 6, Playing with Animation: Have a peek into some of the ways that animation can be both produced and displayed.
Chapter 7, Creating Vehicles: Launch your players onto the roads or into the skies with the addition of vehicles.
Chapter 8, Receiving Player Input: Discover how your players can drag, drop, point, and type their way through your games.
Chapter 9, Networking: Expand your virtual world across to the real one by adding the ability to communicate.
What you need for this book
To write games using the examples presented in this book, you'll need:
Windows Vista (SP2) or later
XNA Game Studio 4.0 (usually bundled as part of the Windows Phone SDK) or later
For the Kinect-based recipe, a Kinect or Kinect for Windows unit is required along with the Kinect for Windows SDK.
Who this book is for
If you are an XNA developer who has already successfully dabbled in some of the simple 2D and 3D functionality provided by XNA, and are eager to find out how to achieve some of the more advanced features presented in popular games, dive into the Microsoft XNA 4.0 Game Development Cookbook for an example-based approach that should have you safely on your way towards the next level of game creation. You should be comfortable with the basics of the XNA framework and have experience with C#.
Conventions
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: "We will be using the BasicEffect
class in this example, but any effect that implements the IEffectMatrices
interface and has some way to darken the rendered model should be adequate."
A block of code is set as follows:
Vector3 lightDirection; BasicEffect reachShadowEffect; Matrix flattenShadow;
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes, for example, appear in the text like this: "Start by adding a new Content Pipeline Extension project to the solution."
Note
Warnings or important notes appear in a box like this.
Note
Tips and tricks appear like this.
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this book — what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.
To send us general feedback, simply send an e-mail to <feedback@packtpub.com>
, and mention the book title through the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
Downloading the example code
You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.
Errata
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books — maybe a mistake in the text or the code — we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website, or added to any list of existing errata, under the Errata section of that title.
Piracy
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <copyright@packtpub.com>
with a link to the suspected pirated material.
We appreciate your help in protecting our authors, and our ability to bring you valuable content.
Questions
You can contact us at <questions@packtpub.com>
if you are having a problem with any aspect of the book, and we will do our best to address it.