External Publication
Visit Post

Networked zay-es optimization

jMonkeyEngine Hub March 28, 2026
Source

I’m using networked zay-es for an RTS game, and I’ve noticed the server memory usage is running amok for the few components and states I have. I’m in the middle of debugging/optimizing and noticed one thing that I need to address.

I try to roughly follow the architecture of MonkeyTrap and recently switched from NetworkedEntityData to a RemoteEntityData object. It’s server authoritative, and the client sends regular network messages, as requests.

For the GUI, I have an EntitySet for the units. In the GuiAppState, I check:

if(!units.applyChanges()) { return; } It’s also throttled.

If there are updates, I check entityData for some additional components, that may or may not be there:

CloseCombat combat = entityData.get(entityId, CloseCombat.class);

I noticed that this yields a lot of error messages (Udp or Tcp): ERROR [com.jme3.network.kernel.udp.UdpConnector@7e87465f] (RemoteEntityData.java:679) - Received component data but no request is pending, id:0

I assume this is bad practice.

Would it be better to create a state/component that contains this information? I guess I just answered my own question, especially since I could reuse that information in other places.

Leaving it for posterity, and possibly confirmation

Discussion in the ATmosphere

Loading comments...