Jump to content

  • Log In with Google      Sign In   
  • Create Account

DirectX 7


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 Slayer-X   Members   -  Reputation: 122

Like
Likes
Like

Posted 04 November 1999 - 11:05 AM

Ok, I'm just starting to program in Windows and I've decided to use Direct X for a couple side scrolling games I'm going to make. I'm just wondering what Direct X has to offer, how easy it is to use (displaying PCX, BMP, etc....sprite, music, sound). And what are the updates from 6.1? That probably sounds stupid, but thanx if you answer.

Sponsor:

#2 Splat   Members   -  Reputation: 122

Like
Likes
Like

Posted 03 November 1999 - 02:11 PM

Overall, DirectX is a nice API to work with. You get very close to direct access to hardware, but without driver hassles. Easiness, however, is not a strong suit of DirectX's. COM is not too hard but a little cryptic (COM is the mechanism of getting the DirectX Interfaces). However, included with the DirectX SDK are some ok functions that will help you, for example, load bitmaps, among other things.

You will definately want a copy of the Documentation, which is VERY good (with a few notable exceptions). In fact, you can (as I did) learn 95% of what you need to know about DirectX just from Microsoft's documentation.

You just have to remember that DirectX is a relatively low-level API, because it has to meet the lowest common denominator - people who want blistering speed! So, to use "sprites" as an example, it supports transparent graphics operations, but it leave time deltas, frame calcuations, and state info to you.

- Splat


#3 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 03 November 1999 - 02:48 PM

Good, so it takes care of the main coding and basically all you have to do is make your own time calculations, sprite movers, etc. And you don't have to make the sound, drawing, etc. functions? I've been programming in DOS for about 2 years and I had to write all of those by hand or look at examples and modify them. You said DirectX wasn't easy, what is hard about it?

#4 Splat   Members   -  Reputation: 122

Like
Likes
Like

Posted 03 November 1999 - 04:19 PM

I will simply repeat a single word from my above post: cryptic. Maybe not for a DOS programmer, but the undocumented "features" of DirectX will have you running back to the message board for answers every so often. But no, you don't HAVE to write your own sound playing, drawing code, although alpha-blending (which DirectDraw does not support) is a great favorite of mine.

I guess to give you the base functionality of DirectX, I will give you examples:

DirectDraw - The base operation is the Blit() where you will copy a region of memory from one "surface" which you filled with a bitmap to a back buffer on the graphics card, then you will Flip() to make that back buffer visible, and repeat

DirectSound - Basically you fill sound "buffers" with sound data, and then Play() them to have DirectSound mix them into the output sound stream.

DirectInput - This gives you access to immediate input data (ie state of every key - up or down - state of mouse buttons - up or down - and change in mouse X, Y, Z coordinates) and/or buffered data, which is event-based (you have DirectInput fill an array of events then you get a chance to process them and optionally read in more)

That's the core functionality of DirectX, obviously leaving out Direct3D.

- Splat


#5 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 03 November 1999 - 05:09 PM

I must seem so stupid on here...lol. I'm really not as stupid as I seem on here, I just have a lot of questions before I start and screw up really bad. I'm downloading the directx 7 SDK right now...i have about half of the 122 megs done. Thanx for filling me in on how functional it is, I hated having to write the code to access the video card, sound card, etc. That was just insane. After I get the hang of it I will learn quickly. Thanx again.

#6 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 03 November 1999 - 05:14 PM

Oh, and I know the basic programming stuff (buffers, vsync, ai, blah blah...etc.). So you don't really have to explain those to me in any explaination you give of DirectX. Oh, and would it be possible to implement alpha blending in a side scroller...and if so how?

#7 Splat   Members   -  Reputation: 122

Like
Likes
Like

Posted 04 November 1999 - 10:27 AM

First off, no, you certainly don't sound stupid on here. I never did any real programming work in DOS, so I respect anyone who did.

Now, alpha blending: Microsoft has been promising Alpha Blending in DX for a while now, but it is still not there. What you will have to do is write your own blitting function. But it is possible, and not too hard. And it looks very nice, especially with full 8-bit alpha channels.

- Splat


#8 Slayer-X   Members   -  Reputation: 122

Like
Likes
Like

Posted 04 November 1999 - 11:05 AM

Only if I knew exactly what alpha blending was and how to do it..lol. Well, I'm about to start on my first Direct X windows game(I'm trying to get Visual Studio, and I'm downloading the directx 7 SDK). I'm making a space side scroller (kind of like R-Type...if anyone knows what that is). Thanx for the help, and I'm going to be needing it in the future too.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS