From bacb4f96e37e68492c82c027888ff28521001166 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Wed, 24 Jul 2013 09:59:51 -0700 Subject: [PATCH] added notes --- avatar-mixer/src/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/avatar-mixer/src/main.cpp b/avatar-mixer/src/main.cpp index b2e28fe484..8383c992b2 100644 --- a/avatar-mixer/src/main.cpp +++ b/avatar-mixer/src/main.cpp @@ -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) {