What is the state of Managed DirectX

Discussion in 'Game Development (Technical)' started by Pyabo, Jun 11, 2009.

  1. Pyabo

    Original Member

    Joined:
    Jul 27, 2004
    Messages:
    1,315
    Likes Received:
    0
    Has this been completely abandoned? Is anyone working with it? Is my dream of coding games in C# dead?

    I know many years ago it was sort of written off as a dead end since the .NET runtime wasn't shipped with XP... but now that we've got Vista and soon Windows 7 in the wild, are we any better off?

    Did .NET finally get pushed as a critical update?
     
  2. JeBuS

    JeBuS New Member

    Joined:
    Jul 9, 2008
    Messages:
    140
    Likes Received:
    0
    I believe it's been 'abandoned' in favor of XNA. Most everything you did in MDX can be ported pretty simply to XNA if you try.
     
  3. Sybixsus

    Original Member

    Joined:
    Aug 2, 2004
    Messages:
    959
    Likes Received:
    0
  4. cliffski

    Moderator Original Member

    Joined:
    Jul 27, 2004
    Messages:
    3,897
    Likes Received:
    0
    I'm glad I avoided XNA, managed DX and C#
    Microsoft change things for changes sake. Its silly. I'm quite happy with C++ and directx, and sick of them assuming we are all keen to use whatever stuff they woke up and thought about this morning.
     
  5. Teeth

    Original Member

    Joined:
    Dec 6, 2004
    Messages:
    165
    Likes Received:
    0
    You can use C# with entirely opensource libs SDL and OpenGL using Tao bindings and SdlDotNet. Allows for ports to Mono (Linux + Mac) that way too.
     
  6. Pyabo

    Original Member

    Joined:
    Jul 27, 2004
    Messages:
    1,315
    Likes Received:
    0
    Cliffski have you ever really worked with C# and .NET? I'm just as distrustful of most Microsoft shenanigans as the next guy, but .NET is pretty much God's gift to programmers... With the right tools it practically does the coding for you. I find going back to C++ difficult after doing C# for so long.
     
  7. Pyabo

    Original Member

    Joined:
    Jul 27, 2004
    Messages:
    1,315
    Likes Received:
    0
    SlimDX looks mighty interesting... thanks.
     
  8. Backov

    Original Member

    Joined:
    Oct 23, 2005
    Messages:
    812
    Likes Received:
    0
    It truly is a thing of beauty.

    That said, Java's just as good.
     
  9. cliffski

    Moderator Original Member

    Joined:
    Jul 27, 2004
    Messages:
    3,897
    Likes Received:
    0

    It's just not worth it to me to take the time to learn all the new code. I could make a game in the time it take for me to work out how the hell they have decided to arrange everything this time. Everyone says "you can learn it in a weekend" but that's nonsense. I can learn how to get things to compile in a weekend, but can I learn how to use it effectively, reliably, efficiently and in a bug-free way to write code as fast as I do in C++?

    There is just no overwhelming reason for me to move. Everyone hates C++ because of pointers, but tbh I never get pointer errors. The bugs I run into would be bugs in any language.
     
  10. princec

    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    4,873
    Likes Received:
    0
    There's more to it than just pointer errors. I take your point about the time wasted learning something new when you could be writing a game though. Otherwise I'd learn DirectX.

    Cas :)
     
  11. gosub

    Original Member

    Joined:
    Sep 10, 2005
    Messages:
    151
    Likes Received:
    0
    C# is alive and well

    C# and .NET are alive and well, and as someone here said... they are a gift to programmers. The garbage collector is especially awesome, allowing you create light weight objects without worrying about how they get disposed. You still have to manage the life time of some objects, especially anything that wraps a native object.

    If you use managed DirectX, you should include all the DLLs you need to make it work (as I did in my game, see below). The .NET framework is included in Vista and higher, but will often need to be installed on XP. It's a bit tedious to get managed DirectX setup and working properly. You can use my managed DirectX control as a starting point (as I did for Zenix3D): http://gosub.com/OpenSource/DirectXControl/DirectXControl.htm

    Interop with C or C++ libraries (like Bass) can be a pain. If I were starting today, I'd probably go with XNA instead. If you try SlimDX, let me know how well it works.

    -Jeremy
     
  12. cliffski

    Moderator Original Member

    Joined:
    Jul 27, 2004
    Messages:
    3,897
    Likes Received:
    0
    the thought of having to bundle a load of the .net stuff with my games would also be a nightmare.
    Do people really have a problem keeping track of allocated memory too? I never really use malloc, I just create objects, and delete them when I'm finished. As longas you arent creating objects each frame, does it really cause much of a pain?
    Maybe I'm just far too used to C++ and overlook all its fiddliness?
     
  13. zoombapup

    Moderator Original Member

    Joined:
    Nov 25, 2004
    Messages:
    2,890
    Likes Received:
    0
    Yeah, I'm not entirely sure what C# offers in terms of making games either.

    Its great for tools because of its exellent winforms support. But otherwise? not sure.
     
  14. Pyabo

    Original Member

    Joined:
    Jul 27, 2004
    Messages:
    1,315
    Likes Received:
    0
    Oh man, where do I start... lol

    Let's leave that for another thread. :)

    I thought XNA was really targeted at Xbox games? Can you actually publish an XNA title as a stand-alone game?
     
  15. Sindarin

    Sindarin New Member

    Joined:
    Sep 22, 2008
    Messages:
    57
    Likes Received:
    0
    XNA works for Windows, Xbox 360 and Zune. (Note: That's all Microsoft products)
     
  16. Backov

    Original Member

    Joined:
    Oct 23, 2005
    Messages:
    812
    Likes Received:
    0
    As one of the few people here (probably) who's actually shipped a "commercial" XNA game, I'll say this: It's fucking awesome. :)

    That said, you will have distro issues that will require some work. In our case, we were using ClickOnce (DON'T!!), so that required some leet Microsoft haxors to get that POS to properly install XNA and .NET runtimes.

    Even performance was damn good. We found the oldest box we could and put a crappy AGP Intel graphics card in it (the crappiest one of those we could find) and it still ran our game at full frame rate. Hell it even ran pretty good on the ATI 9600 we tried it on.

    So, XNA is good. But no cross platform.
     
  17. Cygon

    Cygon New Member

    Joined:
    Nov 20, 2006
    Messages:
    65
    Likes Received:
    0
    I have to agree. .NET is such a smooth and convenient place to develop in I don't want to miss it anymore. The framework is exceptionally well designed and just a pleasure to work with. Things like Unit Testing and IoC/DI were just hacky to implement in C++, in .NET it's not an issue.

    It does hurt a bit that XNA doesn't work in Mono (and Mono.Xna is practially dead).

    Having done C++ for 15 years and now C# for 5 years, I'd argue that it is more productive, but as mentioned before, you need to get accustomed to the .NET way of doing things first, so it will take its time before it pays off.

    If you go with XNA, there's XBox 360 support.

    Without XNA, there's the Tao Framework which has cross-platform bindings for several libraries (OpenAL, OpenGL, SDL, ODE, DevIL, Lua and then some) or MOGRE, a .NET binding for the Ogre3D engine. But here's where the trouble starts. As soon as you need some library that has not been ported to .NET and for which no P/Invoke wrapper exists, you have to create the P/Invoke bindings yourself, which takes more effort than just using the library in C/C++ directly.

    And of course, there's the clunky .NET Framework you need to redistribute to XP customers. Which means more work in the installer department.

    Haha, I tried ClickOnce, too. Disastrous. Displays a nothing-saying dialog with no progress bar, doesn't tell the user it's about to install .NET (some users react allergic to that), doesn't let the user pick a folder, and I have no control over which start menu entries it creates. Truly ClickOnce, but maybe they should extend it to ClickOnceAndNeverAgain :)

    I solved it by creating this: XNA Installer. It's a WiX template project for an installer that checks for .NET and installs DirectX and/or XNA if neccessary (with an overhead of only 6.2 MB).
     
  18. Backov

    Original Member

    Joined:
    Oct 23, 2005
    Messages:
    812
    Likes Received:
    0
    Well said. :)

    Also, I've used your texture packer. You rock.
     
  19. puggy

    Original Member

    Joined:
    Mar 10, 2005
    Messages:
    195
    Likes Received:
    0
    Don't you just love it when people tell you what language you should be programming in, and i'm sure the debate will continue for centuries.

    Personally i hate C in all it's varients, it's such a clumsy language which to this day i don't understand how it becuame the 'defacto' programming language for standalone programs.

    personally i like object pascal (codegear delphi). It's an easier, clearer and quicker language to use (in my personal opinion). And while i havn't tried using it, apparently the .NET integration is very good. Of course the cost of codegears delphi is quite high (2009 professional is $899) and only supports windows, there is the freepascal compiler and the lazarus IDE ( http://www.lazarus.freepascal.org/ ) which is free and supports a lot of OS's.

    I suppose this is my 2 cents for the next 6 months until someone brings up the language topic again. :p

    *little fact:
    C# was orignally the name for a new and improved HDML (hardware description markup language) language until MS decided to use the name
     
  20. Backov

    Original Member

    Joined:
    Oct 23, 2005
    Messages:
    812
    Likes Received:
    0
    So you came into a thread about programming in C# to piss and moan about programming in C based languages?
     

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer