Which version of DirectX???

Started by
9 comments, last by Ganraeln 22 years, 3 months ago
Long post ahead, beware. I'm frustrated and FULL of questions. I have written a prototype of a hex-based board game in Visual Basic 6. I am preparing to update the graphics (which previously used bitblt functions and an image control for the map) to DirectX (the game already uses DX7 for multiplayer capabilities). I began to read the DX8 documentation, and noted that DirectDraw had been "combined" with Direct3D. However, I find nowhere in the DX8 Documentation where it discusses DirectDraw at all. What EXACTLY happened to it? All of the DirectDraw examples and tutorials that came with the SDK use the DX7 libraries (and are essentially the same ones that came with the DX7 SDK), did they just do away with DirectDraw's functionality? I started looking for information pertaining to writing isometric games in VB using DirectX 8, and am having a monster of a time figuring out whether I should switch to DX8 and use Direct3D, or go dig up the old DX7 documentation and stay with DirectDraw, or if I'm just completely clueless and someone can point me to where the DirectDraw functionality resides within DX8..... Something to consider while answering this is that I would like to zoom in and out on the map somehow. Am I better off keeping two sets of icons to work with, for large scale and small scale zoom levels? Or is it worth the extra time and effort to learn Direct3D, create 3D models of all the units and terrain, and create a smooth zooming ability (similar to what you can do in the first M.A.X.)? I also want to do scrolling, but that appears to be within the capabilities of both DirectDraw and Direct3D. What exactly do I gain from using Direct3D???? It seems like major overkill, compared to DirectDraw... If the DirectDraw functionality is still within DX8, where the heck do I start? When I was originally learning DirectDraw with DX7, the concepts where completely different that what Direct3D works with (as far as I could tell). Any suggestions would be very much appreciated. Horribly confused and scratching his head, Ganraeln Edited by - Ganraeln on January 2, 2002 5:30:40 PM
Advertisement
i think u should use Direct3D
(and that post was way to long, sorry, didn''t read the whole thing..)


-----------------------------
- Datatubbe
They didn''t accept me in the Tubby World!
------------------------------ DatatubbeThey didn't accept me in the Tubby World!
you need 3d models to do smooth zooming. just use texture billboarding (or point sprites) if using dx8. use dx7 if you want directdraw, and then you can write your own zoom effect. it is simple as that.

Pros of d3d 2d games:
1. free bilinear filtering
2. free rotation
3. almost free blending operations

Cons:
1. no per pixel direct access to video buffers (well efficently)
2. any sort of animation must be done either by changing the texture coordinates or by changing the texture (changing coordinates is more efficent). unlike the easy blit the correct part of a surface.
3. you NEED hardware d3d acceleration (most systems have at least a crappy 3d accelertor).


i suggest you do some research and look into using dx8 simply because doing rotation and zoom effects are slow in software. though dx7 probally will get you going faster since its just using blit functions.
Forget the Evil Empire''s implementation and go with OpenGL. I''m doing a 2D RTS with it and it works wonderfully. My goal is something alongs the lines of War II, or Age of Empires, but with 3D terrain (like Myth I/II but with a fixed point camera).

Scrolling and zooming are both trivial, and I''m still working with 2D artwork for the units and buildings (no 3D models!). I simply draw all my 2D artwork over the 3D terrain. The camera can only scroll around and zoom in or out. No rotating.

For an example of what I''ve got going so far, check out some screenshots and/or download a demo at:

http://www.knology.net/~heaven

Go with OpenGL! Down with the Evil Empire! Rah rah rah.

If you have any questions give me a email.

Care,

Chris
Florida, USA

Florida, USA
Current Project
Jesus is LORD!
You can always use DirectX 7 with the DX8 SDK

All of DX7 is still in there

There''s some documentation on it but basically you
#define DIRECTX_VERSION 0x0700

before including any DirectX header and you get version 7

So you can still access DirectX7 with DX8

However, I think the point of using the 3D API is to make use of hardware acceleration even for 2D drawing

There is an article here on Gamedev.net somewhere about using 3D for tileing look it up in the Articles & Resources section for some info on how to approach this kind of task

Guys, I appreciate all of your opinions. I might point out a few things, however.

Keep in mind that I'm not writing a real time game. I can certainly understand serious consideration for 3D programming if I was, but I'm not. The stuff I am doing now (and will always do in the future) is strictly turn-based stuff (did Civ3 use OpenGL or Direct3D?).

I'm looking for the shortest path to my goal, especially since I'm a lone wolf. I want the game to look nice, but have no expectations whatsoever of selling it and making a profit. This is a labor of love for me. And I love turn-based games.

I have no need to go cross-platform, so OpenGL is out of the question for me (unless you can convince me it's easier to learn than DirectDraw). Also consider that I have already used DX7 for DirectPlay, so I'm somewhat familiar with DirectX, just not the graphical portion of it. Can I even use OpenGL if I'm programming in VB?

If the ONLY reason to move to Direct3D (or OpenGL) is smooth zooming, then I'll stick with DirectDraw. Can anyone give me any other good reasons to suck it up and learn Direct3D (that are truly applicable to what I am trying to accomplish)?

I really like that OpenGL engine you've done, was it alot easier to work with OpenGL than DirectDraw, Heaven?

Thanks again, all!

-Ganraeln

Edited by - Ganraeln on January 4, 2002 1:54:30 PM

Edited by - Ganraeln on January 4, 2002 2:01:01 PM
i can''t tell you about how hard it is to zoom in DirectDraw because i haven''t tried it yet.
but just to respond to your statement that Turn-Based games don''t use 3d - i think Fallout:Tactics did use 3D but for the characters only.
there''s no map zooming or whatever, nor is there map rotating, but they wanted the units to be able to smoothly switch from standing to crouching to proning(crawling?), as well as be able to rotate the direction they''re facing.
they of course used it to walk the units and i think a major contribution was all the magnificent death animations, which include blood spills according to how the ground is on the dying spot and the direction of death; various organs missing such as legs or even heads torn off and bodies which are simply separated from the limbs by so much as a (game) yard.
they didn''t show every cut and bleed-hole for obvious reasons, but just the way a character would move when being shot at (demonstrated also in auto-fire, meaning 3 or so bullets going through the body rapidly), was worth it for them.

all this came at the expense of things like "accurate burst fire" meaning when you shoot forward you don''t hit people standing next to you, but that''s another story on how interplay starved the poor 14* east programmers and bribed the QA team

//Demiurge
Make something idiot proof, and someone will make a better idiot..
//DemiurgeMake something idiot proof, and someone will make a better idiot..
Ganraeln wrote:
I really like that OpenGL engine you''ve done, ...

Thanks! I can''t wait until I get to the part where little troopers walk around!

Ganraeln wrote: ... was it alot easier to work with OpenGL than DirectDraw, Heaven?

From what I remember, it seems easier. It feels more "encapsulated", once you get past setting up the windows specific code. Unfortunately I can''t remember enough to give you specifics.

I don''t know anything about VB. Sorry! Be a man and move to a real language...C++!

DX and OGL are like so many other things in life, and depend on the individual''s preference. Some people will more easily adapt to OpenGL''s format, and others to DirectX''s.

For a simple taste of OGL, just go to NeHe''s site:

http://nehe.gamedev.net

Check out the basic tutorials.

Now go to:

http://nexe.gamedev.net

Check out the basic tutorials.

I don''t know about you, but I find the OGL code much easier to grasp. It certainly feels more intuitive. (I just got thru looking at NeXe''s "draw a triangle" tutorial and am still gagging - not at the style of writing, but at the actual code required compared to OGL).

You know I remember Carmack of id Software commenting on D3D versus OGL once upon a time. He was very critical of D3D.

I did a quick search and found this link:

http://www.bluesnews.com/archives/carmack122396.html

Now granted, that was five years ago, and Direct3D has evolved much since then. But my point is still valid: OpenGL seems a heck of a lot easier to "get up and running" than D3D. Same thing with DirectDraw. It seems more technical than OGL.

Of course, even with my OpenGL renderer I''m going to be using DirectSound and probably DirectPlay, so I''m still at the mercy of the Evil Empire. *sigh*


Care,

Chris
Florida, USA
Florida, USA
Current Project
Jesus is LORD!
You actually have a third option. Combine DirectDraw7 and Direct3D7. You can use DirectDraw as normal but just use Direct3D for alpha blending and rotation. It''s pretty simple once you set it up.

Here''s a very good article on how to do so.

- Kaijin
You guys seem to get off topic sooo quick...

Anyway, plain and simple, I''ll answer what was asked:

DirectDraw exists in DirectX 8 only as a backward compatibility feature. It''s not probable that they will remove it anytime soon, because there''s already a ton of games out there that uses it.

The idea behind this is to use hardware acceleration found on all modern 3D cards. So, you use Direct3D to draw 2D games. It''s not that hard, and if you ask me, I find it to be even easier. Plus, you get all those rotation, zooming, fog, lightning and blending features and etc.

You do not have to use 3D models for that. In fact, depending on your game, you don''t even need to care about the Z coordinate at all.

Take a look at www.gamasutra.com , I remember they have an article that covers exactly your question. It''s not too detailed, but gives some good pointers.

Gaiomard Dragon
-===(UDIC)===-
Gaiomard Dragon-===(UDIC)===-

This topic is closed to new replies.

Advertisement