Questions tagged [lidgren]

Lidgren.Network is an open source networking library for .NET Framework with a simple API used mainly in client/server games.

Lidgren Network 3 is a networking library for .NET Framework which uses a single UDP socket to deliver a simple API for connecting a client to a server, reading and sending messages.

46 questions
1
vote
0 answers

lidgren client cannot connect after disconnecting

I'm using Lidgren to connect a unity game to a gameserver. everything works fine. the only problem is when the client disconnects from the server (by loss of internet connection or even manually) it cannot connect again. I have to close and reopen…
roozbeh S
  • 1,084
  • 1
  • 9
  • 16
1
vote
0 answers

Hosting Box2D MMO: Photon vs Lidgren vs GameSparks vs PlayFab

I'm developing a game written in C# which utilizes a custom Box2D/Farseer implementation and is multiplayer based on the low-level Lidgren library. It has a few requirements: - Box2D must run on the server, along with other custom game logic. The…
Andrew Lundgren
  • 1,134
  • 1
  • 12
  • 18
1
vote
0 answers

Lidgren.Network high latency

I am using Lidgren.Network to connect to a local server and pulling messages in a 60hz frequenz both on server and client. The problem is that the average roundtrip time is something around 2ms, which is okay, but when sending a small message it…
NoFr1ends
  • 35
  • 1
  • 7
1
vote
0 answers

Lidgren server lag

I am writing a unity game and using Lidgren for networking. when only one client is connected it is running flawlessly, no lag or problems but when more than that are connected, everyone is experiencing extreme lag. since it is an authoritative…
Gmodjackass
  • 86
  • 1
  • 6
1
vote
0 answers

Lidgren Createmessage() Write() but Read() dynamic types, how?

I started to write my own networking with lidgren. I am very far. My goal is to make later my own master server (lidgren has a example for that) and an auto matchmaking server which hosts server and closest again. I am sick of Unity Networking (it's…
1
vote
2 answers

C# Lidgren Library - Send playerdata

I am currently writing an object oriented game with a multiplayer. Player inherits from entity and when I send my current players properties via NetOutgoingMessage outmsg = Server.CreateMessage(); [...] outmsg.WriteAllProperties(p); where p is my…
besplash
  • 346
  • 1
  • 5
  • 17
1
vote
1 answer

Generic packet system for Lidgren

I'm using Lidgren.Networking to send data between server and clients in a client/server architecture. I have created a Packet class to use when sending packets over the network. Packet.cs public abstract class Packet : IPackable { public…
1
vote
1 answer

Connecting peers in Lidgren from a server

I would like to set up a P2P matchmaking server. The situation is as follows: I have 2+ peers behind NAT'd router(s). I have a server behind a port-forwarded router on a static IP. The server's job is to register the contact information of each…
1
vote
0 answers

Lidgren Connection in XNA (Client/Server)

How do I send a data-type message in lidgren? If I've understood it right, you'll get a data-type when you manually send it? Even though I've done this, it doesn't work... Something that I think is kinda strange is that the client.ServerConnection…
hndrenG
  • 11
  • 2
1
vote
2 answers

C# Lidgren Library - Address already in use?

I'm experimenting with the Lidgren library for my XNA game. I created a simple server and client: Server: NetPeerConfiguration config = new NetPeerConfiguration("Warz"); config.Port = port; server = new NetServer(config); …
Basaa
  • 151
  • 2
  • 13
0
votes
1 answer

Sending Int32 equal to 4, received as equal to 67108864

What's going on, I do this on the server: var msg = Server.Api.CreateMessage(); msg.Write(2); msg.Write(FreshChunks.Count()); Server.Api.SendMessage(msg, peer.Connection, NetDeliveryMethod.ReliableUnordered); then on the client it…
0
votes
0 answers

Lidgren client joins in editor but not build

I'm writing a multiplayer game where multiple clients on their phone should be able to connect to a PC-based server. My editor testing has all worked and the editor client connects fine, I've now built the client project onto my phone and nothing…
0
votes
1 answer

Using lidgren from a windows service / equivalent of Application_Idle

I'm looking to use lidgren in a simple chat server. Now I've looked at the samples in the lidgren source and have noticed the following, For winforms apps they use the Application_Idle handler combined with the NativeMethods.AppStill Idle prop to…
Chris Meek
  • 5,720
  • 9
  • 35
  • 44
0
votes
2 answers

Casting enums to bytes and sending them lidgren

I have this code for receiving messages: private void DataMessage(NetIncomingMessage msg) { NetOutgoingMessage outmsg = server.CreateMessage(); DataType data = (DataType)msg.ReadByte(); switch (data) { case…
Bademo
  • 13
  • 2
0
votes
1 answer

NetException in Lidgren Framework

What make when happens Lidgren.Network.NetException: "This message has already sent! Use NetPeer.SendMessage() to send multiple recipients efficiently" ? else if (CounfOfPlayers == 1) { …
user280179
  • 63
  • 1
  • 9