As Michael just posted, today we released XNA Game Studio Express Beta 2 for Windows. The biggest addition in this release is that the Content Pipeline is now included, making it super easy to load and use content in your games. We’ve also fixed a lot of bugs and addressed a lot of your feedback from the first beta. I wanted to take a few posts to discuss some of the larger changes in the XNA Framework. Today I’ll be going over the Application Model and the things that have changed.
Designers
The first thing you’ll notice when you create a new game is that there is no support for designable game and game components. For beta we only had design time for Windows. Since beta we’ve been working on getting designers to work on Xbox. When we got them running, it was clear that the cross-platform story for developing your game was really difficult when trying to do it via designers. And what if you wanted to create a cross-platform game component for others to use? It was even more difficult. Seeing that this was not ideal, we decided to remove design time support for the application model for v1. Adding a rich design time experience is something we’re investigating for a future version. The reason we introduced design time support initially was because we got it for nearly “free” on Windows. Once we tried to make it work on Xbox, we realized “free” wasn’t, and decided to remove them.
This does not mean we’ve removed game components. They are still there (and improved – more on that later) and behave much like they did previously. We’ve just moved to a code only model. The code that the designers generated inside InitializeComponent is the code you’ll need to write yourself. It’s still very clean and more explicit, which is a good thing.
Game
Game is for the most part the same. We renamed some things and moved some things around based on feedback including improving device management and made resource loading and unloading easier. Here’s a list of the changes:
Game Components
As mentioned above, we have not removed support for game components. We only removed the ability to design them visually, which was marginally useful at best. But what we did do is take all of the feedback we’ve gotten from the beta and the forums and addressed a lot of it. This makes our game components provide a little more policy, which is good, while also allowing some flexibility in how users can incorporate existing code bases into our component model. The following is a list of changes and additions:
So the big changes here are that we introduced a layering of components by providing logical and logical + visual implementations. Most of you will just derive from GameComponent or DrawableGameComponent. We introduced the interfaces as a way to be a bit more flexible. Now if you have, for instance, a large scene graph code base that you’d like to incorporate into your XNA Game, you can just implement the appropriate interfaces and you’re good to go. You won’t have to flip your hierarchy around and derive everything from GameComponent just to “play” in the Application Model.
GraphicsDevice Management
In beta, we had a GameComponent called GraphicsComponent that provided GraphicsDevice creation and management. Many people found it odd to have such a “system” level object at the same level as their components. This type is now called GraphicsDeviceManager and is no longer a component. All of the properties are still there to set up the back buffer size, enable multisampling, etc. Additionally, it still publishes the services it provides like it did before.
Summary
So I hope that helps explain what the application model looks like now, what the changes were, and what the motivation behind them are. I think the end result will be an API that is easier to use, more explicit and addresses many of the suggestions and problems customers had with the beta application model.
Mitch Walker
program manager | xna framework
For those of you that read my post on Migrating an XNA game from Beta 1 to Beta 2 , but wanted more info,
Thank you! Designers are great for putting together the look of a UI, but are the worst crutch in programming!
Components are fine, especially when they encapsulate a lot of time consuming tasks. However, they MUST BE (yes I realize thats a shout) *extendable*.
A quick reference to ASP.NET you'll find that things such as the Menu and MenuItem are starts at encapsulating time consuming tasks. Yet they fall flat because they are not extendable whatsoever.
Well it's all over the Internet now but the official announcement of Beta 2 of the XNA Game Studio Express
While downloading XNA Beta 2 here are some useful tidbits, first you may want to head over to the XNA
I got over a week with the flu (sleeping instead of programming :( ) just in time to...
XNA Game Studio 2.0 Beta Available Soon