Sign in to follow this  
Daerax

[.net] [XNA] Crossplatfromability of XNA

Recommended Posts

I assume that the XNA Framework implementation is strongly depenendent on Microsoft platforms and since it is a managed directx superset it is implied that it is not an open standard. As such, an XNA Framework port to mono would have to inwardly, be a complete reimplementation while only outwardly looking like XNA - with simply the interface and class names etc remaining the same. However, would such a port face any patent or trademark or whatever legal issues? If not, what is the likelihood of a such an implementation and what do you think the implications on the [independent] games industry will be? Would the surge of games for Macs and Linux such a development would allow be beneficial or harmful to Microsoft and her platforms? Please correct and clarify any of my misunderstandings. cheers

Share this post


Link to post
Share on other sites
XNA is not really even a superset of MDX.. there's lots of breaking changes in the API, and apparently a lot of D3DX functionality was removed, like loading meshes.

Porting XNA to mono would require implementing Direct3D like calls in OpenGL, on platforms which don't support Direct3D. This would probably be very difficult, as D3D takes a bit of a lower level approach than OpenGL, not to mention it would probably not be terribly fast. I think one would be better off to work with a wrapper library that provides a common interface to different backends (MDX, XNA, OpenGL). I'm working on such a library but it will be a while before I get to play around with XNA. There are other libraries which do that sort of thing; I think Irrlicht can work with either Direct3D or OpenGL.

Share this post


Link to post
Share on other sites
Quote:
Original post by kanato
...and apparently a lot of D3DX functionality was removed, like loading meshes.


That will be there when the content pipeline is added. XNA is in beta right now, and some stuff hasn't been included yet.

Quote:
This would probably be very difficult, as D3D takes a bit of a lower level approach than OpenGL, not to mention it would probably not be terribly fast.


You are correct in that there would be some extra layer of function calls to reimplement with GL (only the rendering stuff), but I'm not sure what you mean that D3D is "lower level" then OGL. They do pretty much the same thing on the same level.

Share this post


Link to post
Share on other sites
I guess I mean that Direct3D was originally intended to be an interface to graphics hardware, whereas OpenGL was intended to be more of a general purpose 3D rendering API.

Share this post


Link to post
Share on other sites
I was more thinking of components. I imagine that it would not be difficult to augment the IDE's like Sharp or Monodevelop to treat components the way they have Visual Studio doing it. The components themselves should technically be consumable by any CLR compatible language regardless of platform implementation (Mono or .NET or whatever).

Unfortunately, for many if not most components (exceptin the logic stuff), the people writing them will likely tie themselves to XNA framwork stuff like Input, Audio or Graphics which will not have an equivalent mono implementation - a so close yet so far kind of thing. If any of my reasoning is wrong please correct me.

Share this post


Link to post
Share on other sites
Well one hindrance I see currently is the fact that Mono only implements the .Net framework v1.1. I'm pretty sure (but I could be wrong) that XNA builds on the .Net framework 2.0.

Also, why is this even necesary? There are great OpenGL alternatives for C# already in the form of Tao and SDL.NET. With a solid object oriented program design, most simple games could implement both Tao and XNA if you really wanted to go cross platform and still use XNA. The most important aspect of portability is a solid design.

I also can't really see Mono developers caring too much about XNA any way. Their goal isn't to play catch-up with Microsoft constantly. The goal for them is to create a new platform implementation of the .Net Framework. If XNA for some reason became a core part of the .Net Framework, then we might see something. I think however that would be highly unlikely considering its status as proprietary technology.

Share this post


Link to post
Share on other sites
Actually mono already supports some of the features of .Net 2 in a development release, including at least partial support for generics.

I think the Mono guys are trying very hard to keep up, but right now I would say that XNA on Mono is unlikely in the near future.

Share this post


Link to post
Share on other sites
One of the bigger technical problems with re-implementing XNA would be that it depends on DirectX technologies like Effect files and HLSL shaders, XACT for audio, and XInput for game input. Yes, that CAN be ported to sit on top of GL/GLSL/OpenAL/etc, but... it's a lot of work.

Share this post


Link to post
Share on other sites
A better idea would be to have a rendering engine that would have the ability to render using both XNA and Tao.OpenGl. Although it's still fairly buggy with both Managed DirectX and OpenGL, I know that this is the direction Borrillis wants to go with Axiom. There was a recent discussion on the forums regarding XNA.

Share this post


Link to post
Share on other sites
Quote:
Original post by Rob Loach
A better idea would be to have a rendering engine that would have the ability to render using both XNA and Tao.OpenGl. Although it's still fairly buggy with both Managed DirectX and OpenGL, I know that this is the direction Borrillis wants to go with Axiom. There was a recent discussion on the forums regarding XNA.


That's actually what I wanted to do with my game library. At the moment, it's MDX only though. But it's fully abstracted to the point where the development of libraries to use Tao.OpenGl or XNA should be straightforward.

Share this post


Link to post
Share on other sites
Quote:
Original post by Rob Loach
A better idea would be to have a rendering engine that would have the ability to render using both XNA and Tao.OpenGl. Although it's still fairly buggy with both Managed DirectX and OpenGL, I know that this is the direction Borrillis wants to go with Axiom. There was a recent discussion on the forums regarding XNA.


I have been doing some thinking about this too. After reading Mitch's Game Component Article, I was thinking about trying to make a IGraphicsDeviceService based service based on the Tao.OpenGL framework. This seems to be an reasonable way to integrate an OpenGL renderer. If you stuck to OpenGL, and *nix friendly libraries only, you might be able to easily port the base non DirectX XNA libraries over (such has the GameComponent stuff). It would be a bit tougher to enable both OpenGL and DirectX support with XNA, but I think the IGraphicsDeviceService would be a good starting point.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this