Malformed Packet

Hey guys, I'm doing a Beta test on a game at the moment and they've been having some issues with people disconnecting randomly while in game. I ran an analysis on my network while playing the game using Wireshark, and on all 3 games I played and disconnected on the 2nd to last UDP packet had a little message in the data that said "Remote Disconnect: Malformed Packet". What the heck does that mean? I know practically nothing about networking.

This is hard to answer without more information, but if the structures are based on multiple atomic UDP packets, and some packets have screwed up the data, then you could get a bad overall structure.

In the TCP/IP suite of protocols, you have the situation where the protocol simply implements UDP with an extra addition in that it makes sure that every packet has been sent until it sends the next one.

In game engines though, this kind of thing is not used and the reason why is because if the game state changes enough, then if packets are dropped, you don't want to resend those packets since they are representing the old state and will simply cause chaos if a huge backlog of data is being sent until the client 'catches up'.

The UDP packets for a connection have what is called a frame size. The frame size is the size of an atomic packet that is guaranteed to be sent if it gets to the other side at all. Frame-sizes depend on the connection and the nature of the network: 56k dialup frame-sizes are really small but frame-sizes for a 100 Gigabit cable network are very large.

My guess (and it is a guess) is that the engine is using UDP (most online game engines do for the reasons stated above) and the engine is using multiple packets for some larger structural information, and if people are disconnected in ad-hoc manner (like say pulling the cable out, or turning off the computer, or something similar) then you are going to get a situation where the server has to handle this (multiplayer game engines are designed for these situations in hindsight).