Quote:Original post by Spoonster
Yes, but so will The TCP/IP protocol. ;)
It doesn't really answer the question of what it *is*.
The way I undestand it, it's basically a multiplatform DirectX. Instead of just standardizing and abstracting PC hardware, it'll encompass XBox2 (and XBox?) and possibly other consoles too. That's just how I read it. Would be nice if anyone actually *knew* exactly what it's supposed to be.
Right. Kinda. It's not a DirectX, per-se.
XNA will define the common interfaces for the major game engine components. These components include graphics, input, sound, networking, physics, and AI. It will be up to you to either implement these interfaces, or to use some third party software (ie Renderware for graphics or Havok for physics).
Consider this mock-up of the graphics interface:
class IGraphics{public: virtual HRESULT Initialize() = 0; virtual HRESULT RenderEntity() = 0; virtual HRESULT Release() = 0;};class CPCGraphics : public IGraphics{private: // Platform-specific stuff HRESULT CreateWindow();public: HRESULT Initialize() { // Implementation } HRESULT RenderEntity() { // Implementation } HRESULT Release() { // Implementation }};class CXBOXGraphics : public IGraphics{private: // Platform specific stuffpublic: HRESULT Initialize() { // Implementation } HRESULT RenderEntity() { // Implementation } HRESULT Release() { // Implementation }};
In this case, the game would have direct access to the IGraphics interface. You would be able to intialize, render, and release with the graphics system, without having to worry about which platform you are operating on.
I'm not sure how accurate this is (I have no knowledge of the specific XNA implementation), but it seems to be what MS is describing to us.
Since all of these interfaces have been abstracted, your game code doesn't actually have to know the details of the current operating system. That means you won't have to re-write your engine's code for each platform.
This presents us with another problem. Sometimes, different platforms just do things differently. For example, PC graphics hardware prefers to render in a few large batches. However, PS2 graphics hardware needs to render in many small batches. This is a problem, because the game code is supposed to be unified, but a certain aspect of it must be handled differently because of hardware specifics.