I am trying to make a turn-based board game that will be run on multiple computers. I am writing the game logic and design in VB. I searched for a little and could not find the information I was looking for. One question I have is, will I need a server if there will only be 2 players. Also, what language should I use to write the server side code. I have never done network programming before so I am not sure even where to start. Any information will be helpful.
Share
you don’t need a “server” so to speak. You do need someone to host the game, which would act as your server. Basically, you want one person to host the game, and you want the other players (the clients) to connect to that host. Say for example, you’re on a LAN and you want to host a game. Your IP is 192.168.1.101 for example. As the host, the clients will search for your game on the network, grab your IP and open up a connection. In addition, you’ll grab their IP as well.
There are a few things you also need to consider, such as host migration if the host quits.
If you’re coding the game in VB, then there’s no reason your networking code can’t be in VB either. The .NET Framework has some pretty solid networking methods. The NetworkStream is something you’ll want to look into.
http://msdn.microsoft.com/en-us/library/system.net.sockets.networkstream.aspx
You can use this to send/receive data between the server and clients.