Sign in to follow this  

Programming a Multiplayer FPS in DirectX 11

This topic is 417 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I recently started modifying the already quite old “Programming a Multiplayer FPS in DirectX” of Vaughan Young while reading my way through the book. The book dates from 2004 and uses a lot of obsolete APIs of the DirectX 9.0 framework such as D3DX9, DirectInput, DirectPlay and DirectMusic.

 

In order to include all the right header and libraries these days, one can download and install the “DirectX 9.0 SDK (October 2004)”. Instead, I originally wanted to avoid this older version and just use what is available in the Windows kits.

 

Dinput.h is still available and I prefer this one over Xinput.h. Furthermore, I use DIrectXMath.h with its XMVECTOR/XMFLOAT3/XMFLOAT4 as a replacement for the D3DXVECTOR3/ D3DCOLOR stuff of D3D9X.h and use D3D11.h with its D3D11_INPUT_ELEMET_DESC as a replacement for the Flexible Vertex Format Constants. As a programmer with no prior experience with DirectX at all, so far I seem to have managed working myself through the book.

 

But now I am at the rendering/sound/network part which heavily relies on D3DX9.h, Dmusici.h and Dplay8.h. Especially for the last two APIs, there does not seem to be comparable alternatives at a same abstraction level if I am correct? In which case it is probably the best to stick to DirectX 9.0? I have a background in graphics, so I definitely want to make the graphics part working and thus dig myself through the new Direct3D features. For the sound and network part, I rather want to implement something that does the job and is fully understandable without starting to learn two complete different APIs (i.e. obsolete and new one).

 

My initial purpose was to program a complete game engine + game that uses this engine to have some touch with all the practical aspects. From then on, I probably only want to change the scripting and rendering part.

 

Any suggestions would be valuable.

Edited by matt77hias

Share this post


Link to post
Share on other sites

I am not sure what Dplay8 is, but if you're looking for networking, you are correct. You'll need to use an outside library to set something up as it's been mostly discontinued.

You could try looking in the DXTK, but I'm not sure if it actually includes a utility library for that.

For music, there should be something for you in the DXTK.

Share this post


Link to post
Share on other sites

I am not sure what Dplay8 is, but if you're looking for networking, you are correct. You'll need to use an outside library to set something up as it's been mostly discontinued.

You could try looking in the DXTK, but I'm not sure if it actually includes a utility library for that.

For music, there should be something for you in the DXTK.

 

Dplay8.h is for accessing the DirectPlay API

 

For audio there are XAudio2 (DirectSound replacer?) and XACT3 (DirectMusic replacer?) as supported DirectX components.

Edited by matt77hias

Share this post


Link to post
Share on other sites
For audio I would recommand FMOD, very flexible and easy to use with a lot of nice features.

I'm not sure why Directplay is in there. If we know what it's providing you, I'm sure we'll find a good alternative for that too.

Share this post


Link to post
Share on other sites

For audio I would recommand FMOD, very flexible and easy to use with a lot of nice features.

I'm not sure why Directplay is in there. If we know what it's providing you, I'm sure we'll find a good alternative for that too.

 

While taking a quick look at the member variables of the network related classes, I see some DirectPlay stuff:

IDirectPlay8Peer *m_dpp;       // DirectPlay peer interface.
IDirectPlay8Address *m_device; // DirectPlay device address.
DPNID m_dpnidLocal;            // DirectPlay ID of the local player.
DPNID m_dpnidHost;             // DirectPlay ID of the host player.

Share this post


Link to post
Share on other sites

This topic is 417 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this