Archived

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

Lineage

DirectDraw dead?

Recommended Posts

I am a beginner roughly 200 pages into Tricks of the Windows Game Programming Gurus and was curious whether DirectDraw was dead. I ask this because it has been removed in the later versions of DirectX right? I was wondering whether I should still become familiar with it for 2d programming, or just learn how to program 2d in Direct3D. Any information would help - I''d just like to make sure I''m not learning something that isn''t a stepping stone and/or is obsolete now days. Thanks

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
DirectDraw was primarily designed for graphics cards that emphasized blitting. Nowadays, the cards are built around vertices and textures.

This is not to say that you must do 3D!!! In DirectDraw, you had a rect with 4 corners. Now those corners are called vertices. Unless you want to support older cards, forget about DirectDraw.

Share this post


Link to post
Share on other sites
Direct Draw is not dead by any means and is still viable in the shareware industry where many people do not have up to date hardware. Regardless of this go with whichever route you prefer. If you plan on doing 3d later then start with Direct3D. If you want to make shareware go with Direct Draw. The important thing is that in the end you are making games and having fun, not how you draw your graphics on screen. Since your already have the book I say work through it and learn Direct Draw, it can only help you.

Share this post


Link to post
Share on other sites
I didn''t mean to imply that there weren''t shareware games using Direct3D and the like. I merely wanted to point out that it is something shareware authors still have to consider especially depending on their target market.

Share this post


Link to post
Share on other sites
If you''re trying to create cutting edge visuals, then DirectDraw is long gone, but most of us here a amateur game/graphics programmers, so I think DirectDraw still serves a purpose. I''m currently working explusively in 3d, but if I didn''t get a good background in 2d, I think I''d strugle a lot more. I''m the kind of person who learns for the sake of learning, and doing low level pixel stuff in DDraw was a good primer for pixelshaders in D3D. Don''t give up on DDraw just because 3d is cool. 2d knowledge is quite usefull even in modern graphics.

Share this post


Link to post
Share on other sites
Short answer:No

Long answer:No it''s not dead althought none of the new accelerators support anything else than the primary display driver compatible with the Win32 GDI.It will be dumb to remove it anyway since a LOT of things are based on it.Every new DirectX is released with the DirectDraw7 interfaces which are the newest and perhaps the last.It''s always worth it to learn a new API believe me.

P.S.
I''ll soon demostrate that it''s not dead with my software renderer

"Tonight we strike,there is thunder in the sky,together we''ll fight,some of us will die,but they''ll always remember that we''ve made a stand and many will die by hand!" - ManOwaR

Share this post


Link to post
Share on other sites
Check these similar threads:
here and here

------------------------------------

If the universe is just a simulation in some unbelievably advanced computer, then God is one heck of a programmer!

[edited by - chacha on August 12, 2003 10:11:48 AM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
DirectDraw could not do many simple things:
Rotation, Alpha, Scaling.

With D3D these are now simple.

Yes, DirectDraw is dead.

Share this post


Link to post
Share on other sites
As a stepping stone, I''m not sure how much knowledge it will give you... Maybe some familiarity with programming in directx and I guess blitting, page flipping, and color keying. When I learned Direct Draw, understanding the initial setup code was a pretty big burden. Now all I''m left with is a blitter, which copies memory around...

My advice is that, if you''re going to learn it, don''t make a long term commitment to it (ie once you finish this book starting a big project with it.) But really you should just go for 2D in 3D.

Share this post


Link to post
Share on other sites
If I''m not mistaken, about 90% of successful non-web shareware out there is made with Directdraw. If you want to be a graphics programmer, then you need to know both 2d and 3d concepts.

The fact is, many of the people around here that learn Direct3d never really get anywhere with it. Sure, they load some models, render some triangles, or maybe some particles, but do they ever make a game? Not very often.

If you look at ANYONE who has made a decent 3d game, they have made two or three 2d games before that.

This is what I would do if I were you. First, I would make sure that I have a VERY GOOD understanding of C++. You should know about templates, inheritance, virtual functions, and all the other advanced C++ coding techniques. If you learn this first, then you will save alot of time later.

Then, you need to start focusing on creating some programming libraries. Just create anything you think you might need. Just be sure to make it complete, and as a template if necessary. THIS WILL SAVE YOU A TON OF TIME.

If you want, try to learn some data structures like dynamic arrays, vectors, linked lists, double linked lists, and trees. Even though STL provides these, it would be a good idea to make your own for both a learning experience, and to add some special features and interfaces not found in the STL. Knowing how to use these data structures will make programming ALOT easier.

Ok, after you have learned all of that, now you can move on to learning some specific programming trades. Since you have a large library of many of the things you will need, you can just inherit them into any API that you are using. Want to make a container for GDI... easy. Want to make a container for DirectDraw... easy. Want to make a container for Direct3d... easy.

After you have programmed all of the rendering routines for your API of choice, then you can pump out application after application. The question you should ask yourself when you program ANYTHING is, how can I make this so I can reuse it and save time?

As for scaling... DirectDraw can scale through its'' blitter. As for rotation and alphablending... name a game appropriate for a beginner where he would need to rotate and alphablend bitmaps.

Share this post


Link to post
Share on other sites
DirectDraw dead? Maybe. It all depends on what kind of project you want to do. To make a simple side scroller like contra or megaman I think DirectDraw is much easier to set up and work with than d3d or OpenGl. If however you are making something more along the lines of a FPS or anything that uses 3d geometry, then use a 3d API. Do you require alpha blending? rotation? fast scaling? If yes, then DirectDraw is not for your purposes. If no, then why not use DirectDraw? It is fast on even the older hardware which as mentioned above is a big consideration when making shareware/freeware games.

Share this post


Link to post
Share on other sites
For the people who say Direct Draw is dead, it just shows that you are confined to one genre in your thinking.

Going into the 3D realm in some genres serves little purpose. If your game is from a top-down perspective, what use is 3D? Even from the 3/4 perspective, a 3D look can be faked well with an isometric engine.


For some genres, yes, Direct Draw is dead. I would say that to niche market developers, DD is very alive.

Share this post


Link to post
Share on other sites
I have done both DirectDraw and Direct3D for 2D graphics and I like Direct3D. I say go with Direct3D. It will be easier to learn OpenGL''s 2D graphics if you start with D3D.

..That''s what I think.
-CROW

Share this post


Link to post
Share on other sites
thanks for the replies. im still debating what to do. I guess as of now i''m just going to follow through the book but still consider jumping to direct3d. anyone recommend a very good direct3d book for beginners? thanks

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Swatter555 and others:

The graphics API has nothing to do with a genre. Everybody say it with me: "The API is a way of talking to the hardware."

Unfortunately, some people can''t get over the fact that the symbols ''3'' and ''D'' are part of the name of the graphics API, so let''s step back and talk about OpenGL.

OpenGL (note the lack of both ''3'' and ''D'') rendering is primarily based on vertices and such, but it does have a set of straight 2D functions. Problem is, they are very rarely supported in hardware. So... anyone doing 2D in OpenGL did so with vertices and textures without ever lamenting the death of the 2D, blah blah blah. Big ol'' SGIs were built to draw vertices really fast, so that''s what you gave ''em.

Companies like nVidia and ATI have now managed to squeeze those big ol'' SGIs into a single card (mostly because they squeezed all of the SGI engineers into their teams) and now you would do best to talk to them in terms of vertices. DX8+ looks a lot like OpenGL.

Get over it people - a vertex does not equal 3D!!! Ask yourself, what is the best way to talk to the card. If it''s an older card, DirectDraw is probably the best way to talk to it. If not, go with DirectX Graphics (gasp - still no ''3'', even though there is a ''D''!!!) If anyone here had a girlfriend, they would know that sometimes you just have to say what they want to hear if you want to get some really good action.

And... DirectDraw won''t teach you much about ''concepts'' unless you are interested in talking to older boards. In fact, it can lead you astray. Take a look at both the Zen book and some book by Parberry (I forget the title). Both are examples where the author tries to use DX8 to do DirectDraw stuff and ends up with very slow code. Silliness!

To sum up:
1. Use the right tool for the right job
2. Think about things - don''t get caught up in one silly ''3''
3. Get a girlfriend.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
He is not dead. Cartoons rarely die. Characters in comics sometimes die, but they usually come back with way cooler powers.

His creator is dead, so maybe that''s what you heard.

quote:
Born 1910: William Hanna, animator, producer and director. A few of his characters: ... Quick Draw McGraw... Died 2001.


Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Anonymous Poster

I''m used to #include d3d.h and #include ddraw.h meaning 2 different APIs when programming. Some of us call them DirectDraw and Direct3D. There is a difference.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by Anonymous Poster
Some of us call them DirectDraw and Direct3D. There is a difference.


I think that''s what everyone calls them. What exactly was your point? I''m not trying to be a jerk, but I''m really not sure what you''re trying to say.

Share this post


Link to post
Share on other sites
I was speaking in terms of learning the API that would be useful for what he wants to do. And sure genre has everything to do with it. Why would you want to create a complicated 3D world in a top-down game? If you want a FPS, then using direct draw isnt the best way to go. I could care less about the 2D, 3D discussion; he was asking whether he should learn direct draw.

To come and post a semi-flame is immature.

And, once again, direct draw is not dead because it is used by a great many independent developers.

"To sum up:
1. Use the right tool for the right job"

thats exactly what I said. flame elsewhere plz




quote:
Original post by Anonymous Poster
Swatter555 and others:

The graphics API has nothing to do with a genre. Everybody say it with me: "The API is a way of talking to the hardware."

Unfortunately, some people can''t get over the fact that the symbols ''3'' and ''D'' are part of the name of the graphics API, so let''s step back and talk about OpenGL.

OpenGL (note the lack of both ''3'' and ''D'') rendering is primarily based on vertices and such, but it does have a set of straight 2D functions. Problem is, they are very rarely supported in hardware. So... anyone doing 2D in OpenGL did so with vertices and textures without ever lamenting the death of the 2D, blah blah blah. Big ol'' SGIs were built to draw vertices really fast, so that''s what you gave ''em.

Companies like nVidia and ATI have now managed to squeeze those big ol'' SGIs into a single card (mostly because they squeezed all of the SGI engineers into their teams) and now you would do best to talk to them in terms of vertices. DX8+ looks a lot like OpenGL.

Get over it people - a vertex does not equal 3D!!! Ask yourself, what is the best way to talk to the card. If it''s an older card, DirectDraw is probably the best way to talk to it. If not, go with DirectX Graphics (gasp - still no ''3'', even though there is a ''D''!!!) If anyone here had a girlfriend, they would know that sometimes you just have to say what they want to hear if you want to get some really good action.

And... DirectDraw won''t teach you much about ''concepts'' unless you are interested in talking to older boards. In fact, it can lead you astray. Take a look at both the Zen book and some book by Parberry (I forget the title). Both are examples where the author tries to use DX8 to do DirectDraw stuff and ends up with very slow code. Silliness!

To sum up:
1. Use the right tool for the right job
2. Think about things - don''t get caught up in one silly ''3''
3. Get a girlfriend.


Share this post


Link to post
Share on other sites
Why skip Algebra, Gemoetry, and Trig and jump right to Calculus? It''s the same by skipping Direct Draw. It is still a stepping stone. I mean, you don''t have to learn it, but it''s a lot easier to work with 2D graphics when learning to program and various design elements. They really don''t change much, and having to use 3D makes the learning curve only that much steeper. I recommend still learning Direct Draw. ... and I do believe that rotation is supported, in hardware only, though... it cannot be emulated via HEL. The generic path to Calc is usually the above, and it''s like that for a reason. There is a lot of stuff there you should know before diving into Calc, the same goes really for 3D programming. Why skip Direct Draw, doing so will cause you to be trying to learn too many things at once, and you won''t comprehend and absorb what you should be focusing on. But that''s just my opinion. It''s not going to kill you to learn Direct Draw, and it''s useful. In my opinion it was dropped from the more recent versions of DirectX, not because it was obsolete, more because, what more can you do with 2D that you can''t do already? There isn''t a whole lot more you can add.

Share this post


Link to post
Share on other sites