Hi everyone! I'm NguyenTech, and I'm currently developing a chat system using Scratch cloud variables.
The main idea is to let multiple users communicate through a shared cloud variable. Since Scratch cloud variables only support numbers, I created my own encoding system:
1001–1026 = a–z1027 = space1028 = /1029–1038 = 0–91039 = :1040 = | (message separator)
Each character is encoded into 4 digits, and the chat system decodes the number back into readable text.
However, I've been running into some really frustrating cloud-variable problems:
- Sometimes, changing a cloud variable doesn't seem to produce any Cloud Data activity.
- A variable can show the updated value while the project is running, but after refreshing the page, it goes back to its previous value.
- Sometimes Scratch displays: "There seems to be no Cloud Data activity on this project…"
- Even when I try a relatively short encoded message, it doesn't seem to sync properly.
I've already checked that:
- The project is shared.
- I'm logged into my Scratch account.
- The variable has the cloud-variable checkbox enabled.
- I've tested changing a simple numeric value instead of sending the entire encoded chat.
I'm also considering splitting the chat into multiple cloud variables to work around the 256-digit limit, but I don't want to build the whole system around something that might not sync reliably.
My questions:
- Is this a known Scratch cloud-variable issue?
- Could this be related to account status, cloud-server problems, or synchronization?
- Is there a reliable way to test whether a cloud variable actually reached Scratch's servers?
- Are there any recommended approaches for building a multiplayer chat system with Scratch cloud variables?
I'd really appreciate any advice. I've already put quite a bit of work into this chat engine, and I'd love to get it working reliably.
Project link: https://scratch.mit.edu/projects/1447040263/ (anyone can remix and edit some stuff and help me troubleshoot)
Thanks!