Question

MiXenXd on Thu, 05 Feb 2015 21:00:56


Hi,

I create game for Windows Store and I had idea to add multiplayer match for my game. I wonder, how can I do it, what should I use? It is a good way to create a server-client connection or use somethink different?

Thank you for any help.


Sponsored



Replies

Rob Caplan [MSFT] on Thu, 05 Feb 2015 21:10:34


You'll have to start by defining what you mean by multiplayer.

Do you want to match only local players? Do you want to match a few remote players? Do you want many players to exist in the same world? Is that world persistent? What is the play like? Simultaneous fast action? Turn-by-turn? Something else?

If local then you can use local direct connections such as setting up a socket connection over a PeerFinder. If remote then you'll need to have all players connect out to a remote server since firewalls will block direct incoming connections.

What the servers actually look like will depend on what sort of multiplayer support you want to implement.

MiXenXd on Thu, 05 Feb 2015 21:56:49


I want implement a LAN/Wi-Fi matches and my game is a turn by turn type. I want to add, that I want to connect PC and smartphones thught this game.

Rob Caplan [MSFT] on Fri, 06 Feb 2015 02:48:01


For local connections you can use local direct connections such as setting up a socket connection over a PeerFinder or by direct address.

MiXenXd on Fri, 06 Feb 2015 10:04:43


Ok, maybe can you suggets some tutorials or somethink like that?

Rob Caplan [MSFT] on Fri, 06 Feb 2015 22:57:42


There's lots of information at the top of the page under Develop / HowTo / Developing apps / Connecting to networks and web services .

MiXenXd on Mon, 09 Feb 2015 16:14:12


I now discover, when I will be used a peerFinder and connectasync, I will be only connect two devices, but I want to connect more devices in client-server connections, how can I do it?

Rob Caplan [MSFT] on Tue, 10 Feb 2015 17:34:37


You can set up the connections directly. Please see the documentation I linked previously.

MiXenXd on Tue, 17 Feb 2015 19:23:07


Yes, of course, I can set up connections directly, but one device can have only one connection. That information is here: https://msdn.microsoft.com/en-US/library/windows/apps/windows.networking.proximity.peerfinder.connectasync How can avoid it?

Rob Caplan [MSFT] on Tue, 17 Feb 2015 20:10:21


If PeerFinder doesn't meet the needs of your app then don't use it. You can set up the connections directly. See How to connect with a stream socket for one example of how to do this.

MiXenXd on Sat, 28 Mar 2015 23:25:38


Ok, that it is, that I want, but how can create "instances" of my app and discover it in other devices?
 Of course I mean about situation, when the client looking for the availble servers?