Sign in to follow this  
ThiEF_Jr

DDraw vs D3D for 2D Game

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
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
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
Quote:
Original post by Steven Hansen
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.

Yep this same thing happened to me. I made a successful DirectDraw game, updated it a couple years later and publisher said 'no way'.

Share this post


Link to post
Share on other sites
Maybe this is just my two-cents but I'd have to slightly disagree. This is mostly because I'm tired of explaining how to load bitmaps manually because so many people have never written a software blitter.

I would suggest that you learn how to use DirectDraw. Simply for education. I started learning graphics using an old DOS compiler and writing software that directly interfaced with the hardware and I can honestly say I've never regretted doing so. I'm not suggesting you should make any real games with DirectDraw, and Direct3D is definitely a much more robust and all-around better designed API. I'm just saying that knowing where it all comes from can't hurt.

Share this post


Link to post
Share on other sites
Quote:
Original post by lack o comments
Maybe this is just my two-cents but I'd have to slightly disagree. This is mostly because I'm tired of explaining how to load bitmaps manually because so many people have never written a software blitter.


What does that have to do with choosing between DirectDraw and Direct3D? You have to load bitmaps for either (D3D simply provides some utilities that do the work for you, but equivalents were certainly 'out there' for DirectDraw).

And yeah, most people have not programmed an integrated circuit... but heck, they're still using computers! Amazing!

Quote:
I would suggest that you learn how to use DirectDraw. Simply for education. I started learning graphics using an old DOS compiler and writing software that directly interfaced with the hardware and I can honestly say I've never regretted doing so. I'm not suggesting you should make any real games with DirectDraw, and Direct3D is definitely a much more robust and all-around better designed API. I'm just saying that knowing where it all comes from can't hurt.


I totally agree. Except Direct3D doesn't come from DirectDraw. And in fact, Direct3D is more closely aligned with the hardware and its drivers than DirectDraw ever was (particularly with modern video cards).

Skip DirectDraw. It's not "old skool cool" nor is it lower level. It's deprecated. It's legacy. There are *better* routes to go, and lucky us, they're faster and more flexible.

The only reason to use DirectDraw is as mentioned my previous posters: for support of a larger platform base on older OS's with non-3D video cards.

[Edited by - Simagery on November 3, 2005 11:54:15 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Simagery
The only reason to use DirectDraw is as mentioned my previous posters: for support of a larger platform base on older OS's with non-3D video cards.

Yes, or specialty applications like kiosk games/apps that run on cheap/no 3D hardware...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this