Archived

This topic is now archived and is closed to further replies.

elis-cool

Direct Draw vs. D3D

Recommended Posts

Well I just sent a test of my new game to someone and guess what... it didnt work!! it is a direct draw game and it worked for other people, but it crashed when it got to making surfaces and the card was a Matrox Millenium II, so does DDraw have problems with this card? Well now on to the guts of my post after that little intro Which would give me better performance and compatibility? I have been told that 2D in D3D is quite easy... well so is it? I am reading TOTWGPG and have read all the direct draw section and so I only know DirectX 6, so should I go upto directdraw 7 or go straight up to D3D8? The thing is (I could be wrong here) I dont know whether I want a whole bunch of DirectX function calls littered throughout my code, in DDraw you just initilize some stuff and call blt() in your renderScene() function, and that is all the DirectX code there is! is it like that in D3D?? So basicly any comments would be helpful... CEO Plunder Studios

Share this post


Link to post
Share on other sites
"out of the box", d3d is not as simple as ddraw. However, you can very quickly implement a wrapper around either d3dxsprite or your own 2d functions that will allow you to use the same easy functions.

take a look at d3dxsprite and/or the 2D in dx8 articles on this site.

Share this post


Link to post
Share on other sites
ddraw is more compatible. also you shoudl check the error codes returned. likly you are requesting a video surface when there is no more vram left. alos possible you are using a video mode not suported by the card. ddraw is quite basic and most cards support everything. you need to post why it did not work. i say its your code. i never had problems on matrox milleniums while using direct draw, even when doing some fancy stuff. highly likly you are doing something wrong, and it just happens the matrox drivers are more stringent then other video card drivers.

Share this post


Link to post
Share on other sites
I just started using Direct3D for 2d stuffs about 5 days ago, and I love it. I found DirectDraw to act kinda funny on some peoples'' video cards too; on my Voodoo 3 one of my games worked perfectly, but on other peoples machines it did anything between locking up, drawing some green rectangles before locking up, and starting, showing a black screen and suddenly quitting. I think I didn''t check enough of the DirectDraw functions I used for errors .

In any case, D3D is very compatible if you make sure to select a video mode and format that is commonly supported. Besides, D3D is just SO much better than DirectDraw, it''s incredible: easy rotation, alpha blending, cool lighting effects, the ability to easily add some minor 3D stuff to your 2D game, an actual camera you can move around, etc. Try D3D on your next game. It''s sorta hard to understand, but if you get it, you''ll never look back.




Things are not what they are.

Share this post


Link to post
Share on other sites
Well I have decided to learn d3d and port my game over to it, I must say the initialization in very easy compared to ddraw! but thats about where the easyness stops! its not so much as hard as there are a ton of function calls and what not...

CEO Plunder Studios

Share this post


Link to post
Share on other sites
If you are using D3DXSprite, there should be almost exactly the same number of calls in D3D as in DirectDraw, excluding BeginScene and EndScene. Besides that, it''s just clear, blit a few things, and flip.




Things are not what they are.

Share this post


Link to post
Share on other sites