Discuss Scratch

rdococ
Scratcher
500+ posts

Make cloud variables suck less

Cloud variables are poorly designed and fail to meet Scratch's own design goals, and I think there are a few reasons why.

1. Number-only: Cloud variables are number-only. This is necessary to prevent creeps, of course, but it means you need to understand encoding/decoding to create even a simple high score system to track the current record holder.

2. Rate-limited: Cloud variables are rate-limited in a silly way- if you want to send enough data per second for even the most basic Pong game, you have to encode multiple values into one cloud variable, despite the fact that you'd be sending the same total amount of data with a multi-variable solution. I got most of the way there by taking advantage of a ‘wait for cloud var cooldown’ custom block, but there is no game over detection.

3. Storage capped: You're capped at 10 cloud variables, meaning you also have to encode if you want to store more than 10 values at a time or send more than 10 different kinds of values. This is not as severe as the others, but still something to keep in mind.

You can't remove these limitations entirely- but still, encoding/decoding should be the realm of advanced projects only. It's a bit silly that in Scratch, it's necessary to create even a basic scoring system or intermediate online project; if Scratch were a house and cloud variables were a room, cloud variables have an unnecessarily high floor!

Here I have a few suggestions designed to lower the floor to cloud variables without endangering kids or Scratch's servers.

1. ‘last user to change variable’

(last user to change [☁ score v] :: variables)

This block would only appear if you have cloud variables in your project. The variable menu would display only those variables, and the reporter would tell you the last user to change a cloud variable. This makes creating a high score system much easier- you can just check who was the last person to change the score. This information is already recorded, it's just not available to the project, so it would take little bandwidth.

2. Smarter rate limiting

From my testing, it seems like you can only change one cloud variable per second, or perhaps only receive one cloud variable change per second. you can change one cloud variable per 0.1s, or 10 per second. This requires you to either ‘stagger’ variable changes, creating longer delays the more information you want to send which is not good for a multiplayer game, or encoding so you can take advantage of the full 256 characters per 0.1s.

This rate limit should be changed so that you can change as many cloud variables as you want, but the combined size should not exceed 256 characters. You can set 1 variable to 256 characters or 2 to 128 characters, etc. This would allow you to send the same amount of information as currently without requiring an encoding system, which is plenty for multiplayer games like Pong, platformers, etc.

3. Smarter variable cap

The same could be done for the cloud variable cap- if you have 20 variables you can store 128 characters, 40 variables with 64, etc. This doesn't change the amount of data you can store in total, but makes it possible to do so without encoding.



A possible concern I haven't seen raised yet: these more sophisticated limits might be more difficult for Scratchers to cotton onto as they depend on the number of variables used. If necessary, the limits could be described simply as “you can only send 256 digits at a time”, or “you can only store 2560 digits at a time”.

Last edited by rdococ (April 13, 2023 11:34:57)

Caroix
New to Scratch
500+ posts

Make cloud variables suck less

Support. These suggestions are related and you literally make the most recent sticky and you definitely did use the most recent sticky since you're right.

They are very complicated for a 8-year old to understand, and “limited” to do much with them

Caroix / Braincells / Ur local second werido lol

Hello! I am Caroix, I have braincells.
Amount of cells not listed for “reasons”
Za-Chary
Scratcher
1000+ posts

Make cloud variables suck less

Caroix wrote:

They are very complicated for a 8-year old to understand, and “limited” to do much with them
In that case, why don't we just remove cloud variables? (We shouldn't, of course, but one would have to think carefully about how to fix the problems, which OP is trying to do.)

This is my forum signature! On a forum post, it is okay for Scratchers to advertise in their forum signature. The signature is the stuff that shows up below the horizontal line on the post. It will show up on every post I make.

I was a Scratch Team member from May 10th 2019 to October 29th 2021.

my notebook | scratch team essay | accessibility essay
eikh2
Scratcher
1000+ posts

Make cloud variables suck less

Support, the “last user to change” will remove a lot of work.
Also i'm pretty sure the rate is 0.1 seconds, as I've heard here.

Caroix
New to Scratch
500+ posts

Make cloud variables suck less

Za-Chary wrote:

Caroix wrote:

They are very complicated for a 8-year old to understand, and “limited” to do much with them
In that case, why don't we just remove cloud variables? (We shouldn't, of course, but one would have to think carefully about how to fix the problems, which OP is trying to do.)
I didn't say to remove them, I said to better then since they aren't that good but they claearly don't fit with Scratch's own design goals

Caroix / Braincells / Ur local second werido lol

Hello! I am Caroix, I have braincells.
Amount of cells not listed for “reasons”
BreadcatGames
Scratcher
1000+ posts

Make cloud variables suck less

Caroix wrote:

Support. These suggestions are related and you literally make the most recent sticky and you definitely did use the most recent sticky since you're right.
Ironically, OP actually wrote the most recent sticky

nintendo is my favorite indie company :3 they deserve all my money and i love them and will always buy a $60/yr subscription for 30 year old games!!!
Za-Chary
Scratcher
1000+ posts

Make cloud variables suck less

Caroix wrote:

I didn't say to remove them, I said to better then since they aren't that good but they claearly don't fit with Scratch's own design goals
I don't necessarily agree with that either. At its source, cloud variables are basically just variables except with some extra restrictions: most notably the fact that you can only use numbers in cloud variables. (One could argue that this makes cloud variables even simpler than regular variables, but I digress…) Let's review Scratch's design goals:
Low floor: It should be easy to climb in and get started with Scratch - even for Scratchers who have no experience programming.
Cloud variables are easy to get started with because you can use them to display the high score of something. Those who understand variables can understand cloud variables and at least what they do.
Wide walls: Scratchers should be able to make all kinds of things with Scratch - not just animations and games, but news programs, science experiments - things we can't even imagine.
There are many things you can make with cloud variables, including high score tables, multiplayer platformers, multiplayer card games, safe chat rooms, … the list goes on. So you can make all kinds of things with cloud variables.
High Ceiling: Even though it's easy for someone who is new to programming to get started with Scratch, it should still be possible to make complex stuff.
It is still possible to make complex stuff with cloud variables, notably, multiplayer games. But high score tables that display usernames also fall under this category.

Therefore cloud variables align with Scratch's design goals.

I think it's a bold claim to state that cloud variables don't meet these design goals, and in particular it's a little bold to claim that they “suck,” but that's not to say the OP's suggestion has no merit. I think OP is, at their heart, just asking for cloud variables to be a little better. The floor is already pretty low, but they're suggesting to make it even lower. That's totally fine and I can understand that — but I don't think that means there's no low floor to begin with.

This is my forum signature! On a forum post, it is okay for Scratchers to advertise in their forum signature. The signature is the stuff that shows up below the horizontal line on the post. It will show up on every post I make.

I was a Scratch Team member from May 10th 2019 to October 29th 2021.

my notebook | scratch team essay | accessibility essay
Caroix
New to Scratch
500+ posts

Make cloud variables suck less

Za-Chary wrote:

Caroix wrote:

I didn't say to remove them, I said to better then since they aren't that good but they claearly don't fit with Scratch's own design goals
I don't necessarily agree with that either. At its source, cloud variables are basically just variables except with some extra restrictions: most notably the fact that you can only use numbers in cloud variables. (One could argue that this makes cloud variables even simpler than regular variables, but I digress…) Let's review
Doesn't extra restrictions make them harder to use? And they aren't simpler, even if you don't have to understand multiplayer and servers, you need to understand encoding and decoding to do much with them but a 8-year old could avoid that, you could say

Simplicity: 5.5/10

Za-Chary wrote:

Scratch's design goals:
Low floor: It should be easy to climb in and get started with Scratch - even for Scratchers who have no experience programming.
Cloud variables are easy to get started with because you can use them to display the high score of something. Those who understand variables can understand cloud variables and at least what they do.
This basically aligns with my simplicity argument but this isn't available to New Scratchers, which can be seen as a huge restriction, also you can get high-scores but it isn't so simple

Wide walls: Scratchers should be able to make all kinds of things with Scratch - not just animations and games, but news programs, science experiments - things we can't even imagine.
There are many things you can make with cloud variables, including high score tables, multiplayer platformers, multiplayer card games, safe chat rooms, … the list goes on. So you can make all kinds of things with cloud variables.
High score tables are the only thing really that much simple here, safe chats are too restricted even though I agree with why they are restricted.
And the list goes on… Fashion multiplayer? Their isn't much you can think of…

Wide Walls: 6/10

High Ceiling: Even though it's easy for someone who is new to programming to get started with Scratch, it should still be possible to make complex stuff.
It is still possible to make complex stuff with cloud variables, notably, multiplayer games. But high score tables that display usernames also fall under this category.
Again, they require encoding and decoding which lowers the complicatedness of projects, also you can't make that many, so it is really hard to store info…

Complexity: 8/10

Therefore cloud variables align with Scratch's design goals.
Kind of

I think it's a bold claim to state that cloud variables don't meet these design goals
They do meet them, not fully but they could be better as OP stated

and in particular it's a little bold to claim that they “suck,”
I do agree


but that's not to say the OP's suggestion has no merit. I think OP is, at their heart, just asking for cloud variables to be a little better. The floor is already pretty low, but they're suggesting to make it even lower. That's totally fine and I can understand that — but I don't think that means there's no low floor to begin with.
Yes, I also do think this suggestion has merit and even think it should be implemented. The floor is not that low but it could be lower, yes

So, they get a 18.5/30… They aren't bad but have a lot of room for improvement

Caroix / Braincells / Ur local second werido lol

Hello! I am Caroix, I have braincells.
Amount of cells not listed for “reasons”
-OdysseyCentral-
Scratcher
1000+ posts

Make cloud variables suck less

Support. The “last user to change (variable)” would be really useful for making chats (of course the type of chats that are allowed), as instead of encoding message + sender, you would only be required to encode the message. And, I agree, it doesn’t fit Scratch design goals to have a “high floor” which cloud vars have, as basically if you want anything different than a simple highscore (low floor, not wide walls), you need to have the skills to make a decoding/encoding system (high floor, wide walls)
And, I remember there was a suggestion for the limits to be changed it such way, but I cannot find it.

The Honey Shop is back! Check us out on the Requests forum!





=== ♪ ♬ ♫ ᴺᴼᵂ ᴾᴸᴬᵞᴵᴺᴳ : Champion’s Road, from Odyssey’s Ultimate Playlist ♩ ♭ ♫ ===
=== 1:37 ───ㅇ───── 4.01 ↻ Previous Song: Battle on The Great Tower◁ II ▷Next song: Ground (SMW) ↺. ♬ ♪ ♩===
cs2861142
Scratcher
100+ posts

Make cloud variables suck less

Support, this makes a lot of sense because it will save a lot of work and be much more intelligent than the current system. Your new idea for the data capacity and send rates are much smarter than the current system, and your new block will save tons of work for developers. Of course, this may be somewhat complex to implement, but it will be worth it in the end, as the current system makes no sense.




cs2861142

Hey there, I am a 14-year-old coder of 5 years. I am very experienced with Scratch, I have experience with Unity and Godot. I love helping people on the forums using my knowledge. Currently learning Ableton Live to make some fire tracks.
Need help with something? Ask me on my profile/forums!
ilikecereal1
Scratcher
100+ posts

Make cloud variables suck less

bump

Be high contrast

Hi there! This is my siggy. This will appear on all my posts.

I like cereal.
k7e
Scratcher
1000+ posts

Make cloud variables suck less

rdococ wrote:

This rate limit should be changed so that you can change as many cloud variables as you want, but the combined size should not exceed 256 characters. You can set 1 variable to 256 characters or 2 to 128 characters, etc.
What about the projects that already rely on the current limit? @griffpatch's “Cloud Platformer Multiplayer Fun” uses 10 cloud variables, and each cloud variable has to have more than 25.6 characters in them. What is .6 of a character, anyways? What if 256 can't be divided by the number of cloud variables?

rdococ wrote:

1. ‘last user to change variable’
Duplicate.

@mythoslore was so much more obvious than @spookily
rdococ
Scratcher
500+ posts

Make cloud variables suck less

k7e wrote:

rdococ wrote:

This rate limit should be changed so that you can change as many cloud variables as you want, but the combined size should not exceed 256 characters. You can set 1 variable to 256 characters or 2 to 128 characters, etc.
What about the projects that already rely on the current limit? @griffpatch's “Cloud Platformer Multiplayer Fun” uses 10 cloud variables, and each cloud variable has to have more than 25.6 characters in them. What is .6 of a character, anyways?
That's the sending limit (how much cloud data you can send at once), not the storage limit (how much cloud data you can have stored). According to the current limits, all projects can already only send 256 characters at a time, and they can store 256 characters per cloud variable for a total of 2560 characters. With the revised limits, projects can still send 256 characters at a time but they can split it across multiple variables, and they can still store 2560 characters split across any number of cloud variables. Griffpatch's project will be fine.

SavetheAtlantic
Scratcher
1000+ posts

Make cloud variables suck less

rdococ wrote:

3. Smarter variable cap

The same could be done for the cloud variable cap- if you have 20 variables you can store 128 characters, 40 variables with 64, etc. This doesn't change the amount of data you can store in total, but makes it possible to do so without encoding.
https://scratch.mit.edu/discuss/topic/356862/
k7e
Scratcher
1000+ posts

Make cloud variables suck less

#1 and #3 are both duplicates, should I report this to be closed?

@mythoslore was so much more obvious than @spookily
cookieclickerer33
Scratcher
1000+ posts

Make cloud variables suck less

Boing

Last edited by cookieclickerer33 (Oct. 5, 2023 18:18:19)


⠀ ⠀ I beat Mario 64 yay! ⠀⠀ ⠀ ⠀ ⠀ ⠀ I love you ivy & may :3
⠀ ⠀ ⠀ ⠀ ⠀ ⠀⠀ ⠀ ⠀GEOMETRY DASH

⠀ ⠀ ⠀ ⠀ ⠀ ⠀ MecanX Disk 0 : Coming march 27th
MagentaDude1359
Scratcher
100+ posts

Make cloud variables suck less

rdococ wrote:

3. Smarter variable cap

The same could be done for the cloud variable cap- if you have 20 variables you can store 128 characters, 40 variables with 64, etc. This doesn't change the amount of data you can store in total, but makes it possible to do so without encoding.
i love this idea, support

This is my signature
Follow me
Zydrolic
Scratcher
1000+ posts

Make cloud variables suck less

I get the point of this, but cloud variable intriacy shouldn't matter, period. Even if it fails to meet design goals, if it's too simple — Too many issues arise, making moderation even more insanity inducing than it probably already is, even if it's breaching it's own design goals, you cannot have everything too simple, or you're gonna get knaves backstabbing you without caring less. While I'm a person who never uses cloud variables, it makes sense. Again, even if it fails Scratch's design goals — Would you rather be one of the moderators having to repeatedly do the same thing? Remember that one einstein quote.
“The definition of insanity is doing the same thing over, and over, and over again but expecting different results.”
Though that's slightly off-topic, so railing back - There's plenty reasons for it to be “bad” in many eyes, but it's negligible.

rdococ wrote:

(#1)

1. ‘last user to change variable’

(last user to change [☁ score v] :: variables)
-small snip-
This'd influence the creation of chat projects, as encoding the username ain't gonna be needed anymore.
All I can say since I'm not a man of cloud variables, that's all I've gotta say.
No support.

Jotaro Kujo wrote:

Good grief.
Suggestions
SDS Helper reqs should be upped - Show/hide via context menu - Revise “ask the community” - Browser not supported - Empty comment contrast
Other
a bit of trolling (i asked before putting it here) - github - github pages site - tamaNOTchi
stop posting about kumquats, im tired of seeing it, my friend comments saying “oh hey your post was eaten by a kumquat” STOP a kumquat is freaking fruit just eat it utp ojtishglkmkjhgaoeimrlV,5KU9MOIL3K5GP,Ő AHTAHGTARET SOTP positing ABJTOUT IT (parody & sarcasm)







bad joke:


Most of this is now going to become a meme storage.















thank you ajskateboarder







































This dialouge box has more than one sentence to say!

IndexErrorException
Scratcher
500+ posts

Make cloud variables suck less

Last user to change would be nice but data limitations aren't a big deal.

A useful 42 character set can be encoded and hold 1577 characters of a-z, 0-9, and most puncutation. Check my most recent shared project.

Plenty of data can be stored but i guess it would be nice for like 1024 char limit clouds.

Powered by DjangoBB