added notes

This commit is contained in:
ZappoMan 2013-07-24 09:59:51 -07:00
parent b2b67d2b3d
commit bacb4f96e3

View file

@ -51,6 +51,13 @@ void attachAvatarDataToNode(Node* newNode) {
}
}
// NOTE: some additional optimizations to consider.
// 1) use the view frustum to cull those avatars that are out of view. Since avatar data doesn't need to be present
// if the avatar is not in view or in the keyhole.
// 2) after culling for view frustum, sort order the avatars by distance, send the closest ones first.
// 3) if we need to rate limit the amount of data we send, we can use a distance weighted "semi-random" function to
// determine which avatars are included in the packet stream
// 4) we should optimize the avatar data format to be more compact (100 bytes is pretty wasteful).
unsigned char broadcastPacketBuffer[MAX_PACKET_SIZE];
unsigned char avatarDataBuffer[MAX_PACKET_SIZE];
void broadcastAvatarData(NodeList* nodeList, sockaddr* nodeAddress) {