Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
XNA 4 3D Game Development by Example: Beginner's Guide
XNA 4 3D Game Development by Example: Beginner's Guide

XNA 4 3D Game Development by Example: Beginner's Guide: Create action-packed 3D games with the Microsoft XNA Framework with this book and ebook.

eBook
₹799.99 ₹3276.99
Paperback
₹4096.99
Subscription
Free Trial
Renews at ₹800p/m

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

XNA 4 3D Game Development by Example: Beginner's Guide

Chapter 2. Cube Chaser – A Flat 3D World

Our first 3D game will feature a very straight forward design: the player is trapped in a randomly generated maze, and must seek out the great green cube! Every time the player reaches this goal, they are awarded points for how quickly they found the cube and it is relocated to a different portion of the maze.

While simple in design, building Cube Chaser will cover a number of important topics related to 3D game development. In this chapter, we will look at:

  • Building an FPS (First Person Shooter) style camera

  • Drawing surfaces using triangles in the 3D world

  • Generating a floor as a base for our maze

  • Detecting input and allowing first-person movement through the maze

Designing the game


Cube Chaser will take place in a randomly generated 3D maze. We will use triangle lists to build the floor and walls of the maze and instruct the graphics card to draw them to the screen.

The maze itself is actually a 2D construction, with the walls being rendered in 3D. The floor of the maze will be laid out along the X-Z plane, with the walls extending upwards along the positive Y axis. The player will be able to move in the X and Z plane, but will be restricted to a single, pre-defined elevation along the Y axis.

3D coordinates

You may have noticed in the previous statement that the player will move along the X-Z plane. If you have spent any time developing 2D games, you will likely be used to working with X-Y coordinates, with X running across the screen from left to right and Y running down the screen from top to bottom.

When we move into 3D, we no longer have a fixed viewing angle on our action. In a 2D game, we typically describe actions in the X-Y plane for a side...

Creating the project


We will begin the construction of Cube Chaser by creating a new XNA 4.0 Windows Game in Visual Studio.

Time for action – creating the Cube Chaser project


  1. 1. Open Visual Studio 2010 and select File | New | Project... from the menu bar.

  2. 2. Open the Visual C# tree in the Installed Templates portion of the New Project window, and open the XNA Game Studio 4.0 tree under it.

  3. 3. Select the Windows Game (4.0) project template from the central portion of the window.

  4. 4. Under Name, enter Cube Chaser and click the Ok button.

  5. 5. After Visual Studio has created the solution, right-click on the Game1.cs file in the Solution Explorer window and select Rename.

  6. 6. Change the name of the file to CubeChaserGame.cs. When asked if you wish to update the references to the file, click Yes.

What just happened?

We now have the shell for our Cube Chaser game. We could have left our main game class as Game1 as we did for the Speller game, but giving the class a more descriptive name helps to keep our code as self-documenting as possible.

Our view of the world


Before we can place objects and geometry into our virtual representation of a 3D world, we need to come up with a way to describe to XNA how we are going to control the viewpoint of the player. In many 2D games, a simple Vector2 value is often enough to cover the requirements of the camera – assuming the 2D game needed a camera at all. The camera viewing a 2D world might only need to know how far across and down the game world the current view should be located. Other aspects of the view, such as the distance from which the player is viewing the action, may be fixed due to the size of the pre-drawn sprites representing the game environment and objects.

In contrast, we need a bit more information to define the camera in a 3D game. The fact that we need a third coordinate (the Z coordinate) should not be surprising; since we have moved from 2D to 3D, it only stands to reason that we need three coordinates to define a point. What may be less obvious, however, is that we...

Time for action – beginning the Camera class


  1. 1. Add a new class to the Cube Chaser project by right-clicking on the project in Solution Explorer and selecting Add | Class....

  2. 2. Ensure that the Visual C# | Code is selected under Installed Templates and select the Class template.

  3. 3. Enter Camera.cs as the name of the class file.

  4. 4. Add the following using directive to the top of the Camera.cs file:

    using Microsoft.Xna.Framework;
  5. 5. Add the following fields and properties to the Camera class:

    #region Fields
    private Vector3 position = Vector3.Zero;
    private float rotation;
    #endregion
    
    #region Properties
    public Matrix Projection { get; private set; }
    #endregion
  6. 6. Add a constructor for the Camer a class:

    #region Constructor
    public Camera(
        Vector3 position, 
        float rotation, 
        float aspectRatio, 
        float nearClip, 
        float farClip)
    {
        Projection = Matrix.CreatePerspectiveFieldOfView(
            MathHelper.PiOver4, 
            aspectRatio, 
            nearClip, 
            farClip);
        MoveTo(position...

The Projection matrix


On a physical camera, you might have a selection of various lenses with different properties – a wide angled lens for wide shots, or a telephoto lens for zooming in close. The Projection matrix is the way we describe such properties to the XNA rendering system. The Projection matrix describes to the graphics card how to translate (or project) 3D objects onto the 2D viewing area of the screen. The following image illustrates the parameters used to construct the Projection matrix:

The Matrix.CreatePerspectiveFieldOfView() method accepts four parameters that define how our virtual camera will view the 3D scene. The first is the field of view, or viewing angle, that the camera covers. The larger this value is, the wider the angle the camera will display. In this case, we specify MathHelper.PiOver4, which translates to a 45 degree angle.

Note

Angles in XNA

XNA handles all angles in radians. In a full circle there are 2*pi radians. Half of a circle is 180 degree, or pi radians...

Looking at something


While we have a rotation value already associated with the Camera class, it does not mean anything to the class currently. An angle only exists in one plane in our 3D coordinate system, so we cannot simply specify an angle at which to point the camera. We need to convert the angle into a point in 3D space that lies in the direction we wish the camera to face relative to its current location.

Time for action – implementing a look-at point


  1. 1. Add the following properties to the Fields region of the Camera class:

    private Vector3 lookAt;
    private Vector3 baseCameraReference = new Vector3(0, 0, 1);
    private bool needViewResync = true;
  2. 2. Add the following region and method to the Camera class:

    #region Helper Methods
    private void UpdateLookAt()
    {
        Matrix rotationMatrix = Matrix.CreateRotationY(rotation);
        Vector3 lookAtOffset = Vector3.Transform(
            baseCameraReference, 
            rotationMatrix);
        lookAt = position + lookAtOffset;
        needViewResync = true;
    }
    #endregion
  3. 3. Define the MoveTo() method that is called in the constructor. This method should be placed inside the Helper Methods region you just created:

    public void MoveTo(Vector3 position, float rotation)
    {
        this.position = position;
        this.rotation = rotation;
        UpdateLookAt();
    }
  4. 4. Add two new public properties to the Properties region of the Camera class:

    public Vector3 Position 
    {
        get
        {
            return...

The View matrix


The last bit of information we need our camera to provide in order to be able to draw a scene is called the View matrix. This matrix defines the position and direction from which the camera views the 3D world. In other words, we combine our camera position and the point we are looking at, to create the structure that XNA needs, to interpret how we wish our camera to view the 3D scene.

Time for action – the View matrix


  1. 1. Add the following variable to the Fields region of the Camera class:

    private Matrix cachedViewMatrix;
  2. 2. Add the following property to the Properties region of the Camera class:

    public Matrix View
    {
        get
        {
            if (needViewResync)
                cachedViewMatrix = Matrix.CreateLookAt(
                    Position, 
                    lookAt, 
                    Vector3.Up);
    
            return cachedViewMatrix;
        }
    }

What just happened?

We could simply recalculate the View matrix every time the Camera class was asked for it, but doing so would incur a small performance penalty. Because we do not have a lot of action happening in Cube Chaser, this penalty would not impact our game, but we can avoid it altogether. We are building a caching mechanism into the camera code in the event our game develops to the point that this optimization is helpful. Any time the View matrix is calculated, we will store it in cachedViewMatrix and simply return that matrix if the View...

From the ground up


Even if we were to go ahead and implement the code to allow us to utilize the Camera class, there would be nothing to display at this point, as we have not defined any objects in our 3D world other than the camera, and it is invisible.

There are several different ways we could approach drawing the floor of the maze. We could draw the whole floor as a single square in a particular color. We could draw the same giant square using a texture that was repeated over the whole thing.

Both of these methods are quite valid, but we are going to take a slightly different approach. We will build a square for each cell of the maze floor, alternating the colors of the squares to create a checkerboard-like pattern. We will draw all of the floor tiles in a single operation, sending all of the geometry to the graphics card at once.

Time for action – creating the Maze classes


  1. 1. Add a new class file called Maze.cs to the Cube Chaser project.

  2. 2. Add the following using directives to the top of the Maze.cs class file:

    using Microsoft.Xna.Framework;
    using Microsoft.Xna.Framework.Graphics;
  3. 3. Add the following fields to the Maze class:

    #region Fields
    public const int mazeWidth = 20;
    public const int mazeHeight = 20;
    
    GraphicsDevice device;
    
    VertexBuffer floorBuffer;
    
    Color[] floorColors = new Color[2] { Color.White, Color.Gray };
    #endregion
  4. 4. Add a constructor for the Maze class:

    #region Constructor
    public Maze(GraphicsDevice device)
    {
        this.device = device;
        
        BuildFloorBuffer();
    }#endregion
  5. 5. Add the following region and helper methods to the Maze class:

    #region The Floor
    private void BuildFloorBuffer()
    {
        List<VertexPositionColor> vertexList = 
            new List<VertexPositionColor>();
    
        int counter = 0;
    
        for (int x = 0; x < mazeWidth; x++)
        {
            counter++;
            for (int z = 0...

Drawing the floor


Now that we have defined all of the triangles that will make up the checker-boarded floor for our maze, let's go ahead and complete the code necessary to draw the floor to the screen.

Time for action – drawing the floor


  1. 1. Add the Draw region and the Draw() method to the Maze class:

    #region Draw
    public void Draw(Camera camera, BasicEffect effect)
    {
        effect.VertexColorEnabled = true;
        effect.World = Matrix.Identity;
        effect.View = camera.View;
        effect.Projection = camera.Projection;
    
        foreach (EffectPass pass in effect.CurrentTechnique.Passes)
        {
            pass.Apply();
            device.SetVertexBuffer(floorBuffer);
            device.DrawPrimitives(
                PrimitiveType.TriangleList, 
                0, 
                floorBuffer.VertexCount / 3);
        }
    }
    #endregion
  2. 2. In the CubeChaserGame class, add the following declarations to the declarations area of the class:

    Camera camera;
    Maze maze;
    BasicEffect effect;
  3. 3. In the Initialize() method of the CubeChaserGame class, initialize the camera, maze, and effect objects, placing this code before the call to b ase.Initialize():

    camera = new Camera(
        new Vector3(0.5f, 0.5f, 0.5f), 
        0, 
        GraphicsDevice.Viewport...

Moving around


Now that we have a floor to walk on, we need to implement the code necessary to allow the player to move about within our environment. In order to facilitate this, we will first expand on our Camera class to add a couple of new helper methods.

Time for action – expanding the Camera


  1. 1. In the Helper Methods region of the Camera class, add the following new methods:

    public Vector3 PreviewMove(float scale)
    {
        Matrix rotate = Matrix.CreateRotationY(rotation);
        Vector3 forward = new Vector3(0, 0, scale);
        forward = Vector3.Transform(forward, rotate);
        return (position + forward);
    }
    
    public void MoveForward(float scale)
    {
        MoveTo(PreviewMove(scale), rotation);
    }

What just happened?

PreviewMove() accepts a distance we wish to move along the direction that the camera is facing. It then calculates a matrix which is used to rotate a vector by the current camera rotation. Recall that an unrotated camera will always be pointing in the 0, 0, 1 direction, so we replace the 1 in this vector with the distance we wish to move, creating vector forward. We then apply the rotate transform to this vector, resulting in a vector that points in the direction the camera is actually facing, with a length equal to the distance we want to...

Time for action – letting the player move


  1. 1. Add the following fields to the declarations area of the CubeChaserGame class:

    float moveScale = 1.5f;
    float rotateScale = MathHelper.PiOver2;
  2. 2. Add the following to the Update() method of the CubeChaserGame class:

    float elapsed = (float)gameTime.ElapsedGameTime.TotalSeconds;
    KeyboardState keyState = Keyboard.GetState();
    float moveAmount = 0;
                
    if (keyState.IsKeyDown(Keys.Right))
    {
        camera.Rotation = MathHelper.WrapAngle(
            camera.Rotation - (rotateScale * elapsed));
    }
    
    if (keyState.IsKeyDown(Keys.Left))
    {
        camera.Rotation = MathHelper.WrapAngle(
            camera.Rotation + (rotateScale * elapsed));
    }
    
    if (keyState.IsKeyDown(Keys.Up))
    {
        //camera.MoveForward(moveScale * elapsed);
        moveAmount = moveScale * elapsed;
    }
    
    if (keyState.IsKeyDown(Keys.Down))
    {
        //camera.MoveForward(-moveScale * elapsed);
        moveAmount = -moveScale * elapsed;
    }
    
    if (moveAmount != 0)
    {
        Vector3 newLocation = camera.PreviewMove(moveAmount...

Summary


Cube Chaser is well under way! Even though it currently has no walls, we can draw the beginnings of our 3D world and move around using an FPS style camera. We have looked at the 3D coordinate system and the various components of the camera used to view the world. We now have the basic mechanism in place that we will build upon to limit the player's ability to move through walls once we have constructed them.

In the next chapter, we will continue to build the Cube Chaser game, creating the maze walls and detecting player-wall collisions.

Left arrow icon Right arrow icon

Key benefits

  • Learn the structure of a 3D world and how to implement a variety of 3D techniques including terrain generation and 3D model rendering.
  • Build three different types of 3D games step-by-step, including a first-person maze game, a battlefield tank game, and a 3D sidescrolling action game on the surface of Mars.
  • Learn to utilize High Level Shader Language (HLSL) to add lighting and multi-texturing effects to your 3D scenes.

Description

Move beyond the world of flat 2D-based game development and discover how to create your own exciting 3D games with Microsoft XNA 4.0. Create a 3D maze, fire shells at enemy tanks, and drive a rover on the surface of Mars while being attacked by alien saucers."XNA 4 3D Game Development by Example: Beginner's Guide" takes you step-by-step through the creation of three different 3D video games with Microsoft XNA 4.0. Learn by doing as you explore the worlds of 3D graphics and game design.This book takes a step-by-step approach to building 3D games with Microsoft XNA, describing each section of code in depth and explaining the topics and concepts covered in detail. From the basics of a 3D camera system to an introduction to writing DirectX shader code, the games in this book cover a wide variety of both 3D graphics and game design topics. Generate random mazes, load and animate 3D models, create particle-based explosions, and combine 2D and 3D techniques to build a user interface."XNA 4 3D Game Development by Example: Beginner's Guide" will give you the knowledge to bring your own 3D game creations to life.

Who is this book for?

This book is intended for readers who want to create 3D games using the XNA Framework. Basic knowledge of the C# programming language and 2D XNA concepts are helpful, but not required.

What you will learn

  • The core concepts of 3D graphics and how XNA describes the 3D world
  • Build a 3D maze that the player can explore in search of the mysterious spinning cube
  • Create 3D terrain based on a 2D height map image, adding texturing and lighting to the terrain s surface
  • Load, display and animate 3D models
  • Build a button-based user interface overlay for your 3D game
  • Create a billboard particle system to produce dynamic explosions
  • Build a skybox to give your worlds full 3D backgrounds
  • Detect collisions between 3D objects and have your game react accordingly
Estimated delivery fee Deliver to India

Premium delivery 5 - 8 business days

₹630.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Sep 25, 2012
Length: 322 pages
Edition : 1st
Language : English
ISBN-13 : 9781849687089
Vendor :
Microsoft
Languages :

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to India

Premium delivery 5 - 8 business days

₹630.95
(Includes tracking information)

Product Details

Publication date : Sep 25, 2012
Length: 322 pages
Edition : 1st
Language : English
ISBN-13 : 9781849687089
Vendor :
Microsoft
Languages :

Packt Subscriptions

See our plans and pricing
Modal Close icon
₹800 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
₹4500 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just ₹400 each
Feature tick icon Exclusive print discounts
₹5000 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just ₹400 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 11,843.97
XNA 4 3D Game Development by Example: Beginner's Guide
₹4096.99
Microsoft XNA 4.0 Game Development Cookbook
₹4096.99
XNA 4.0 Game Development by Example: Beginner's Guide
₹3649.99
Total 11,843.97 Stars icon

Table of Contents

10 Chapters
Introduction to XNA Chevron down icon Chevron up icon
Cube Chaser – A Flat 3D World Chevron down icon Chevron up icon
Cube Chaser – It's A-Mazing! Chevron down icon Chevron up icon
Cube Chaser – Finding Your Way Chevron down icon Chevron up icon
Tank Battles – A War-torn Land Chevron down icon Chevron up icon
Tank Battles – The Big Guns Chevron down icon Chevron up icon
Tank Battles – Shooting Things Chevron down icon Chevron up icon
Tank Battles – Ending the War Chevron down icon Chevron up icon
Mars Runner Chevron down icon Chevron up icon
Mars Runner – Reaching the Finish Line Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.1
(7 Ratings)
5 star 42.9%
4 star 42.9%
3 star 0%
2 star 14.3%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




jp sousa Jun 12, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
First I should say that I AM skilled in 2D animations using Silverlight but have never used XNA. I HAVE done a little Silverlight 3D programming and mainly I wanted to improve my Silverlight 3D animations skills.I followed through the entire book by initiating my own Projects. I did not, however, type in all the code. Instead, I just copied the regions one by one for each class file, making only minimal effort to understand each region. All the while I thought that my laziness would jump up and bite me. But, after I finished, I was surprised to find out that I was able to easily add sound to the Tank Battles game and to add explosions to the Mars Runner game. I think the author succeeded wonderfully in progressing his readers through many levels of XNA programming. I also liked the way he made most of the classes generic so that they will be usable in my own projects.
Amazon Verified review Amazon
M. Loretti Dec 11, 2012
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I have recently bought two books about game development with Microsoft XNA Framework from Packt Publishing, one of them being "XNA 4 3D Game Development". Both of them are written by the same author (Kurt Jaegers) and are a great read for beginner game developers.I come from a web development background where I work with both front and back-end technologies. Before reading this book I had almost no experience with C# and none with XNA or game development in general. Author does a great job throughout the book at explaining all the basic concepts about game development, including C#, how XNA works and basic game theories.First chapter is introductory chapter about programming with XNA and it walks you through creating a very simple 2D game - yes, a 2D game because a lot of basics about 3D game programming come from the 2D world. The rest of the book is about 3D games and increase in difficulty building upon the concepts that you have learned in previous chapters.I really enjoyed reading XNA book series by Kurt Jaegers because his writing style is extremely easy to read and he does a great job at explaining all the concepts to the reader, even though the book itself is written in "learn by doing" style. This book assumes that you know a little bit about programming already, however it does give you a quick 101 about C#. I am really happy with my purchase and recommend this book to anyone who wants to learn about basic 3D game programming with Microsoft XNA Framework.
Amazon Verified review Amazon
Michael Liddy Dec 27, 2012
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I am completely new to 3D, C# and .NET but at one stage in my career I was a programmer so I understand programming concepts.With this context the book really worked for me. It might be a stretch for a complete beginner but anyone with rudimentary programming skills that learns by example and doing, rather than text book theory should really get a lot out of this.The code examples are easy to follow and the fact that they are in a real, even if a little simple, game situation really made it easy for me to follow.Against a couple of other more detailed and comprehensive XNA books that I purchased at the same time, this is the one that got me the furthest in the shortest time.Seeing progress 'on screen' almost immediately really helped me keep motivated to keep working through the book.I thoroughly enjoyed it.
Amazon Verified review Amazon
Wessam Bahnassi Dec 17, 2012
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
The book comes in two flavors, C# and Visual Basic (there is also a 3D vs. non-3D edition, this is the 3D edition, watch the title). I have read the C# edition from cover to cover assuming that I'm a new comer to programming and games altogether.Overall, it's a good read, and I think a considerable number of readers will like the way it presents information. A good book offers what it promises in its title, and that is the case with this beginner's guide. Four example games are used as a vehicle to demonstrate basic game functionality such as world updates, user input, box collision detection, generating simple geometry and 2D drawing. It also touches on a few more complicated tasks such as terrain generation and lighting, skeletal hierarchies and particle effects.It is difficult to say for certain, especially that different people learn in different way; this book sticks really to the "by example" clause. Each chapter starts by telling you what you are going to achieve, then displays code snippets followed by a "What just happened?" section that explains the rationale behind the code. Personally, this is opposite to how I would like to receive new knowledge. I'm a guy who likes to know the story behind so I can come up by my self with the conclusion of what should be done, and I do not know how many people agree with me on this.The book does not say much about what knowledge is required from the reader so he can use the book. After reading it, I can say it assumes basic knowledge of C# (there is no focus at all on teaching the programming language, which is just fair in my opinion). It avoids using advanced C# code constructs, so having read a C# primer before this book should be sufficient.When talking about games (especially 3D games), you are faced with the challenge of using terms that would take a long time to explain the story for each of them (e.g., normals, textures, matrices, vertex/index buffers, HLSL). The author makes an attempt to explain the term when using it the first time, but I find the explanations too brief and leave much to be desired. Giving a reference for further exploration could have helped a bit here. Without such understanding it would be difficult to be able to innovate something beyond what is given in the examples. Some books show on the back cover the level you will reach after reading them. In our case I think this book takes you from Beginner 0 to Beginner 2. Not much beyond.To wrap up, from my perspective, Kurt Jaegers' XNA Beginners' Guide is a useful read, with nice and clever games used as driving examples. It helps the reader break the hard startup barrier and opens his appetite for wider and deeper knowledge on the various facets of game programming with XNA.
Amazon Verified review Amazon
RB Nov 20, 2012
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
This is a very good book!I've read several books on developing XNA games (and even some websites) but none give such a straightforward presentation to games development.I have been waiting for a book that just gets to the "meat" of the issue and Kurt Jaegers' book does just that.Highly recommended for those who want to dive right into to games development.FYI, if you read this book on Kindle, be aware that Kindle might hyphenate some of the code blocks, making it appear there are minus-signs in the code when there should not be. I had a couple of bugs because of this; I recommend widening or rotating the page view to see if the code block changes.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the digital copy I get with my Print order? Chevron down icon Chevron up icon

When you buy any Print edition of our Books, you can redeem (for free) the eBook edition of the Print Book you’ve purchased. This gives you instant access to your book when you make an order via PDF, EPUB or our online Reader experience.

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela