Is there a way to favor the person who takes ownership first?
People intentionally increase latency via VPN for an advantage.
We want to have the first person who requests ownership first take ownership
2 Replies
Hi @Chris dev. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Based on the provided knowledge sources, there isn't a direct way to favor the person who requests ownership first in NormalVR. The ownership system in NormalVR is designed to be deterministic and server-authoritative, which doesn't inherently account for latency differences or prioritize based on request timing.
However, there are a few relevant points to consider:
1. By default, anyone can request ownership of a RealtimeView at runtime, and the server will approve this request unless a parent RealtimeView is already owned by another client Ownership documentation (https://normcore.io/documentation/room/ownership-and-lifetime-flags#prevent-ownership-takeover-of-a-realtimeview).
2. There is a
preventOwnershipTakeover
flag that can be set to prevent ownership changes once an object is owned RealtimeView Advanced Settings (https://normcore.io/documentation/realtime/realtimeview#advanced-settings).
3. When instantiating objects, you can set them to be owned by the creating client immediately using the ownedByClient
parameter in Realtime.Instantiate()
Requesting ownership documentation (https://normcore.io/documentation/room/ownership-and-lifetime-flags#requesting-ownership-of-a-realtimeview).
To address your specific concern about latency manipulation, you might consider implementing a custom solution using these existing features. For example:
1. When the game starts or an object becomes available for ownership, you could have all clients attempt to take ownership simultaneously.
2. Use the ownedByClient: true
parameter when instantiating objects that should be owned by the creating client.
3. Implement additional checks or a cooldown period after ownership changes to prevent rapid ownership switching.
However, it's important to note that the knowledge sources don't provide a built-in method to specifically favor the first person who requests ownership based on real-world timing. The system is designed to be fair and deterministic based on the order of operations received by the server, which may not always correlate with the order in which clients initiated those operations due to network latency.
If this is a critical issue for your application, you might need to consider implementing additional custom logic or reaching out to the NormalVR team for more specific guidance on handling this scenario.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@182570065022025728> Kapa.ai is still learning and improving, please let me know how I did by reacting below.