Monogame networking over internet?

I found an XNA tutorial which uses the networking features.
Are those features supported in monogame? I would guess so, since it’s basically a better XNA, but I would like confirmation.

Also, according to this link, you can only do local connections? It says it requires a XBox Live Membership for the online stuff.
What if you want to use your own server? How would that work?


MonoGame includes the Lidgren Network framework.
cf Preferred Networking Framework

How to:

You need an xbox live membership to play online with XNA, same as for online play on XBOX
But nothing prevents you from using another library (which will probably won’t integrate a lobby, avatars etc).

1 Like

Thank you for the video series, I appreciate it. Since I never did anything related to game networking, I wasn’t sure what to look for.
I actually stumbled over Lidgren shortly after I posted this question. I’m currently reading the introduction.

A related question: Is it easier to host on external server or on my own machine?

The networking support using Lidgren in MonoGame has not been maintained for a long time now.

FIrst of all, game networking is hard, even more so over the internet. Here is an article on Gamasutra from the developers of Square Heroes, a MonoGame-based title with fast-paced networking. There’s a bunch of useful links at the bottom of the article for further information.

1 Like

With “not maintained”, you mean there’s better ways? Is it usable?

My game is a turn-based (slow-paced) card game where basically the only action is to move cards, so I don’t need fast updating like other games. I hope that will make it easier to construct a working client/server communication.

I mean, I could probably do it with something like Hamachi if it’s too hard over the internet, but what is the problem that makes it so hard to do specifically over the internet?

By internet, do you mean a server?

In that case it would mean finding a host server and probably paying for it, ensuring it is up 99%+ time etc.

I think Hamachi is just TCP/IP right?

For this, Lidgren or FalconUDP (what Square Heroes uses) is probably unnecessary, although it would work. You’d need to write your own matchmaking server and pay to host it (no, it’s not a good idea to host it on your home PC!). Probably the best bet would be Photon, particularly since your game is turn-based (async networking only). I haven’t tried it but apparently it has built in matchmaking so you don’t need to worry about that side of it, and until your game gets more than 20 concurrent users, it’s free:

Just looked a bit at the documentation and am I understanding correctly that I don’t need to write server-side logic for this? Since it already implements message sending and rooms.

That’s my understanding. You might want to look into it further, but yes, I think you can just get people connected without any custom server code.

Monogame online is impossible, when you don’t know about something, please keep your mouth shut, it will save everyoen time.

3 years later


Monogame online is impossible…

humm concerning.

Online Monogame is NOT impossible. You could use any C# networking library to implement networking that is completely separate from Monogame. Since there are C# networking options available, this is completely able to be done.