OpenTK vs XNA vs SlimDX vs SharpDX vs Anything else that I missed?
Members - Reputation: 104
Posted 28 November 2012 - 09:53 PM
I am an experienced programmer in C# but have never developed games, and thought I would give it a try as a hobby. I am looking for recommendations on what to use, and the advantages/dis-advantages of all. It would be great to know what is recommended from someone experienced in the game programming world.
Crossbones+ - Reputation: 2224
Posted 28 November 2012 - 11:07 PM
XNA is slightly higher level and idiomatic and specific for C#. You start talking about models, matrices and higher level concepts.
Talking about C#, it is right also to mention Unity3D, that is much higher level and that uses C# (plus other languages) for scripting,
So it really depends at which level of the graphics "ladder" you want to start... other than that, they're all fine, performant, stable and so on.
They also have a slightly different compatibility matrix.. but, overall, they all have good a portability stories there. But, being yourself a beginner, you shouldnt care at all about portability at this stage and just target the easiest platform: Windows Desktop PC.
Edited by kunos, 28 November 2012 - 11:19 PM.
Crossbones+ - Reputation: 1924
Posted 29 November 2012 - 09:00 AM
SlimDX or SharpDX is a great learning experience for DirectX, where you trade speed of development and higher-level starting points for broader and deeper levels of control.
I can't comment on OpenTK as I never tried it.
Members - Reputation: 1054
Posted 29 November 2012 - 09:00 AM
Instead I would recommend monogame which is a clone of XNA (most of the classes have the exact same names, parameters and usage etc) but intended for running on the mono runtime (which again is an open source version of .net) but it runs perfectly fine on .net. Monogame under the hood is actually built using both SharpDX (very similar to slimDX, its just an alternative option) or OpenTK and can switch between the 2 without you ever noticing. As a result you gain access to every platform mono can run on:
- Windows (with either .net or mono, it really doesnt care)
- OSX (both powerPC and x86)
- Linux (all architectures with some limitations. x86 is very well supported anyway. Others may need OpenTK to be ported over, usually platforms requiring OpenGL ES)
- Android (monodroid is required)
- iOS (monotouch license required)
- Playstation VIta (some sort of license required yet again)
- BSD although I think that is an unofficial port
- Googles Native Client on any x86 system (browser technology, again its an unofficial port).
Porting between XNA and monogame is fairly seamless. Of course by backporting your project from monogame to XNA you then get windows phone 7 and xbox 360. I think windows phone 8 has been ignored by microsoft in XNA but who knows, maybe monogame will go there too?
Choosing between OpenTK/SlimDX/SharpDX and XNA/Monogame is just a case of how low level do you want to go? The prior 3 options are just direct wrappers around either OpenGL or DirectX enabling their usage from .net or mono. XNA/Monogame are much more "engine like" and already have sprite batchers etc implemented aswell as simpler sound API's, mouse and keyboard input and so on.
Moderators - Reputation: 6323
Posted 29 November 2012 - 11:42 AM
Our project started with XNA. The goal was to get out a simple product that had some relatively nice design and could be released on xbox. As the progressed on our project we noticed more and more problems with the XNA platform when dealing with shaders and new technology. We wanted to take advantage of some of the more refined elements available to PC users but to do that we would have to migrate from the XNA platform.
Several months had passed and we moved into the SlimDX setup. We had access to dx11 as well as many other factors that were rather limiting with the XNA setup. On the flipside, we had to code much more when it came to handling models and mesh rendering. There is almost 0 projects out there that have the option to handle meshes that have animations and textures when it comes to a C#+SlimDX setup. So, expect to spend some time dealing with that if you go that route.
We just recently moved from SlimDX to SharpDX ( since slimdx doesnt seem to be supported much these days ). With this switch we gained all the perks of the SlimDX vs XNA setup as well as gaining access to the new dx11.1 perks. ( which improved our UI setup and reduced fps loss )
I think it was best said already, it really depends on what your overall limitations and goals are for the shaders/graphics.
Edited by riuthamus, 29 November 2012 - 11:43 AM.