I'm wondering about how should I send data during the enterFrame loop in a game. Should I collect all information, i.e., all object positions, removing the object and creating new ones and send them all at the end of my enterFrame loop in one big NetStream.send() OR should I call NetStream.send() immediately once I know for example that an object should be destroyed on the far side. The first approach means about 2-4 NetStream.send() every frame and the latter approach means about 30-50 NetStream.sends() per frame. Amount of data is the same per frame. The data is about 10-20 characters for each object and I have about 30-50 objects on the canvas. Any views on this? Thanks!
the overhead for every NetStream.send() is probably no less than 20 bytes (taking into account AMF headers and the name of the method to which you're sending the message data). so if your data is 10-20 bytes per object, you'll be dominated by overhead at one object per send.
OK this is great! Thanks!