• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 198
  • Last Modified:

Direct Play PlayerID problem

Hi,

I am using DirectPLay and visual c++.net to program a simple network game. At the moment the Server.SendTo sends to the PlayerID::AllPLayers, I would like to be able to see all the current players connected, create player groups and send to player groups. I have seen some code in the MSDN and I seen the methods in the IDE but can't work out how to retrieve the player ids. The game successfully creates a host, and mulitple clients can connect, but I want to create multiple games sessions on one host. At the moment all clients get all messages.

Thanks

Help would be much appreciated, spent hours on this one issue.
0
kama_k
Asked:
kama_k
1 Solution
 
bredboredCommented:
It looks like IDirectPlay8Server::EnumPlayersAndGroups can retrieve the player ids of all clients connected to the server.  IDirectPlay8Server::CreateGroup will let you create groups and IDirectPlay8Server::AddPlayerToGroup will let you add players to them.  Once you've got a group you can use its id with IDirectPlay8Server::SendTo.
Nick
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now