Game Development Community

NetEvents building up?

by Shyam "Doggan" Guthikonda · in Torque Game Engine · 06/29/2006 (12:39 pm) · 1 replies

For my application, I am using the TNL::NetEvent approach to send my positional data for each of my clients. Each frame, each client creates a new positionEvent, and posts the event to it's server connection. The server then processes these events, sending them to all connected clients. Each client then processes the events sent by the server.

I am noticing that my memory usage is slowly (actually, pretty quickly) increasing on the clients as the application proceeds. At first I thought I had a memory leak. Now, I do not think it is a memory leak. I noticed that if I send a few less pieces of data, the memory usage will stay constant. My conclusion is that: the events are being created faster than they are being sent out.

Each client creates approximately 4 of these events per frame. checkIncomingPackets() and processConnections() is called once per frame as well....

Any ideas how I can solve this increase in memory usage? Is there some flag for NetEvents to only handle the most recent data? I know that the GhostConnection system uses the 'most recent data' philosophy, but it is a more complex solution than I need for this application.

Thanks for any feedback.

edit: I thought perhaps the default bandwidth was capped, and tried setting: setIsAdaptive(), but it did not appear to do anything o_O

#1
06/29/2006 (4:28 pm)
What is your framerate? You might try not sending updates so often, and interpolating the data if it's needed.