Why are so many people using DirectDraw?

Started by
26 comments, last by CrazedGenius 22 years, 10 months ago
Quite frankly, the only good reason i can think of not using 3d for 2d, is that you are used to usual 2d technics and don''t want to make the effort to learn 3d.

I am currently working on a 2d space shooter. The more i advance, the more happy i am with my choice of using OpenGL instead of DDraw. I can''t really speak of D3D but well..

- the 3d rendering code is amazingly small (around 200 lines, grouped in a single renderer class), a lot smaller than what would have been needed if using DDraw. All the other classes are independant of the API.

- you get free rotations, translations, scaling, but also alpha-blending or transformations (for animations). I can''t understand how some of you guys are not more interested in these effects! Have you tried doing alpha-blending in DirectDraw? That''s horribly slow!

- the speed issue: i don''t have a very fast computer (P200 + Vaudoo2), but let me tell you that using hardware acceleration is *a lot* faster than 2d. Can''t say for fast machines though. Maybe hardware dependant.

Y.
Advertisement
For those of you looking for a dx8 tutorial:
http://www.flipcode.com/tutorials/tut_dx82d.shtml
The flipcode tutorial is decent, but it concentrates more in 2D geometry (lines, etc.) and less on the D3D equivalent to a "blit", which is really the point of contention here...
Author, "Real Time Rendering Tricks and Techniques in DirectX", "Focus on Curves and Surfaces", A third book on advanced lighting and materials
Simply Because:

1. 2D sprites (3D prerendered ones) LOOK SO MUCH BETTER then 3D realtime rendered images esp IF u are talking about many units (100+ or so) like in a RTS or a RPG... even a sidescroller is/looks better in 2D

I agreee FPS is allways better in 3D because this type of game
generated the 3D movement after all. Also fly simulators (plane etc) are better in 3D (can not even think to do them in 2D)

Many super succes games are 2D: Starcraft/Broodwar, Age of Empires, Comand & Conquer, Comandos, Desperados,Baldurs Gate,Diablo1/2 etc

GFX on this games is briliant and seameless...as opposed to 3D games where (most of them) show seams and pixelate like images when zoomed/looked closer.

Usually 2D games have nuch powerfull AI compared to their 3D counterparts.

2D code is ussually much easy to convert to other OS (linux) using simple framebuffers ...of course unless u are using OpenGL but this war (D3D vs OpenGL) is another issue


2. Not all games require 3D, this is a today "mode" because of hardware sales etc...but there are a lot of games that are better in 2D like: teris(c), arkanoid(c) etc

Not to forget the problems of navigateing a 3D world ...this can ruin a RTS game dynamics . RTS is a big part of the game industry and IMHO is not good to move it to 3D.

Thats why me an my team are doing a RTS in 2D using DirectDraw, and very little (up to none 3D acceleration)

Forceing games into 3D is not allways a good thing...its only good for advertise and hardware sales I belive BOTH 2D and 3D can make very FUNNY and PLEASNT games if they are given the chance and if programmers/artists/designers etc do thei job ok.

I belive it is a bad thing 2D is not better supported by DX8 and today video cards...then there whould be not so many questions about :

-Why the hell my super 3D card CAN NOT do a SIMPLE 2D Alpha Blending? (actually all 3D card are 2D accelerators... because they fill 2D triangles, minus the ones that do just some little T&L)

Answer is: because THEY dont want u you to!
(but the video board can do it actually)

Also i find it stupid that 3D cards use and enforce a single algorithm for 3D render: scanline triangle fill variations

Raytraceing and eventually some backface culling should be also supported ... or at least developed by software until they become more popular/evolved...

but NO THEY will not let you use 2D at full speed (u need that for testing new algorithms)






Edited by - bogdanontanu on June 15, 2001 7:34:46 PM

Edited by - bogdanontanu on June 15, 2001 7:40:47 PM
obysoft
> even a sidescroller is/looks better in 2D

What the hell? Why would 3d rendered images look any less good than 2d ? Assuming no streching is applied, you''ll get the exact same quality. I don''t hear a lot of pple saying Diablo2 or BG2 look like crap, yet they use the 3d accelerator.

> I agreee FPS is allways better in 3d

Are you talking of the kind of view, or the technic used to display the sprites? I thought we were talking of the second one...

> Thats why me an my team are doing a RTS in 2D using DirectDraw, and very little (up to none 3D acceleration). Forceing games into 3D is not allways a good thing...its only good for advertise and
hardware sales.

.. or you can use hardware for special effects. There is a thread on another board of a guy trying to improve his Ddraw alpha-blending function. Blending the whole screen he''s getting 1 fps. Make your life easier! Use 3d, and have the pleasure to see your program run at 150 fps!

> Why the hell my super 3D card CAN NOT do a SIMPLE 2D Alpha Blending? Answer is: because THEY dont want u you to!

What sort of answer is that? Even 4 or 5 years old cards such as a Vaudoo can do many alpha blending functions at light speed (compared to software).

> actually all 3D card are 2D accelerators.

Agreed, so what''s the point of developping your own software routines?

To me, unless you are doing something extremely specific, this is as programming a software 3d engine only, while everything can be hardware 3d accelerated.

> Also i find it stupid that 3D cards use and enforce a single algorithm for 3D render: scanline triangle fill variations

Well, you are right. If you want to write a raytracer, it''ll be faster with your own functions, but this is an extreme case. I couldn''t think of any commercial 2d game (you mentionned a few ones) that wouldn''t benefit from hardware acceleration.

Y.
Uh, actually, in Baldur''s Gate 2, 3d acceleration is optional, and it is only used for shadows, transparency, and spell effects.

Games which use DirectDraw can be made to look very good. So can games which use Direct3d. In other words, who cares which one you use?

I think this is even lamer than the DirectX vs. OpenGL threads...

~~~~~~~~~~
Martee
http://www.csc.uvic.ca/~mdill
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
quote:Original post by CrazedGenius

As well as the hardware issue, it seems like a bad time to be learning the DX7 stuff that is gone from the API.

Keep in mind, MS didn''t remove DDraw from DX8 because they are evil, they did it because the hardware is tuned for 3D and you should learn how to use it.



Actually the 2D functionality of DirectDraw will return in DX9, albeit under a different name, in an attempt to yet again unify the logical architecture of the graphics components.

Another good reason to use DirectDraw is if you are just learning the fundamentals of graphics programming. Do not take for granted that everyone knows how to do manually write a blitter, and/or how to use a blitter to develop a 2D engine. Using D3D may be a bit much for beginners (and some intermediates as well), as it is another level higher of abstraction of the hardware. In my opinion, too many people are jumping right into D3D, bypassing some very important fundamentals.
It really doesn''t matter!

What is a 3D-card anyway?

unless you don''t have a T&L card
it is just a triangle-drawer with
special effects such as z buffering
alpha blending bi-li-filtering.
So why don''t use it for rendering
2d images?

of course it should always be optional.

I think this is just an ideological
old-school v. new-school question!

What do you think?

--::[Madhed]::-

This topic is closed to new replies.

Advertisement