XNA Essentials

Game Programming for Xbox 360, PC + Windows Phone


Zune HD Scribble Test – Source Code

I did a talk yesterday at the Raleigh Code Camp. It went well I think. If anyone was at the talk and would like to give me feedback, feel free. The only way I’ll get better is if I know how effective / non effective the talk was.

It is always interesting trying to give a talk to an audience with people who have no clue what XNA is as well as those who have been fooling with it for a year or more. Ultimately, there are parts where both parties are bored – but hopefully not at the same time!

Anyway, while the talk was more about best practices for XBLIG and what you need to do to submit games to ultimately make money using XNA, we did spend the last 10-15 minutes of the session looking at a scribble app I made for the Zune HD on Friday night before the session.

Rob Zelt mentioned on twitter that I may have very well been the first person to do an XNA talk with a demo for the Zune HD at a Code Camp. Seeing how the Zune HD was just released this past week and typically Code Camps are held on Saturdays and I had the second session of the day at 9:40 EST I think he may be right. For some reason that makes me smile. A geeky gold star for me.

OK, now to the actual project. You can download the project and look at the comments to see what it is doing. I also did a brief video on it Friday night after I got it working.

At a high level, the code is simply looking at the touch panel collection to see all of the points / vector2 that were moved. It grabs the starting and ending point for this move and adds it to a list. We then draw a line from the starting point to the ending point and do that for each line segment in our line list. To erase it, we just shake the device. Really, we are just checking the difference of the acceleration on the X or Y axis to see if it has moved a certain amount in a frame. This way if someone just moves it slowly or turns it the screen won’t erase, but if it is a fast enough motion (easily produced by shaking) then we clear the line list so there is nothing to draw. The demo code also collects the rotation of the device from the accelerometer as well as the acceleration, but doesn’t actually use the rotation values.

Hopefully this will give you an idea of what is needed, but you should definitely check out the documentation from XNA Game Studio. In order to run this, you will need a Zune HD as well as the latest XNA Framework which comes in XNA Game Studio 3.1 Zune Extensions.

Download Zune HD Scribble Test

Happy Coding!


Microsoft XNA Game Studio 3.0 Unleashed Book Has Arrived

My second book, Microsoft XNA Game Studio 3.0 Unleashed has just left the printers. I received a copy of the book yesterday. It is available for purchase from Amazon and other retailers. This book includes 9 new chapters in 3 new sections. These include chapters on creating games for the Zune, creating multiplayer games and best practices to sell games on the Xbox LIVE Marketplace.

More information about the book can be found in the Unleashed section of the site. The errata for the book has been started and can be found here.

I will be revamping this site and will include forums directly on this site so we do not have to use the Amazon forums. I realized recently that the Amazon forums were country dependant and there were posts I didn't see from the UK. Having the forums on my server should help with that. I'm working diligently to get them up soon.

Happy Coding!


XNA Game Studio 3.0 Beta

Hello XNA Game Studio 3.0 Beta! I'm excited that this is here.

Right on the heals of the Zune 3.0 software and firmware update today.

XNA GS 3.0 Beta allows us to develop games for our Zunes.  With the CTP that was released in the spring, the Zune device had to reboot anytime a game was closed.  Fortunately, they have made it so closing a game now doesn't require the device to reset itself.  I'm very happy about this, but I really wasn't expecting it.  I am sure it wasn't easy to make sure that no game was hogging up resources after it was closed. UPDATE: I was incorrect in the above praise. It seems the two games that were installed with the Zune 3.0 update (Texas Hold'em and Hexic) do not require a reboot, but normal XNA games do.

You can write code for the Xbox 360, but you can't deploy to it in the beta. We can compile our code for the Xbox 360 and that is helpful, but we can't deploy.

That reminds me ... the Dream Build Play contest is winding up.  Submissions have to be in by September 23rd.  As a reward for just submitting an entry, Microsoft is giving away a 4 month premium creators club membership.  That is $49 value - just for submitting an entry.

Again, to submit a game for DBP it needs to be an Xbox 360 project which means it needs to be compiled with XNA Game Studio 2.0.

So get a game submitted!

XNA Game Studio 3.0 is coming

Spring 2008 is when the beta is supposed to be out ... Holiday 2008 is when it should be released.

I can't wait!

Some very exciting things are coming including:

Develop 2D games for the Zune



   Discussion Thread:


Deploy your Xbox 360 game to anyone on Xbox LIVE!



    Discussion Thread:


  General info on Game Studio 3.0


       Things to note is that VS2008 will be used.  I love VS2008, so this is great news.  I would love to be able to use some of the C# 3.5 language features, but it is unknown if any of that will be available yet.  Using LINQ to query a scene graph would be excellent fun!

Lots of information and as much as possible will be in my new book - Microsoft XNA Game Studio 3.0 Unleashed.  More details on that to follow ...

Happy Coding!