Welcome to the Performance forum!

Such a great idea!

There has been a lot of concern about performance between Managed and Unmanaged DirectX applications, considering I'm both a C# and C++ developer, which language should I pick in order to start getting around the DirectX9 API?

I've been able to take a look to both DirectX9 versions and during the process I've been able to do a couple of small games composed by a single and simple 3D scenario, even though they're not fully productive at all considering they're just samples, they work pretty well, however perfomance concerns came up, and I can definitely see it's much faster to go on the .Net managed enviroment due to the automatic mememory management and type safety, but on the other hand unmanaged DirectX seems to be the best option for highly perfomance demanding games.

In the scenario in which I'll have to tell my GameDev team which language to use in order to create a fully functional and some complex and demanding graphics game. Which one would you pick? Would you shorten up development time using .Net managed code or would you just ride on the unmanged road for performance?

Thanks!

Jos Angel Yánez.
MCAD.
Caracas, Venezuela

[1262 byte] By [joseangel_yanez] at [2008-1-12]
# 1
I would actually do both. Start managed, for fast development. While you're learning your way around the API, you don't need raw perf, you want easy development. Later, if you find you need it, you can usually port back to C++ - the APIs are pretty similar on both sides.
TomForsyth at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: DirectX 101...
# 2
Using both languages is good for other things to.
I have been using dx sdk (started with DX8) in vb for long time, then started using c++ for better performance.

Altho i just learned c++ for using sdk's and cannot make any windowed programs with buttons in it :), i still use vb.net for making tools (linking to c++ win32 project with dx code in it)

So just make a mix of it.
Let some of your team make the prototype using managed code (less time needed, less performance). Once a part of code is the way u want port it to unmanaged to increase performance.

Maybe make little wrapper around the unmanaged code, so u can use it in managed code.

Nightmare_BE at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: DirectX 101...
# 3

Hey,

This is a bit tricky but to be honest on major performance gains unamanged code is a bit better (5~10 % depending on the code you write, your used methods and optimization methods). I would suggest that if you want to start developing quality games fast and reliable use .Net and managed code. Basically it has the almost the same functionality as unmanaged but it's speedy and reliable, taking also in consideration the modern hardware 5% performance reduce versus speed and versability is a very good catch. If you want to take your game to the next level I would definatly suggest tho the use of unmanaged things because for uber things you need uber detail on how you construct your code ;).

Kindly,

~a.ka. Andr3w

akaAndr3wGrammenos at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: DirectX 101...