Large packets cause customEventAction() to stop

edited December 2012 in Native
Hey guys,

I'm sending some rather large packets around in my game and notice that when they get over a certain threshold two things seem to happen:

To explain what the game does: one player (the host) is in control of all game objects and sends a huge data blob containing the state for each game object. Whenever the other player receives this data, it automatically removes any game objects that didn't get updated.

- First there seems to be some sort of corruption happening, although I am not sure of this - it might be a bug in my code. I will have to investigate. I'm seeing game objects disappear and reappear the next frame. So it looks like the client is receiving the data blob but some objects are missing.

- Secondly, the customEventAction() ceases to fire when the packets get smaller again. Lowering the number of opRaiseEvent() calls on the host fixes this, although I should note that the events are only sent when getQueuedOutgoingCommands() > 0 and that they are sent with reliable == false.

Any idea what could be causing these issues or how I could fix them?


  • Update: The first issue was indeed a bug on my side of the code.
  • Update2: second issue is not dependent on the frequency of calls to opRaiseEvent()
  • Which version of the client SDK are you using?
    If it is anything prior to version, then you probaly have the same issue, thats already described here:
    See this post for the solution: viewtopic.php?p=9895#p9895
  • Ah thanks, yes I'm on, but I've already made the change as suggested in that forum post.

    Before, the game would lose connection, but what happens now is that just the messages over this particular channel don't arrive anymore. However when the packets get big again (by spawning a bunch more enemies that send state updates) the packets start arriving again :)
  • That sounds strange.
    Can you give us more information please?
    How big are your operations and how many do you send per second?
    Are you calling service() or sendOutgoingCommands() and dispatchIncomingComands() often enough?
  • I will see if I can make a repro on monday. I have since started optimizing the network data and am not running into this anymore.
Sign In or Register to comment.