decentraland / protocol-squad

Apache License 2.0
2 stars 2 forks source link

Avatar transform updates #1

Closed leanmendoza closed 1 year ago

leanmendoza commented 1 year ago

The players received by comms are rendered and also their data is sent to the scenes in a bunch of components:

The current implementation in the three clients send to all the scenes the player-updates before scene.onUpdate is called.

In the case of Transform, this can update up to 10 times per seconds per player. In the reference client the limitation of players are 100. With multiple scenes running, and many players moving, this could introduce an unnecessary bandwidth.

Some numbers to the limit

Take into consideration that it's not a memcpy, every CRDT message must be computed (increment timestamp, serialize message, etc)

Proposal

A. Expose a flag somewhere where the scene can subscribe to these updates (Transform), or set its frequency B. Send the updates from the Avatars that are only inside the scene (for Parcel scenes) C. A and B

leanmendoza commented 1 year ago

Transform is finally sent for the current parcel scene and global scenes. https://adr.decentraland.org/adr/ADR-245