As a developer who wishes to utilize Proximity Voice Chat, it currently consumes a lot of CPU time unnecessarily, especially for games like ours.
Currently, when using Proximity Voice Chat, a microphone bubble is created and placed above every player’s head, and a microphone icon is created for every player in the game’s escape menu. These bubbles are all updated every frame, whether they need to be or not.
From observations in my own game in the micro profiler, in a full 50 player server, ToggleMic
runs approximately 200 times per frame. For the most part, many of these players aren’t even streamed in, and I do not have my escape menu open. At most, I believe about 7 player characters were actually streamed in at this time. Across all 200 executions, this task takes between 0.5-1.2ms (again, just observations on my own hardware), and occasionally a single execution takes upwards of 0.4ms on its own.
This is highly impactful to our game, since it is a highly detailed game with a lot going on and we need to maintain at least 60 FPS. On my hardware, this single task (which ideally wouldn’t exist at all in our game) is consuming 10 FPS (from 111 ← 100, roughly). My hardware is quite a bit higher performance than a vast majority of our users as well.
Game Info
Link: [SALE] Aftermath - Roblox
Max Players: 50 (maximum for voice chat)
System Specs:
CPU: Intel i7-13700F
RAM: 64GB DDR5 5600MH
GPU: Nvidia RTX 4080
OS: Windows 11
Expected behavior
Ideally, ToggleMic
would only run on streamed in clients, and, with respect to the escape menu, only while I have it opened. I believe this would significantly cut down on the amount of time this task takes. Although, I am unsure of the full extent of operations this script is performing.
Additionally, I would love to just be able to completely disable the overhead microphone bubble. Our game is a survival game, and this non-optional bubble above players’ heads gives away their position to other players. Although it seems like there may be some hacky ways to “hide” this bubble we really don’t want it at all, especially when it consumes such a significant amount of our frame budget.
I’d love to see what I suggested here being implemented. Letting the developer be empowered to run their own solution alleviates future burden on all of us. Allow Spacial Voice UI to be Hidden/Configured - #18 by CompilerError