Lidgren.Network – explaining NetDeliveryMethod and sequence channels

Last week I posted a little tutorial on how to get get started with Lidgren.Network, the popular C# networking library. We covered the basics on how to set up a connection and how to send and receive messages.

Today I want to cover another useful feature of the library.

We will first discuss Lidgren’s usage of UDP, and then look into delivery methods and sequence channels, which allow us to send messages with different sorts of guarantees for arrival and ordering.

Continue reading →

Lidgren.Network – an introduction to networking in C# games

Ten or so days ago I started working on a new project – a game prototype currently called Syzygy. You can find the code for the entire project on GitHub, so feel free to take a look!

The game will have, and is from the start built around multiplayer gameplay. Since I want to get to work on the gameplay as quickly as possible, I did not want to spend any time writing my own networking library.

When searching online for what other people are using for their C# multiplayer games I came across Lidgren.Network by Michael Lidgren. The library had been used in another project I was part of several years ago, and I did not find any obviously better alternatives, so I decided to give it a try.

Continue reading →