Is DirectX the technology Microsoft use in their games?

Georgen

Active member
Joined
Jan 22, 2005
Messages
34
Hi... I remember when I bought Age of Empires 1 a long time ago, didnt know anything about programming or so...

I remember the popup window saying that the game needed DirectX... My question, perhaps silly, is: Is DirectX technology used in todays top-selling games? Should I learn it? How hard will it get If I just know some basic GDI?

... and finally, can I use DirectX (If I knew it) to make cool windows effects?

:confused: :p
 
Is DirectX technology used in todays top-selling games?
Yes, See Half Life 2
Should I learn it?
Yes.
How hard will it get If I just know some basic GDI?
Hard, but check the tutors corner for some of my tutorials, I try to make the "Excruciating process of learning directX" as easy as possible.

Some games are programmed in OpenGL (Doom 3 for example) and some are programmed in DirectX (Half Life 2), and it its very obvious what all microsoft games are programmed in (there might be some exceptions, Im not 100% sure).

... and finally, can I use DirectX (If I knew it) to make cool windows effects?
Maybe, but cant you do that anyways? Youre talking about NonRectangular windows right? You dont need DirectX.

So head on over to the tutors corner :D.

-The Pentium Guy
 
okee.. :D

So knowing some GDI wont help much, is that because DirectX is totally different graphic programming architecture? ... Ill sure check your tuts out..

..and about the last thing on windows cool effects I PArtially meant non-rectangular windows, I also meant special effects like smoothy borders, fog effects, opening and closing animations... like programming a powerpoint animation... so what do you say?

Note: Tell me if this Idea has already been used... That I just said about powerpoint.. Imagine an Vb AddOn to make speciall effects and animations to windows (all-classes) with and easy to use, powerpoint or (anything else) style? :p
 
Yeah DirectX is very different.

..and about the last thing on windows cool effects I PArtially meant non-rectangular windows, I also meant special effects like smoothy borders, fog effects, opening and closing animations... like programming a powerpoint animation... so what do you say?
Well, Im not sure about fog effects and opening/closing animations (I dont even know what that is) - but you can do smooth borders, it has something to do with transparency... I gotta look this up.

Yeah its possible to make an addon, if you tried hard enough. Again it has somethin to do with transparency, and you might need several bitmaps to achaive these effects. I havent used powerpoint in a long time - what effects do you mean? I mean for example, you can make the borders of the form "animate" like a wave or something:
From:
/\/\/\/\

\/\/\/\/
To:
\/\/\/\/

/\/\/\/\
and back and forth. Youd just need several bitmaps .... but then again I did this a while ago, so I dont remember how to do this (If only I could find that project....).

-The Pentium Guy
 
Well thanks for that... by the way how come you dont know what Im talking about? When I say effects I mean all imaginable types of effects. For example, when using the OFFICE assitant it will (if set to) play an animation when getting closed or opened; and thats why I imagine would be great to do with Windows. Furthermore, the creation of an AddOn that (resembles powerpoint) allows the programmer add this animations, customize his/her owns, and so on. (Tell me, is that a taken Idea or it is original)

Note: Is you find that project and feel like sharing Id appreciate that you post it here for the common use of every1. ThankS! :D
 
Well thanks anyway... Ill check that MsAgent out because Ive heard of it in the past but never thought it had something to do with my post... thanks PentiumGuy!!!
:D
 
Smooth borders can be accomplished with GDI+; just blit a bitmap that has a checkerboard pattern of transparent/opaque pixels along the border. Wavy borders can be accomplished with a similar method; just use different patterns of transparency along the borders and cycle through.

I think you could use a similar method for fog effects; probably much cheaper drawing-wise than using a particle system.
 
Where can I find the official documentation for GDI+?

MSDN, I guess. Can I download that from Microsoft site? Sorry Ive never done that so I just dont know.
 
Georgen said:
Where can I find the official documentation for GDI+?

MSDN, I guess. Can I download that from Microsoft site? Sorry Ive never done that so I just dont know.

If you didnt install the documentation with the SDK then, yeah, you can find it online at MSDN. You pretty much just need to use the DrawImage method on your forms graphics object.

A quick demo of GDI+:
Go to your forms Paint event and insert the following:
Code:
Dim myGraphics As Graphics = e.Graphics
myGraphics.DrawLine(Pens.Red, 0, 0, Me.Width, Me.Height)
I would have used the DrawImage method in my example except that it involves declaring an image object and loading an image (both extremely simple, but would have increased the scope of the example).
 
Direct X Coooool.....

Actually Im with you, I wanna learn direct x, but so far as i know it can help create graphical enhanced GDIs, but if you want to make your forms with its great graphical presentation.... Then, I suggest that you use the Skinbuilder.... No need of direct x programming........
 
Georgen said:
okee.. :D

So knowing some GDI wont help much, is that because DirectX is totally different graphic programming architecture? (...)

I learn GDI+ 1 month ago and I found it to be EXTREMELY easy to use. (started to learn it at 25-04-2005, 1 weak later I had the graphical engine of my program ready) Yet, It truly helped me to understand the concepts of displaying graphics on screen and how graphical frames work. This acknowledge made my life much easier when I moved to DirectX (still moving in btw).

I dont know whats your goal nor what are you planning to code but I can tell you this, GDI+ can get truly slow!

For you to get an ideia...
Am building an RPG maker program which allow users to create their own RPG tiled games. This project allows the user to add images from 32x32 up to 256x256 pixels with 3 graphical layers. The base tile size is 32x32 pixels. With a 1024x768 screen the editor will show about 20x20 tiles that is 400 images. And, since it can have 3 layers, the games engine must be able to compute 1200 tiles, each one having an 32x32 or 256x256 images (of course that 256x256 images will cover 64 tiles at the time but you can mix them with the other graphical layers with transparency to create non-repetitive grafical environments).

Using GDI+ the engine would noticeably start to slow down and getting low FPSs when using about 15 256x256 transparent/non-transparent images, specialy when combining the 2 layers (I had only 2 graphical layers when my program had GDI+ precessing the graphics). Yet, when having more then 20 256x256 images I would get something like 3 frames per second when scrolling the map... (OUCH)

Using DirectX, well, I tryed few images (about 200) of 256x256 images, and, for my breahtaking relief I would scroll the map even faster then GDI+ with no images at all!

Cheers!
 
Last edited by a moderator:
Back
Top