Best way to update pixel changes in r/place style game

I am working on an r/place style game where players can place pixels on a 300x300 pixel canvas. I was wondering what would be the most efficient/optimized way of updating pixels live across all servers?

I will use MessagingService to update pixel changes live but when new servers are created, they need to be able to use the live canvas. Would updating a datastore with all pixel’s information be too much on the datastore or is there a better way to do this?

I tried doing this once. Never finished it…

  • 300x300 pixels = 90,000 entries
  • Each entry would have to have a color value and the players username or ID. (id would be better but it wouldn’t really be possible to get that many names from ids so its not the greatest for players ingame)
  • Colors would have 6 characters in a hex (white: FFFFFF), adding up to 6 bytes, or 540KB for the whole canvas.
  • Lets say usernames have an average of 8 characters. That’s an additional 720KB.
  • If you store the data in strings like HEXCODE_USERNAME, you would have to transfer 1.35MB per update.

From what I remember, the limit for MemoryStores are 64KB plus an extra KB per player in a server.
I could be wrong about parts of this but this is the reason I never finsihed my game.

1 Like