One of the changes I thought to make was to send over the code associated with each reserve server over to the reserve server to identify which server you are in, this way you could join your friends as the “Lobby” (the place containing the server browser) has a max player count of 1. My idea was to make something similar to the browser used in A Universal Time.
I tried to do this using MessagingService but no matter what I tried, it would never do anything. I found out later on that it was because the SubscribeAsync must happen before the PublishAsync which I’m unable to do. I’m not sure what other methods to try. I understand that potentially changing the structure of my datastore may resolve this issue, however, I think it would make the “Server code” redundant as it’s what I’m currently using as the DataStore key.
Has anyone got any suggestions of what else I could try? Thank you!
(If you need to see the code, just let me know and I’ll share it here!)
I have not tried it yet no. This was one thing that popped up across several other posts I’ve seen but everyone seemed to have mixed/disagreeing opinions of its use case for something like this.
Could you tell me a little bit about it and your thoughts on it?
I dont think I could think of any reason against using MemoryStoreService’s sorted maps for this. important notes:
Sorted maps let you cycle through all the keys and data in the map
Each key expires, so you need to refresh it periodically . However this is great behavior since if a server shuts down, the key will automatically be removed later so there wont be any ‘ghost servers’ in the server list
memory stores are pretty generous with throttling, so with the right configurations it can be extremely reliable and fast
So the idea behind it would almost be to have it along side the existing DataStore with similar-ish data, only that the keys are different? I.E the key for the DataStore is this “code” while the key for the MemoryStore is the PrivateServerId? Or is this inefficient?
Ah okay, I think I get what you mean now, it’ll also prevent un-used servers from appearing on the list too. As for the data actually stored, would the format that the datastore is currently using which is the “code” as the key work?
Or would I have to make the key the PrivateServerId provided by the :ReserveServer() function?
I ask as I’m not too sure how it would affect the current server browser in terms of using the code to join a server directly, especially private ones which of course wont appear on the list.