10

I would like to develop a game for windows 8, but since Xna isn't supported, i don't really know, if it is good to use something like MonoGame - because i think, it doesn't make any sense to use MonoDevelop with OpenGL while the UI Frontend runs with DirectX. But my searches and on "apptivate.ms", they still force the developers to use MonoDevelop - but why would a corporation like Microsoft even do this?

And i don't like to build my game in C++ with DirectX, because in my case, it's not a big game, and my favorite language (also, my language at work) is C#..

Btw., it would not be a big deal for me to write this game with OpenGL or C++, because I've got a lot of experience in these two for the past four years, but in this case, i like to have a "fast" and "save" solution like C# and a Graphics Framework.

So... maybe someone has the answer to these qustions:

  • Should i use MonoGame with Xaml / C# and don't worry about the mix of DirectX and OpenGL?
  • Or is there even another DirectX/Game Framework which i can use?
  • Or maybe, i'm totally wrong, and Xaml doesn't need DirectX? Or i can force MonoGame to use DirectX?
  • Or, another point - would something like "System.Drawing" fast enough for a spaceshooter with some nice shading effects (I think, for my case, i need shading and something like bloom, blurring etc.)? Maybe, Microsoft added a new 2D drawing library? (But i think its still gdi+ )
lunatix
  • 817
  • 10
  • 25
  • 1
    can't use gdi+ in metro apps. xaml framework is built on top of Direct2D, DirectWrite and Direct3D – Denis Sep 28 '12 at 20:14

4 Answers4

5

Your question is ambiguous if you are referring to Windows 8 Metro (aka Modern) or Windows 8 Desktop, but I assume it's the Metro version.

If you want to develop a game in C# for Win8 Metro without using a commercial solution, you can use:

  • SharpDX which is a low level DirectX API for .NET or the up-coming SharpDX.Toolkit (check latest news on the website) which is a high level framework around Direct3D11 (with a XNA like API, but with full Direct3D11 support). SharpDX is the only C# wrapper covering the whole DirectX API that is certified to work under Windows 8.
  • MonoGame which is using SharpDX for its Metro backend. I haven't heard that you need to use MonoDevelop for it, as it is working with an existing XNA project and VS 2012 should work just fine.
  • ANX which is also using SharpDX for its Metro backend.

Concerning the previous answer, If Win8 Modern is assumed, you can't use OpenTK, as OpenGL is not a certified API for the Microsoft App Store and SlimDX is not compatible with Windows 8 Metro.

xoofx
  • 3,682
  • 1
  • 17
  • 32
  • Okay, thats good to know. But i hope, OpenGL will get a certificate? Because.. a lot of indie developers develop with OpenGL and/or OpenTk.. so they have to write their "GraphicsProvider" twice, one with DirectX and one with OpenGL (If they like to support Mac/Osx and Linux too).. – lunatix Sep 30 '12 at 12:31
  • I don't think that Microsoft is going to do anything for OpenGL. They want to push developers to use their 3D API. The de-facto API for 3D on Windows is Direct3D. If you care about cross-platform, you could rely on options like Unity3D that hides the complexity of maintaining your own Graphics abstraction layer. – xoofx Sep 30 '12 at 14:58
2

There is an OpenGL to DirectX wrapper in the works that allows use of OpenGL in Windows 8 Modern applications. It's not complete yet but it may be sufficient if you want cross-platform compatibility and are willing to target only the subset of OpenGL that is implemented (or are willing to implement the rest yourself and hopefully contribute back.)

https://gl2dx.codeplex.com

Update: gl2dx seems to be dead as of November 2013, but there is a similar project, ANGLE, which implements most (if not all) of the OpenGL ES 2.0 spec and the EGL spec on top of either DirectX 9 or 11. This is the method by which Firefox and Google Chrome do WebGL on Windows.

http://code.google.com/p/angleproject/

1

If you want to use OpenGL and c#:

http://www.opentk.com/

For DirectX and c#:

http://www.slimdx.org/

or

http://sharpdx.org/

mrvux
  • 8,523
  • 1
  • 27
  • 61
  • Oh... i'm sorry, didn't noticed SharpDX and SlimDX in my searches =/ I think i will use one of them, but maybe you know an answer on the Xaml question - does it run with DirectX in the Backend? – lunatix Sep 28 '12 at 17:37
  • 1
    Using wpf will be likely to use some directx functions under the hood, you can check that link http://msdn.microsoft.com/en-us/library/ms742196.aspx – mrvux Sep 28 '12 at 17:48
1

GDI+ is out bounds of Metro/Modern UI apps, if you're interested there some companies that look to make replacement apis like this one: http://www.moderncomponents.com/products/DrawingLibrary/, it's still in it's early stages, but looks good and may help you to create some simple games.

Rafael
  • 2,827
  • 1
  • 16
  • 17