Direct Play PlayerID problem

Posted on 2004-11-29
Last Modified: 2010-08-05

I am using DirectPLay and visual 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.


Help would be much appreciated, spent hours on this one issue.
Question by:kama_k
    1 Comment
    LVL 1

    Accepted Solution

    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.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    candy crush 4 420
    Python TKinter installation needs version advice 1 299
    Doesn't seem logical 8 220
    Python chess DS needs help 2 134
    Artificial Intelligence comes in many forms, and for game developers, Path-Finding is an important ability for making an NPC (Non-Playable Character) maneuver through terrain.  A* is a particularly easy way to approach it.  I’ll start with the algor…
    Recently, in one of the tech-blogs I usually read, I saw a post about the best-selling video games through history. The first place in the list is for the classic, extremely addictive Tetris. Well, a long time ago, in a galaxy far far away, I was…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    This video discusses moving either the default database or any database to a new volume.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now