Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working on client-server-client game. Client is sending their status (position) 30 times a second. I'm using Lidgren.Network namespace for networking (server, client).

I've got two questions:

1. is: Is there a way to get whole NetIncomingMessage without manually using message.ReadString(), message.ReadInt32(), etc?

Second is a problem. On my local computer, everything works all right, position is updating fine and there are no Error Messages appearing. However, when on Linux (Using MONO on Linux side to run my server application (console appliaction)) on the remote box, I'm getting strange errors about once a second.

Received wrong pong number; got 56 expected 59 (ErrorMessage)
Received wrong pong number; got 57 expected 59 (ErrorMessage)
Received wrong pong number; got 58 expected 59 (ErrorMessage)

Googling this gave me only link to source code

Actual code taken right from source code of the Lidgren library which is giving me an error

// verify it´s the correct ping number
if (pingNumber != m_lastSentPingNumber)
      m_owner.LogDebug("Received wrong pong number; got " + pingNumber + " expected " + m_lastSentPingNumber);

possible problems:

  • Mono
  • Packet loss (which I think is more probably, but on the other side, I think this shouldn't happen as I use NetDeliveryMethod.ReliableOrdered)

For everyone interested, there's how I actually send the user's position

Client.SendMessage(message, NetDeliveryMethod.ReliableOrdered); // yes, ReliableOrdered, so I think it should loss any packets, should it?
share|improve this question

closed as off-topic by Josh Petrie Jun 20 '14 at 15:29

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about debugging a problem in your project must present a concise selection of code and context so as to allow a reader to diagnose the issue without needing to read all of your code or to engage in extensive back-and-forth dialog. For more information, see this meta thread." – Josh Petrie
If this question can be reworded to fit the rules in the help center, please edit the question.

are you sure you are expecting correct number of bytes? I mean two ints plus a byte will result in 9 bytes, where did you get 59 from? – Ali.S Jan 26 '12 at 20:29
@Gajet: It's still increasing, it's starting from 5, before that, I actually send CONNECT byte, player username, x & y before sending this frequently) – Martin. Jan 26 '12 at 20:32
Why did you pick ReliableOrdered? – Joshua Drake Apr 26 '12 at 12:33
@Joshua because it has to be shooter game, and I think that needs to be accurate – Martin. Apr 26 '12 at 13:42
This question appears to be off-topic because it is about debugging 3rd party problems and APIs. – Vaughan Hilts Apr 15 '14 at 23:30

Browse other questions tagged or ask your own question.