XNA Framework / Architecture

The XNA Framework resides in the Microsoft.XNA.Framework namespace.  It adopts a layered architecture to provide services.

There are four layers defined.  From lowest to highest these are:

  • Platform
  • Core Framework
  • Extended Framework
  • Games / Application

The lower three layers are implemented by Microsoft and the upper layer (Games/Application) is a placeholder layer.  What I mean by that is that the Games/Application layer represents the code that you write as part of your game or 3rd party/community reusable components that you use.

Looking in to each layer we can see that they each provide a set of classes that wrap up some set of functionality:

Platform

This is the lowest level layer and represents the native API's that get wrapped by the Core Framework Layer. Currently the low level Direct3D, XACT, XINPUT and XContent are part of this layer.

Core Framework

This is next layer up from the Platform layer and provides higher level managed abstractions of the low level services.  It contains classes for Graphics, Audio, Input, Math and Storage.

Extended Framework

This layer sits on top of the Core Framework layer and provides classes that define an Application Model.  It also contains classes that interface with the XNA Content Pipeline.

Game / Application

As I mentioned this layer is really implemented by you and the community.  It is where your game logic, content and components written by the XNA community live.  Your code will mostly use the Core Framework layer and the Extended Framework layer to get work done.

Since it is a layered model you can choose which services you use and which you don't.  If you have your own Math routines or Application model you could potentially replace the stock versions.

 



Answer this question

XNA Framework / Architecture

  • Al-Arabi

    Thanks Mitch, that makes a lot more sense now
  • Jamie Thomson

    I have a TODO to create a post on http://blogs.msdn.com/xna to give an overview of what the Framework is and more importantly what's included. I've been super busy with Gamefest and getting the beta ready that I haven't had time. Hopefully soon. :)

  • CK-INLINE

    One correction on the Platform layer. This isn't a thin wrapper around the native APIs, it is the native APIs. I included that layer in the presentation so those that are familar with the native APIs will be able to map functionality. Ideally those who use the Core and Extended Framework aren't concerned about the Platform layer.

  • gteddy

    XNA is sounding better and better. Can't wait for the beta release!

  • GrahamY

    This is incredibly useful as I can now see and start to visualise what I need to do to convert my existing code over to XNA.


  • XNA Framework / Architecture