How to share same value across all servers

I need help
Im making a grow a garden type game and i want to share the stock to all servers
How would i do that? If every server chooses its own stock and communicates it to remote servers then that would be chaotic
Thanks

You can use MemoryStoreService or MessagingService. I’d personally suggest using the latter option as it’s more convenient.

Please do read the documentation. If you have any questions regarding the documentation then let me know.

2 Likes

There are a few ways. You can define it in such a way that they all will get the same answer (think a randomseed like Minecraft).

You can process every servers values and average them or something (probably not super scalable).

You can also try finding a way to make one server to rule them all which makes this decision. Trivial to do in a basic case, a bit complex to make stabilize in uncertain networking conditions though and/or if the one server goes down.

You can make an external server that handles it

You can tell every server to update something at the same time, wait a moment, then have them all read whatever data won that race. (Caching could trivially break this if it happens)

You can keep it constant which syncs by default

You can also hire people to use admin commands to sync it at intervals

My ideas are getting worse as I go

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.