Jump to content

  • Log In with Google      Sign In   
  • Create Account


OpenTK vs XNA vs SlimDX vs SharpDX vs Anything else that I missed?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 JustinGolden   Members   -  Reputation: 104

Like
0Likes
Like

Posted 28 November 2012 - 09:53 PM

Hello-

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.

Sponsor:

#2 kunos   Crossbones+   -  Reputation: 2205

Like
2Likes
Like

Posted 28 November 2012 - 11:07 PM

with OpenTK and SlimDX (and SharpDX) you just have "translation layers" between C# and OpenGL and DX Api. Using these two usually means studying (or being already familiar) with the APIs from C++ and translating the concepts to C#. You start from these if you want to build the entire game engine from the bottom up.
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.

Stefano Casillo
Lead Programmer
TWITTER: @KunosStefano
AssettoCorsa - netKar PRO - Kunos Simulazioni

#3 BCullis   Crossbones+   -  Reputation: 1813

Like
0Likes
Like

Posted 29 November 2012 - 09:00 AM

In my experience, XNA rewards you the quickest with something running and playable (out of the box: the framework you start with can "run" a game that's just a windowed rendering context drawing a blue square). It's also a great environment to start learning HLSL, and I only moved away from it because I was worried about long-term support and didn't like some of the restrictions created by XNA's profile system.

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.
Hazard Pay :: FPS/RTS in SharpDX
DeviantArt :: Because right-brain needs love too

#4 6677   Members   -  Reputation: 1058

Like
1Likes
Like

Posted 29 November 2012 - 09:00 AM

I would no longer recommend XNA. Excellent as it is support for it seems to be slowly phasing out and platforms are limited.

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.

#5 riuthamus   Moderators   -  Reputation: 4868

Like
0Likes
Like

Posted 29 November 2012 - 11:42 AM

To give you a background of where we started:

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.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS