Microsoft DirectPlay

Posted April 11, 2002

Chat Date: April 3, 2002

Chat Participants:

  • Robert Di Benedetto, Program Manager
  • Brett Humphrey, Test Lead
  • Mark Kenworthy, Group Program Manager
  • Michael Narayan, Development Lead
  • Philip Taylor, Program Manager

MSDN_Erica
Welcome to today's MSDN Chat. Our topic is Microsoft DirectPlay. Questions, comments and suggestions are welcome.

MSDN_Erica
I'll let the hosts introduce themselves:

Robert-DirectPlay_MS
Hello everyone and thank you for coming today. I'm the program manager of DirectPlay and we have key representatives of the DirectPlay team present from both the development team and the test team. We are also fortunate to have the group program manager

DX_Mark_MS
Hi! I'm Mark Kenworthy, the Group Program Manager for Windows Gaming (DirectX, etc.).

Michael_DirectPlayMS
Hi, I'm Michael Narayan, the development lead for DirectPlay

Brett_DirectPlay_MS
Hello I am Brett Humphre the DirectPlay Test Lead.

MSDN_Erica
Fire away with your questions!

MSDN_Erica
The hosts are working on their answers. Thanks for your patience.

Michael_DirectPlayMS
Q: RobertSwan: I am looking for a workaround for an incorrect state left by IDirectPlay8Peer, involving the host leaving while a new client connects. The new client is not aware the host has left.

Michael_DirectPlayMS
Q: RobertSwan: ::EnumPlayersAndGroups could work but involves searching to find who the new host is when using HOST_MIGRATE.

Michael_DirectPlayMS
A: RobertSwan: What kind of behavior are you observing? Does the new client receive a CONNECT_COMPLETE indication? They should see a CREATE_PLAYER followed by a DESTROY_PLAYER notification and then a HOST_MIGRATE

Michael_DirectPlayMS
A: RobertSwan: Sorry, I just need a bit of clarification. Two players are already in the session when a third is joining. Is that correct?

PhilT[MS]
Let me introduce myself, I am Phil Taylor and am the PM for Managed DirectX so I will take the Managed questions.

Michael_DirectPlayMS
RobertSwan: I'm looking at your question right now

PhilT[MS]
Q: Is there a managed layer?

PhilT[MS]
A: Absolutely. I have posted on Usenet several times on this. Managed DirectX is a wrapper layer to enable any .NET language to use DirectX APIs

Michael_DirectPlayMS
A: RobertSwan: Are you getting two DESTROY_PLAYER messages after the host leaves?

Michael_DirectPlayMS
Q: RobertSwan: the new client receives two CREATE_PLAYER followed by a CONNECT_COMPLETE with hresultcode S_OK - no MIGRATE HOST and/or DESTROY_PLAYER

PhilT[MS]
Q: Is the Managed Team finding the conversion to Managed difficult?

PhilT[MS]
A: No, not really. We have learned a bit about using .NET ourselves, primarily from a performance standpoint. And have made some changes in the layer to be more in the "flavor" of .NET.

PhilT[MS]
Q: Managed conversion, part II

PhilT[MS]
A: but that's about it really, its been rather pleasing that there has been so little fuss.

Jon_SDK_MS
Q: Is the conversion to .NET difficult?

Jon_SDK_MS
A: In addition to what Phil said, we've found that DirectPlay is particularly well-suited to .NET due to the native event model. Using delegates to handle the DirectPlay messages results in cleaner code than c++.

Michael_DirectPlayMS
Q: If the host leaves while a client is connecting, what should happen on the client?

PhilT[MS]
**Q:**How much of DirectX is exposed in the Managed layer?

PhilT[MS]
A: All of DirectX graphics, all of DInput, all of DPlay, all of DSound, Dmusic except for tool and authoring support, and simple playback for DShow. Do note I have posted on this on Usenet.

Michael_DirectPlayMS
A: Based on when the host drops, the client should receive either CONNECT_COMPLETE with a failure or HOST_MIGRATE. Any CREATE_PLAYER messages for the host *should* be matched with DESTROY_PLAYER.

Michael_DirectPlayMS
Robert+Jamie: I'll need to investigate why you aren't seeing this behavior

Michael_DirectPlayMS
Robert+Jamie: Would you be willing to send us code snippets w/ instructions?

Michael_DirectPlayMS
Robert+Jamie: Please send it to DirectX@microsoft.com. I'll take a look at the newsgroup posting but it's best if you can send it to us directly.

Michael_DirectPlayMS
RobertSwan and JamieBriant: Are you guys working together or should I expect two e-mails?

Michael_DirectPlayMS
Robert+Jamie: Great! I'll take a look at it.

Robert-DirectPlay_MS
Q: Can you give us an idea of some of the new features to expect in DirectPlay?

Robert-DirectPlay_MS
A: For DirectPlay 9 we're planning a single threading model option (to be more like console development), packet coalescence, Bluetooth service Provider and a data item that you can use to assist with time synchronization.

Brett_DirectPlay_MS
What type of games are you building or planning on building with DirectPlay?

DX_Mark_MS
What new features would you like to see in a future version of DirectPlay?

Jon_SDK_MS
Is there anything you love or hate about the current samples or documentation? Is there something you'd like covered in a new sample?

DX_Mark_MS
Or, if not features, how could we change DirectPlay to be more useful to you?

Michael_DirectPlayMS
Q: How can you enumerate games while hosting?

Michael_DirectPlayMS
A: You can create a second DirectPlay8 interface and perform the enumeration from it

Robert-DirectPlay_MS
A: adamhill (DX_Mark_MS) Definitely good BLuetooth support, piconet gaming will only get more popular with 400MHz Xscales and 3D PDA gfx.

Robert-DirectPlay_MS
A: Yes - we believe Bluetooth will provide a compelling game experience in the near future and are very excited about it.

Michael_DirectPlayMS
adamhill: I presented a session, "DirectPlay8: Tips and Techniques" at the 2002 Game Developers Conference in San Jose. It included many do's and don'ts. The slide deck should be posted on MSDN soon, I believe.

Michael_DirectPlayMS
RobertSwan: Great! Thanks.

Michael_DirectPlayMS
JamieBriant: I'm thinking about your problem...

Jon_SDK_MS
Adamhill: We're also planning on integrating Michael's GDC tips into all the current samples, hopefully to phase out those bad techniques amongst new developers.

Robert-DirectPlay_MS
RobertSwan - we have received your source now and will begin examining it...

DX_Beta_MS
Adam: You can submit an application for the beta at https://www.betaplace.com. Use the UserID: DirectXDev and Password: DX9Beta

Michael_DirectPlayMS
JamieBryant: Your problem about only launching one game between a set of clients will require a bit of work. I don't think I have enough time or space here to go into details. Perhaps we can take this offline (newsgroups or e-mail).

Jon_SDK_MS
Q: Have you considered adding some simple console-based tutorials?

Jon_SDK_MS
A: The DirectX 8.1 SDK includes a full set of DirectPlay console tutorials; however, we've converted the tutorials to very simple window applications in DirectX 9 to support the PocketPC platform.

Michael_DirectPlayMS
Q: How does DirectPlay8 like multiple IDirectPlay8Peer interfaces running at the same time?

Michael_DirectPlayMS
A: This scenario works fine. You can have one interface in the game session, and another connected to a global "chat" or other service.

Robert-DirectPlay_MS
Q: dhopton_MVP Are you lot any good at Deathmatch?

Robert-DirectPlay_MS
A: We ARE deathmatch!

DX_Mark_MS
Q: dhopton_MVP: What is it like working on the directx team at microsoft? Do you get to see all the latest and greatest games early?

DX_Mark_MS
A: Depends on which team you work on. Our team that focuses on application compatibility gets on a lot of betas. Other teams see things that are specific to their technology, usually when there is an issue that we need to help the developer resolve.

Michael_DirectPlayMS
Q: Is the ability to get BPS broken in DirectX8.1?

Michael_DirectPlayMS
A: No. In fact, the values returned in 8.1 are more accurate than in 8.0.

Robert-DirectPlay_MS
Q: JamieBriant : Do you guys do the xbox stuff too?

Robert-DirectPlay_MS
A: The XBox team's technology is based on DirectX but they have their own team that builds on that technology for their specific platform.

Michael_DirectPlayMS
JamieBriant: What do you want to know about groups? Based on your application they may or may not be valuable. I'll need more information. Perhaps this is also better handled offline.

PhilT[MS]
Q: how will the Managed DirectX layer perform?

PhilT[MS]
A: our target goal for performance is 98%+ of the core bits.

DX_Mark_MS
Q: Serflaten: With the advent of XBOX that may very well be more suited to game play, where do you see the future of game programming heading toward? Will they stay on the PC, or tend toward mobile devices, or where else?

DX_Mark_MS
A: While there are games that do well on the PC and console platforms, there are also games that are better suited for the PC environment, with a keyboard and mouse, etc. So, we believe PC gaming will remain important.

Robert-DirectPlay_MS
Q: ranga : is there a sample directplay game that comes with the sdk ?

Robert-DirectPlay_MS
A: There is a maze sample that makes use of DirectPlay in depth and would be a good sample to study.

DX_Mark_MS
A: And mobile devices provide a new platform, with content that is likely to be different than that found on PCs or consoles.

PhilT[MS]
Q: does .NETin general and C#/.NET support DirectX?

PhilT[MS]
A: Not by default. The best way to get DirectX support in the .NET world is to use the Managed layer in DirectX 9.0. Again, this has been posted on extensively in the Usenet groups.

Michael_DirectPlayMS
Q: Re BPS - How is BPS Calculated?

Michael_DirectPlayMS
A: It is actual number of bytes transferred on the wire.

MSDN_Erica
We are going to have to wrap up this chat in a few minutes. If you asked a question a long time ago and it wasn't answered, please re-post now. We will get to as many as we possibly can.

Michael_DirectPlayMS
JoeShmoe: What do you want to know about coalescence?

PhilT[MS]
Q: does XBox use DirectX? XBox started with DirectX 8.0 and W2K and made modifications appropriate for their platform and goals.

PhilT[MS]
Q: what OS does XBox use?

PhilT[MS]
A: in case it wasn't clear from the previous answer, XBox uses a custom OS based on the W2K kernel.

Robert-DirectPlay_MS
Q: ranga : what is the best language to use directplay - in terms of performance and footprint ?

Robert-DirectPlay_MS
A: Currently, your best choice would be C++. After DirectPlay 9 ships, you should see similar benefits from C# as well.

Michael_DirectPlayMS
Q: Can you change the time-out parameters to detect a dropped link faster?

Michael_DirectPlayMS
A: Not currently. We're looking at exposing this parameter in future releases.

Robert-DirectPlay_MS
Q: Dr_FunFrock : Comment: I am using DirecPlay for a Video Conferencing Application. It works great thanks for an awesome API.

Robert-DirectPlay_MS
A: Thank you! We believe that DirectPlay is a great API that can be used in all sorts of applications - not just games.

PhilT[MS]
Q: When will DirectX 9.0 ship?

PhilT[MS]
A: current plan is Nov-ish this year.

Brett_DirectPlay_MS
Q: Can we turn off packet buffering altogether?

Brett_DirectPlay_MS
A: You can set this in SPCaps so that Winsock does not buffer any data.

Michael_DirectPlayMS
Q: How are you handling guaranteed and non-guaranteed packets on the same send queue?

Michael_DirectPlayMS
A: We will attempt to coalesce both guaranteed and non-guaranteed packets at the same time, if they fit within the send window

Robert-DirectPlay_MS
Q: Serflaten : Robert - Your answer "After DirectPlay 9 ships, you should see similar benefits from C# as well." Is that meant to exclude other .Net languages?

Robert-DirectPlay_MS
A: Not at all. It just seems that C# is getting a lot of attention these days so I called it out specifically.

MSDN_Erica
ranga -- You'll find DirectX newsgroups at https://msdn.microsoft.com/newsgroups/?url=/newsgroups/topic.asp?url=/msdn-files/028/201/114/topic.xml

Michael_DirectPlayMS
Q: Is there any way to get dp8 to realize that the other machine has died?

Michael_DirectPlayMS
A: Not really. This would only be useful if you are on the host machine since a non-host player could not "force" a host migration.

Michael_DirectPlayMS
A: (follow-up) If the host player knew that another machine had died (by some external method, perhaps), they could call DestroyPlayer()

MSDN_Erica
Thanks for joining us today! You've asked some great questions. Unfortunately, it's time to go. You can find the transcript of this chat soon on the MSDN Web site at https://msdn.microsoft.com/chats/recent.asp

Robert-DirectPlay_MS
It's been a pleasure chatting with all of you today. We are committed to making DirectPlay a useful and efficient network layer for games and always welcome feedback from the developer community. We monitor the newsgroups daily and you can also send you

Robert-DirectPlay_MS
your questions and comments to DirectX@Microsoft.com. We will most certainly have another live chat in the future!

MSDN_Erica
You can also find development resources for DirectX at https://msdn.microsoft.com/directx/.

Michael_DirectPlayMS
Jamie: It would work only from the host player. It forces the other player to be deleted

Brett_DirectPlay_MS
Thank you all for your time, questions, and comments.

Michael_DirectPlayMS
Thanks for you time. Have a nice day.

Top of Page