Showing posts with label XNA. Show all posts
Showing posts with label XNA. Show all posts

Thursday, December 10, 2009

XNA Game Studio Kindle Edition

The Microsoft XNA Game Studio Creator's Guide has been doing well in the reviews for the Amazon Kindle edition.

51NRo80MBxL__SL500_AA246_PIkin2,BottomRight,4,34_AA280_SH20_OU01_

“I purchased this book specifically because it was the second edition and it seemed as though the authors' credentials exceeded the average book on XNA. Also, I was interested in the math behind game programming. I was not disappointed.”

- Rob "ActivelyX”

“This is a great book for XNA developers! My son and I are working through this book together and we are having a great time learning XNA! The author takes the time to explain complex gaming concepts simply, the code examples are almost without error, and the reader is taken through a wide variety of examples including everything from collision algorithms to writing games for Zune.”

- James Anderson "Avid Reader"

Tuesday, July 22, 2008

XNA second edition

I'm happy to say that my next book project will be a second edition of the XNA Game Studio Creators Guide (McGraw-Hill) that I co-wrote with Pat McGee.

XNA has undergone some significant changes since our book came out, so we're working to update and improve the text. along those lines, we are lucky to have Nick Gravelyn (XNA MVP) doing the technical review.

if you have any suggestions, feel free to contact Pat or me.


- new second edition cover


- cover of the first edition

Tuesday, October 23, 2007

XNA book base code article

the XNA Game Studio Creator's Guide co-author, Pat McGee, has written an article about the XNA base code that he wrote for the book.

essentially, this article breaks down how to create the simple first-person game engine that is the base of many of the examples in the book.


- a screenshot from the textures chapter

Monday, September 17, 2007

XNA book download and forum

the sample code and other files that go along with Microsoft® XNA Game Studio Creators Guide can be found at: http://www.mhprofessional.com/product.php?isbn=007149071x (look for the "code" link on the left side, just under the cover image)

thanks to Pat, the forum for the book is here: http://www.gamedeveloperonline.com/

if you have any questions about the examples, go to the forums and ask away.

Friday, June 29, 2007

the XNA book is here

FedEx brought me a box of the XNA game studio creators guide today. I think that McGraw-Hill did a great job on the presentation.

it should be in stores, and available on Amazon, any time now.

Thursday, June 28, 2007

Goblin XNA Augmented Reality

Goblin XNA is a project at Columbia University that aims to create a platform for developing Augmented Reality (AR), or Virtual Reality, applications with Microsoft's new XNA game development platform.

this project is particularly interesting to me because I've just finished books on XNA (XNA Game Studio Creators Guide) and AR. Goblin XNA uses the ARTag marker system, which was developed by my AR co-author Dr. Mark Fiala.

Tuesday, June 26, 2007

XNA book about to be released

I just received this timely question from Ziggy...

"Do you know if your [XNA] book is still set to be released on the first? I know that in the past Amazon has incorrect dates posted and I do not want to misinform the community."

Thanks,Ziggy
Ziggyware XNA News and Tutorials

I've been meaning to post a message about this, and it seems that this is the perfect time. although I can't promise that the book will be out on a specific day, it is complete and printed. It should be out any day now :)

Friday, March 16, 2007

XNA Game Studio Creators Guide

I'm happy to say that my latest book project is an XNA development guide that I'm co-authoring with Pat McGee from BCIT college. the book covers game development on the exciting new XNA platform.

not only is XNA an amazing new platform, but it also allows anyone to develop games for the Xbox 360. all that is required is an Xbox 360, a PC, and a $99/yr subscription to the Xbox 360 Creator's Club.

the book is called XNA Game Studio Creators Guide and it will be published by McGraw-Hill.

update: the sample code and other files that go along with Microsoft® XNA Game Studio Creators Guide can be found at: http://www.mhprofessional.com/product.php?isbn=007149071x (look for the "code" link on the left side, just under the cover image)

thanks to Pat, the forum for the book is here: http://www.gamedeveloperonline.com/


- working cover for the XNA Game Studio Creators Guide

Monday, February 05, 2007

XNA project names

if you've been playing around with XNA projects, you may have found that it can be surprisingly tricky to change the name that is displayed in the "My XNA Games" screen.

the trick is that the name is stored in the Assembly Information of the project. to change the name, go to the Project Properties screen and the click the "Assembly Information" button. this will open the Assembly Information window.


- Assembly Information window

Thursday, January 25, 2007

XNA beta code migration

these are some quick and dirty notes on migrating XNA GSE beta code to GSE V 1.0.

when you are migrating, refer to the XNA GSE documentation (in the Programs folder for GSE). the migration information is under Getting Started with XNA Game Studio Express -> Migrating from Beta 1 to Beta 2 (see below). this information also applies to the release version.

-------------------
GameTime
-------------------
double dblMS = (double)this.GameTime.Milliseconds;

becomes:

GameTime gameTime = new GameTime();
double dblMS = (double)gameTime.ElapsedGameTime.Milliseconds;

-------------------
loading Texture2D
-------------------
mTex2DSprite = Texture2D.FromFile(this.gfx.GraphicsDevice, @"..\..\light.dds");

becomes:

mTex2DSprite = content.Load(@"..\..\light") as Texture2D;

-------------------
VertexPositionColorTexture
-------------------
VertexPositionColorTexture parameters are in a different order

mVertSprite[0] = new VertexPositionColorTexture(pos, uv, Color.White);

becomes:

mVertSprite[0] = new VertexPositionColorTexture(pos, Color.White, uv);

-------------------
DrawUserPrimitives
-------------------
gfx.GraphicsDevice.DrawUserPrimitives
(PrimitiveType.TriangleStrip, // triangle strips
2, // two primitive objects
mVertSprite); // use sprite vertex

becomes:

gfx.GraphicsDevice.DrawUserPrimitives
(PrimitiveType.TriangleStrip, // triangle strips
mVertSprite, // use sprite vertex
0, // vertex offset
2); // two primitive objects

-------------------
EffectStateOptions
-------------------
EffectStateOptions is gone

mfxTex.Begin(EffectStateOptions.Default);

becomes:

mfxTex.Begin();
-------------------

from the documentation:

Migrating a Beta 1 project to Beta 2
"Create a new project by selecting New Project... from the File menu. Select Windows Game, name your new project, and click OK.

Add classes from your old project to your new project by selecting Add Existing Item... from the Project menu. Navigate to your Beta 1 project, select the class or classes to import, and click OK.
Add resources from your old project to your new project also by selecting Add Existing Item... and choosing Content Pipeline Files from the Files of type: drop-down box. You can select models, textures, effects and sounds to add to your project. See "Importing a resource into the Content Pipeline" below for more information.

Migrate code from your old project's Game1 class to your new project's Game1 class, including your Update and Draw methods. Use LoadGraphicsContent to load automatic and manual resources (note: "automatic" was called "managed" in Beta 1).

The Game Designer from Beta 1 does not exist in Beta 2. Use the Game constructor to set properties on the GraphicsDeviceManager (formerly GraphicsComponent).

Some code changes will be required before your Beta 1 code will compile properly in Beta 2. See "Framework Changes" below for a list of some of those changes. "

other resources:

Migrating an XNA Application from Beta 1 to Beta 2

Thursday, December 21, 2006

showing a bitmap in XNA

I've seen some crazy complicated samples online for something that should be very simple - showing a bitmap in XNA. I even found one article that suggested using pointers. ha!

here's the simple version that I used to show augmented reality markers on my TV. unfortunately, it seems that the TV scan line is going to prevent this from actually working as an AR demo.

#region Using Statements
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Storage;
#endregion

namespace Xbox360Game1
{
public class Game1 : Microsoft.Xna.Framework.Game
{
GraphicsDeviceManager graphics;
ContentManager content;

//Added for bitmap
public static Texture2D SpriteTexture;
public static SpriteBatch SpriteBatch;
public Point Velocity;
public Point Location;
public Point Size;

public Game1()
{
graphics = new GraphicsDeviceManager(this);
content = new ContentManager(Services);
}

protected override void Initialize()
{
base.Initialize();

//Added for bitmap
SpriteBatch = new SpriteBatch(this.graphics.GraphicsDevice);
}

protected override void LoadGraphicsContent(bool loadAllContent)
{
if (loadAllContent)
{

//Added for bitmap
SpriteTexture = content.Load("base0_128");

}

base.LoadGraphicsContent(loadAllContent);
}

protected override void UnloadGraphicsContent(bool unloadAllContent)
{
if (unloadAllContent == true)
{
content.Unload();
}
base.UnloadGraphicsContent(unloadAllContent);
}

protected override void Update(GameTime gameTime)
{
// Allows the default game to exit on Xbox 360 and Windows
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
this.Exit();
base.Update(gameTime);
}

protected override void Draw(GameTime gameTime)
{
graphics.GraphicsDevice.Clear(Color.CornflowerBlue);

//Added for bitmap
Location.X = 100;
Location.Y = 100;
Size.X = 512;
Size.Y = 512;
Game1.SpriteBatch.Begin();
Game1.SpriteBatch.Draw(Game1.SpriteTexture, new Rectangle(Location.X, Location.Y, Size.X, Size.Y), Color.White);
Game1.SpriteBatch.End();

base.Draw(gameTime);
}
}
}

Wednesday, December 13, 2006

debug xbox 360 without xbox?

it didn't take long for me to realize that the GSE XNA xbox 360 project forces a deployment to the xbox 360 when you debug or build. so how do you work on your xbox 360 game when you're in the coffee shop?

there doesn't seem to be any way to disable the deployment, so - unless you take your xbox with you - it's a bit of an issue. even adding Any CPU as an additional platform in the configuration manager didn't work. I found a forum post about debugging without the xbox 360, and it seems that the current solution is a bit of a hack:

"You can start a new Windows Game and link all the files from the 360 project. It would probably take about 30 seconds to set up. After you create the Windows Game project, right click on the project in the Solution Explorer, select Add Existing Item, select all the files in the dialog, click the arrow on the Add button and select Add As Link. Any changes made in either project will be reflected in the other."

there is a second solution in the post (manually altering the project file), but it isn't recommended.

Monday, December 11, 2006

xbox creators club live!

the xbox 360 creators club is up and running. this option allows game developers to use the XNA game development platform to create and run xbox 360 games.

although the game studio express (GSE) dev environment is free, the creators club requires an xbox live subscription and a creators club membership.

refer to the XNA blog (and the GSE docs) for details about setup. once you have everything installed, you can connect your xbox 360 to your pc and begin to work your magic.

this screenshot shows an xbox 360 project deployed and running on an xbox 360. the project is running in debug mode and a breakpoint has been hit - all while still listening to the iPod connected to the 360... nice.


- debugging an xbox 360 project - click for full-size version

Sunday, September 03, 2006

XNA spacewar

I recently posted a message about the exciting XNA Game Studio Express release. this is a fantastic move by microsoft that will eventually allow anyone to develop games for the Xbox 360.

as microsoft wrote to XNA Beta participants, "The Microsoft XNA team is pleased to inform you that the Microsoft XNA Game Studio Express (Beta) is now available at the Microsoft Download Center from the following location: http://msdn.com/directx/XNA/gse."

after you get GSE, you can build the spacewar project and play the game.


- the spacewar title screen


- old school spacewar


- fancy

as for playing spacewar without a keybaoard, a game developer friend of mine who teaches at BCIT, sent me this advice:

it is possible to get Spacewar working with the keyboard by uncommenting the #declare on the first line in gamepadhelper.cs. to make it work with my NVidia card I had to add the line
graphics.AllowMultiSampling = false; after the graphics component declaration on the line:
Microsoft.Xna.Framework.Components.GraphicsComponent();

for more XNA samples, visit xnaspot.com.

Wednesday, August 30, 2006

XNA Game Studio Express

the beta download for XNA game studio express is out!

this is the software designed for the Xbox 360 creator's club

update: xnaspot.com is a great place to start with XNA GSE.

"XNA Game Studio Express enables individuals and small teams to more easily create video games using new, optimized cross-platform gaming libraries for Windows and Xbox 360. This beta release targets the development of games for Windows. The final version of XNA Game Studio Express will be available this holiday season and will enable development of games which target Windows and upon purchase of a XNA Creators Club subscription, the Xbox 360 as well."

Saturday, August 19, 2006

xbox creators club

I was excited about the recent xbox 360 creators club announcement.

the idea is that xbox 360 users will pay an annual fee to get access to the option of developing xbox games on their PC - using the XNA platfrom - and then uploading them to an xbox 360 community space. MS says that the development tools will work with the free VS Express packages, so it may be cheap for people to get onboard.

autodesk is also involved, so maybe gmax will make a triumphant return. these days, modders basically have to rip-off 3ds if they want to create their own game elements for games like HaloCE.

it sounds like a fantastic community program, but some questions remain unanswered. will the creators' club provide the average user access to the same potential game quality as the companies that have access to the Xbox dev kits or will it be a digital kids' table? also, what are they going to do when people knock off space invaders, gauntlet or bejeweled?

update: the XNA team blog answered some of my questions: "The program we are building, however, is more than a beginner tool. You will be able to write full-on games with shaders and high-end graphics if you want to go deeper. For example, we have an excellent relationship with Garage Games. They’ve been creating a managed code version of their tools and engines that work the XNA technologies. They’ve built a souped up version of Marble-Blast entirely in C# that is just rocking."


- XNA game builder screen