cancel
Showing results for 
Search instead for 
Did you mean: 

a question about meta avatar sync.

Zhongzhong01
Explorer

We are developing a multiplayer room-based game, where each room can accommodate up to 20 players. The characters use Meta's avatar system, and we perform 20 avatar state synchronizations per second to ensure smooth character movement. (The synchronization method involves the client reporting avatar data packets to the game server, which then broadcasts them to everyone in the room using the TCP protocol.)

This data packet is actually measured to be over 600B in size. Assuming a full room with 20 players and 20 ticks per second, the data transfer calculation would be: 600 * 20 * 20 * 20 = 4.58 MB.

 

E3471BE7-3D9C-4002-892C-C9F0CF636A75.png
The screenshot shows the character state data packet used by the client.

5 REPLIES 5

Zhongzhong01
Explorer

4.58 MB is the server bandwidth consumption per minute, which makes the bandwidth cost too high. How do other games typically solve this problem?

Zhongzhong01
Explorer

up

HoliamRoberts
Explorer

Unfortunatly your probem is tripple as to what you have calculated. Your bandwidth consumption is in fact +14.4MB per minute as there are in fact 60 seconds per minute and not 20 as you have stated.

We tick 20 times per minute, so it's not 3 times larger. Is there a good way to optimize this?

HoliamRoberts
Explorer

", and we perform 20 avatar state synchronizations per second to ensure smooth character movement."

So based on the above info you are saying that you sync each avatar 20 times per second with an overhead of 600B per sync.

1 avatar per second = 600B * 20 = 12000B or 0.012Mb

20 avatars per second = 12000 * 20 = 240000 or 0.24Mb

So we now know that each client uploads 0.012mb per second to the server and the server receives 228000B or 0.228Mb per second (19 clients)

Now here is the crunch. You now say "We tick 20 times per minute, so it's not 3 times larger. Is there a good way to optimize this?"

1 avatar 12000B per second * 20 ticks per minute = 240000B or .24Mb

20 avatar = 240000B * 20 = 4800000B or 4.8Mb

You are correct in your calculations if you ONLY tick 20 times per minute.

But WHY only 20 times per minute? Is this a robot game?

You sync 20 times a second to ensure smooth character movement but you are only syncing 20 times once every three seconds.

So to ensure smooth movement you need to sysc every second of every minute which is a 14.4Mb server overhead one way. You need 2 way traffic so its 28.8mb per minute.

Remember that the room will not always be full. You may need to reduce the tick rate and employ assumptions on possible continuous movement. Remember not all avatars will be in view for each client so baised on clients positions you may not require the server to send to all of the clients. If an avatar does not move since prev tick no need to send info. Is it possible to breakdown the avitar packet to only send reduced info (i have no idea as i am VisualFoxPro 9 programmer old school as im old).

Good luck with the game.

 

Still need help?

Did this answer your question? If it didn’t, use our search to find other topics or create your own and other members of the community will help out.

If you need an agent to help with your Meta device, please contact our store support team here.

Having trouble with a Facebook or Instagram account? The best place to go for help with those accounts is the Facebook Help Center or the Instagram Help Center. This community can't help with those accounts.

Check out some popular posts here:

Getting Help from the Meta Quest Community

Tips and Tricks: Charging your Meta Quest Headset

Tips and Tricks: Help with Pairing your Meta Quest

Trouble With Facebook/Instagram Accounts?