Hacker News new | ask | show | jobs
by dnsge 969 days ago
Sure: a cloud variable is like a normal variable, but its value is replicated to all people using the project. Perhaps important context for Scratch variables: all variables are global in Scratch.

If person A uses the project and modifies the cloud variable, person B also using the project at the same time will see the new value update in real time.

Related tidbit about cloud variables: When I was on Scratch, there was no effective limit to the size of data stored in the cloud variable (though you were restricted to <= 10 cloud variables per project). Assign a letter to a two-digit number, a -> "01", concatenate the digits for each letter, and store the number into a cloud variable, and you get a simple encoding/decoding scheme for communicating between players in a game.

When enough projects that (ab)used cloud variables for intensive applications like multiplayer came around, I believe that the Scratch Team restricted the amount of data each can store. This change happened as I was no longer using Scratch much, though, so I can't speak much about it.

1 comments

Thank you! I see now that "cloud variables" are a specific feature of Scratch projects.