HaRrY
HaRrY
NNormal
Created by HaRrY on 7/6/2024 in #🤝ask-a-question
Normcore headless build
Can we create a unity headless build and deploy to one of our cloud platforms instead of using normcore private? And get all those features that normcore headless build provides? The issue is, we are not that big currently, and we do want to fix some issues regarding syncing - spawning etc which we are doing by checking the least client ID in the room. But would be more beneficial and less checking of these if we can spin-up the headless build if we can.
10 replies
NNormal
Created by HaRrY on 7/2/2024 in #🤝ask-a-question
Realtime.Destroy On owned realtime prefabs.
Can I destroy a RealtimePrefab by calling Realtime.Destroy even if someone else is an owner? Or do I have to take ownership first before destroying. I know it would destroy but I am thinking more like what will happen in the datastore?
5 replies
NNormal
Created by HaRrY on 5/16/2024 in #🤝ask-a-question
How to clear RealtimeSet or RealtimeArray
I run matches on loop. And before I start a new match I have to clear the previous scores etc that are stored in RealtimeArray. Lets say there are 10 matches, each match has its score, now this score used to be stored in RealtimeArray, now I am using RealtimeSet so that I can clear it. So I cannot clear RealtimeArray and the only way I can clear RealtimeSet is by using this while (model.advents.Any()) { model.advents.Remove(model.advents.Last()); } And even though I am doing the above only on 1 client sometimes I feel like its not consistent, I dont know even if I should do this or is there a better way to do this. Or how would you fellow normcorians have done it?
8 replies
NNormal
Created by HaRrY on 4/15/2024 in #🤝ask-a-question
Trying to update a value reliably
I have a realtime property for example fillpercentage property. Now every client can update that property (increment/decrement) but the issue is that there is a slight chance that they might override each other values instead of adding on top of eachother. For example the default value is 0 -> then client 1 did currentVal + 10 and client 2 also did currentVal + 10 but if they both did it on the same time then currentFillPercentage will be 10 instead of 20 right? I have following ways to solve it but each solution have some pros and cons. Please let me know if there is a solution that is robust in everyway. I am not using Normcore private or headless builds and likely wont use it anytime soon. Using RealtimeDictionary or RealtimeArrays: Pros: We can record the last few added values. For example client 1 can add 5, client 2 can add 10 and client 3 can add 15 and all 3 events would be recieved on all clients and only 1 client (e.g. master client) can process them 1 by 1. Cons:. It might take sometime to sync that and its not a good experience also if the master client took off his headset for like few seconds then the game would stop updating the fillPercentage values. You might say to apply the local change first but then it opens issues of having outdated/false values if you have such a bad ping Here is what I would likely want: I want it to be so reliable that I dont miss any users value changes, I also want it to be sequential like these delta updates changes should happen sequentially, I would like it to be instant if possible and last but not least I want to detect reliably that who was the first client that made the fillPercentage = 0 so that I can add that users score etc. I can use StringKeyDictionary for the scoring part but reliably calculating all the fillPercentages delta changes and making sure its not relying on only 1 client because we are not using headless build is a challenge.
30 replies
NNormal
Created by HaRrY on 3/26/2024 in #🤝ask-a-question
How to clear RealtimeArray?
I am using RealtimeArrays to store RealtimeModels for scoring like kills/deaths etc. There is a use-case where I need to reset the scores and everything. How do I clear/remove all elements of RealtimeArray to start from scratch?
6 replies