Wiegje

Greetings,

I'm sure many people asked this before but no one has ever been able to answer this for me :( I've searched high and low (on this forum too) but theres no answer to this question:

Whats the performance difference between MDX and DX

I'm currently writing a little 2D engine in MDX, and its quite fun to do! But it doesn't perform that well, I've managed to get a few performance gains due to me revising my own code, but it just doesn't quite cut it.

Also when is this MDX 2.0 gonna be released Or is that XNA And what are the main differences between MDX1 and XNA

Thanks in advance.




Re: Game Technologies: DirectX 101 Managed DirectX vs Native DirectX performance

Jim Perry

Managed DX is basically a wrapper for the DX API. If you're not getting performance near that of native C++ and DirectX your code probably needs to be tweaked, especially if it's simple 2D stuff. Managed DirectX 2.0 is not going to be released. XNA is basically the next version of Managed DirectX. There's a ton of differences, you might want to look at the FAQ.




Re: Game Technologies: DirectX 101 Managed DirectX vs Native DirectX performance

Jack Hoxley

I seem to remember the stated aims were to have MDX within 97% of native performance measured on a call-for-call basis. As far as I'm aware they achieved this goal, but its often misunderstood as it measures the API access and doesn't factor in any differences between C++ and C# (or native versus .NET) - that's a whole different topic

I originally started writing DirectX code using VB6 and unofficial type-libraries (before moving on to the official ones - the precursors to MDX) and with a little effort it was perfectly possible to write applications with similar capabilities to C++ authored ones. Your architecture and algorithm design are going to have a MUCH higher impact on performance than your language of choice.

2D graphics, despite having the easier concept are often easier to write badly. I've seen a lot of threads on these and other forums over the years that make me cringe - 1000's of draw calls per frame, one texture per tile, CPU transforms etc.... The bottom line is, as Jim Perry commented, you need to look at your API usage and your algorithms before you point the finger at your language/platform of choice.

hth
Jack






Re: Game Technologies: DirectX 101 Managed DirectX vs Native DirectX performance

Jim Perry

 Jack Hoxley wrote:
I originally started writing DirectX code using VB6 and unofficial type-libraries (before moving on to the official ones - the precursors to MDX)

Those were the good old days, weren't they   Patrice Scribe was my hero!






Re: Game Technologies: DirectX 101 Managed DirectX vs Native DirectX performance

Jack Hoxley

Jim Perry wrote:

Jack Hoxley wrote:
I originally started writing DirectX code using VB6 and unofficial type-libraries (before moving on to the official ones - the precursors to MDX)

Those were the good old days, weren't they Patrice Scribe was my hero!

Yeah, plenty of good memories from those days!

I wonder what Patrice Scribe's upto these days - I found a few of the old VB Gaming scene were still active a while back.

Cheers,
Jack






Re: Game Technologies: DirectX 101 Managed DirectX vs Native DirectX performance

Jim Perry

I checked his site and it's somewhat up to date as far as what's going on in the industry so he's still doing something. There's no news about what he's specifically working on that I saw.




Re: Game Technologies: DirectX 101 Managed DirectX vs Native DirectX performance

Wiegje

Thank you for this answer.

I have no doubt that my coding is at fault of the slow performance. I however have already set it up so that it only uses 1 texture for every tile that requires that certain texture. Perhaps my algorithm for that isn't the best, I'm still looking into it :)

So if I were to code it very effeciently, I could create an equal-performing game in MDX aswell as in Native DX






Re: Game Technologies: DirectX 101 Managed DirectX vs Native DirectX performance

Jack Hoxley

Wiegje wrote:

So if I were to code it very effeciently, I could create an equal-performing game in MDX aswell as in Native DX

Yes, as far as I'm aware it should be possible. You'll probably have to accept a few percentage points of difference, but performance shouldn't be drastically different.

hth
Jack






Re: Game Technologies: DirectX 101 Managed DirectX vs Native DirectX performance

Wiegje

Ah ok :) Thanks a lot!!

Marked as very helpful :D