Was looking to port an XNA game over to Monogame to run on Linux / Mac as well. One issue though ... how to do cross platform multiplayer? Currently using Lidgren Network Library but I guess that won't work off Windows. Is there a good way to do cross platform networking?
Monogame and cross platform multiplayer
Any data being transmitted only needs to be interpreted on both sides, at the end of the day it's just ones and zeros in a particular protocol. As long as they both understand the messages it's not an issue if they are windows, linux or on a potato.
If you are asking for a specific library to use, just google it; there are many.
Actually, MonoGame does use Lidgren and it is required to include with the framework.
A really good cross platform networking library (with a very simple API design) that I recommend is Enet. http://enet.bespin.org/
It works on Windows, MacOSX, and Linux of all forms. It uses a very reliable and stable UDP based network and is more reliable than TCP (from what I hear). It's also open source and the licence is pretty reasonable.
Shogun.
Was looking to port an XNA game over to Monogame to run on Linux / Mac as well. One issue though ... how to do cross platform multiplayer? Currently using Lidgren Network Library but I guess that won't work off Windows. Is there a good way to do cross platform networking?
You can use System.Net.Sockets. That namespace is implemented on both Mono and .NET.
Sure, it may take a bit longer to develop than using a networking library, but it will be helpful in learning networking, and to be honest its not really that hard once you know how TCP/UDP works and know about the several techniques you can apply to each.
System.Net.Sockets even has a slightly higher level socket class for UDP/TCP (TcpClient/UdpClient).
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.