views:

91

answers:

3

I got the book "Programming Role Playing Games with DirectX 2nd edition" and I notice there are things in the book that are now considered deprecated. There is a whole Section on DirectPlay. And as much as I would like to avoid this section, I am afraid it might screw up the entire engine he is trying to build.

So I was just curious to know even though DirectPlay is considered deprecated by XNA, and directX10. Is it possible to use it still in DirectX 9 ??

+4  A: 

Sure you can use it. You can write your entire game in DirectX 3 if you want. DirectX 9 includes ALL previous releases. The only issue you will have is finding the headers.

TBH, though, you'd be best off ditching it and learning sockets programming instead. Sockets will NEVER go away. They aren't particularly difficult either.

At least you wont be learning an unsupported, no-longer documented API.

Its also worth noting that there was a reason nobody used Direct Play in the first place ;)

Goz
thanks for the info. Just curious, Is the headers not availible ??? What would I have to do to retrieve these headers
numerical25
Microsoft don't provide the header or library files anymore. Hunt around on the net and im sure you'll find the headers. I would still say its not worth wasting your time on a dead API, however.
Goz
A: 

DirectPlay is considered deprecated long before DirectX10. Direct3D was the only meaningful construct in DX9 for the vast majority of people. DX10 offers more, like with D2D.

You should check out Introduction to Game Programming in DirectX9:A Shader Approach by Frank Luna. That's a 9.0c book (and doesn't use any old features) and there's D3D10 as well.

DeadMG
"Direct3D was the only meaningful construct" DirectSound, DirectMusic, DirectInput, DirectShow. I also found DirectXFile very useful.
SigTerm
None of those have been actively supported since about DirectX 8. The WinAPI easily replaces DirectInput unless you want a twenty-button force-feedback joystick support, sound engines like FMOD have handily trumped DirectSound/Music, etc. Just check their MSDN pages- they all say deprecated.
DeadMG
I actually do have those books. I am actually looking for a book that more focuses on constructing a engine where LUNA does most of his work in samples of code.
numerical25
A: 

You can use it in DX9, but you will probably have to set it up to use the same DX version as the the book is using rather than the interfaces in DX9. (There is a #define for this somewhere, hopefully described in your book.) I agree with the other poster about learning sockets, but you can do that after you finish the game in the book.

Kylotan