Jump to content
  • Advertisement
Sign in to follow this  
ThiEF_Jr

DDraw vs D3D for 2D Game

This topic is 4612 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all. I want to create a 2D game. But I have some problem. Which DirectX Component is best for 2DGraphic, DirectDraw or Direct3D with draw to texture and render quad primitive to screen. thx for reply -ThiEF

Share this post


Link to post
Share on other sites
Advertisement
Most casual games use D3D now but there are advantages to both.

DirectDraw:

- Less problems with compatibility. Not all pre-XP machines are guaranteed to have Dx8 compatible graphics cards or even to have the Dx8 run-time installed. Going with DDraw gives you a bigger install base to target.

- Slightly easier to code against. Not a huge difference but if you're a beginner it might make a difference.

D3D:

- Make built in features. (ie. HW acceleration, alpha blending, rotation of textures, lighting, etc.)
- Better performance when you have HW acceleration available.

Share this post


Link to post
Share on other sites
If you want to make a game with decent production values that you can sell, you have almost no choice but to use D3D. DirectDraw is just too limited. But, if it's for your own personal entertainment and knowledge, DirectDraw is also much simpler and works in more intuitive ways. The massive array of hardware out there means you really need to do some research if you decide to use D3D (powers of 2? shaders? etc.), and the complexity of things like vertex buffers can be ridiculous to newcomers if you just want to draw things to the screen.

Share this post


Link to post
Share on other sites
IMO, on the same adapter which supports both Direct3D and DirectDraw, DirectDraw apps may run slower in comparison to Direct3D apps. And definitely most eye-catching 3D features won't be able to imitate on a DirectDraw app.

The rest I agree with the other, you should jump straight to Direct3D.
V@T

Share this post


Link to post
Share on other sites
The good choice would be Direct3D.
This is from the SDK Docs

Use of DirectDraw is no longer recommended. With the release of DirectX 9.0, all two-dimensional functionality is contained within Direct3D and its associated helper functions in D3DX. However, the DirectDraw documentation is still available and can be viewed on MSDN at DirectDraw.

Your choice should be made upon these docs. It's always a good idea to see what the documentation says about a particular component of the DirectX API set.

I hope this helps.
Take care.

Share this post


Link to post
Share on other sites
I wrote a DirectDraw game a long time ago. I'm trying to spice it up a little bit to put it up for sale on the web (children's educational game). I've been using Direct3D (8 and 9) for the last four years.

Updating the game is so frustrating! No alpha blending, scaling looks plain old bad or is plain slow. In general, the win32 api seemed to do almost as good a job in most areas as DirectDraw.

I wish Direct3D had been around in its current form back then, but I really wasn't interested in hacking through the pages of setup code that used to be required for a simple 2D kid's game.

I highly recommend DirectGraphics (Direct3D).

Share this post


Link to post
Share on other sites
It surprised me that the managed directx documentation re-included directdraw, giving it an own namespace and full documentation of its classes.

Share this post


Link to post
Share on other sites
Aside from being deprecated, there's an enormous number of reasons to NOT use DirectDraw. Rather than enumerating them, I'll merely add to the rather unanimous voices here and say "Use D3D".

One nice thing is that there is a 2D game sample in the latest (October 2005) SDK that you can use to help you get started.

Good luck!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!