Menu

One haystack shared by every Roblox server
πŸ“°

One haystack shared by every Roblox server

DEV Community: typescriptΒ·seoulsmithΒ·1 day ago
#rzHDmj3S
#devtotypescript#devto#dev#chunk#season
Long article (1673 words) β€” no AI summary yet.
Reading 0:00
15s threshold

Originally published on seoulsmith.com .

One Haystack is a Roblox game with a single premise: every server digs the same pile of hay, and there is exactly one needle in it. When someone finds it, the season ends everywhere and a new pile starts.

That premise turns a simple digging game into a small distributed-systems problem. Roblox servers do not share memory. A server holds up to 20 players, lives for as long as people are in it, and can vanish without warning. This post is about how those servers agree on how much of the pile is left, without melting a shared key and without counting the same hay twice.

I'll leave out one part on purpose: how the needle's location is stored and decided. That is the one thing in the design that players would benefit from knowing.

Problem

Roblox gives you two cross-server stores. DataStore is durable and slow-ish. MemoryStore is fast, expires, and has a request budget.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.