multicast/group/directplay question

Started by
2 comments, last by Diodor 22 years, 9 months ago
I''ve just started directplay programming a few days ago and I have a few questions : 1) How often can I expect multicast abilities on the internet ? For an online game, can I choose an ISP with multicast ? Would such an ISP really allow me to send one to many messages with the bandwidth cost of one message ? 2) How can UDP do "one to many" connections while TCP can only do "one to one" ? (unexplained quote from a Gamasutra article) 3) If no multicast is available, are DirectPlay groups any good whatsoever ? (I fear since DirectPlay has to send each one to many message to every player, it will eat as much bandwidth as if I send each message by hand) 4) Can groups and multicast be simulated ? (Server sends message to one "subserver" client who in turn sends the message to all players in the group.) I know such a scheme would increase lag a lot, but lag is not that important for me since I dont want a fast-action game. Also, would it be a bad thing if that subserver client knew the IPs of other players ? (hacking/cheating)
Advertisement
one to many is just one message sent to many people without any extra coding. It''s the same bandwidth cost.

DPID_ALLPLAYERS is what you use to multicast with DPlay. There are ways to setup groups so that you can multicast to just a select group. Never used it so don''t know. I have my own way of doing groups.

With DPlay (I know 7 is like this, I''m guessing 8 as well), you never handle IPs in source. DPlay assigns a pseudo-random number to each client which you use in place of the DPID_ALLPLAYERS to send to one specific person. You have to devise a way to keep track of those numbers. I use an array. It''s an unsigned Int.

That number is only known by the computers directly connected to that client. In a server/client setup only the server will ever know that number unless you send it to other clients manually.

Clients cannot send each other messages directly in a server/client setup. The security risk only comes in when clients can be hacked to fake messages. It''s up to you to code the server so it can know when a message is bogus (I have many checks in place) and reject it accordingly.

Ben
http://therabbithole.redback.inficad.com
> How often can I expect multicast abilities on the internet ?

At the moment... never. Multicasting is a myth.

Aside from an experimental Net connection called Mbone, which some universities (maybe others) are connected to, there is basically no multicasting capability on the Internet right now. That is one of the things IPv6 is supposed to take care of. But we won''t be moving to that until someone razes all the current infrastructure to the ground and we start over, because no one wants to make the investment.
Thanks guys. I''ve had a feeling this was the case, but multicast would have made things _so_ easy, I had to try.

This topic is closed to new replies.

Advertisement