Discuss Scratch

BoltBait
Scratcher
1000+ posts

My view: Cloud Variables Have Problems

This is my first try using cloud variables and I'm not happy (to say the least).

I am trying to add a “Top Ten” list to my Tower Defense game. I added two cloud variables to my game–one to hold the list of usernames and one to hold their highest score.

See this thread to see the specific blocks and ideas: http://alpha.scratch.mit.edu/forums/topic/644/

Issue #1: Now, my game is “jumpy” instead of smooth like it was before I added the cloud variables. Sometimes the game stalls for over a second while I assume the cloud variables are being updated. Which brings me to…

Issue #2: The updating of the cloud variables keeps my network saturated all the time. Not everyone has highspeed internet to their house. And, not everyone has unlimited bandwidth.

This is very wasteful. There should be some mechanism that only transfers the data when it changes.

Remember, this is only with a handful of people playing the game. Many of my games have 3 or 4 THOUSAND players. What's performance going to be like then?

Issue #3: The data in the list doesn't seem to be reliable.

Looking at what is stored on the server:
{"variables":[],"lists":[{"name":"? Username","value":
["","","BoltBait","gamer2012","TorbyFork234","","Spyderblade"]},
{"name":"? Highscore","value":["0","0",30786,10376,"0","0",11,"0","0",26543]},
{"name":"? Username","value":["","BoltBait","","","",""]},
{"name":"? Username","value":["","BoltBait","","","","sdg1","bobbybee","","","","","","","","","","","","",""]}]}
It looks like there is some duplicate data there. Sometimes I get the first (sometimes the last) list of usernames.

Why is there one list for Highscore and 3 lists for Username in the data stored online? If this is a bug, how did it happen?

Issue #4: For me, sometimes the “userid” block returns 2 and sometimes 3. This is within the same run of the program. I can't explain or predict when I will get a specific value. I'm curious what the backend database has to say about userid 1, 2, and 3. Why wasn't I assigned #1?



So far, I'm totally frustrated with Cloud Variables. If I can't find a way to make them reliable, I can't use them.

Last edited by BoltBait (Jan. 6, 2013 18:53:58)

Wes64
Scratcher
500+ posts

My view: Cloud Variables Have Problems

i have noticed some disorganization in recalling cloud data from lists. i also confirm there is a stall point where cloud data is being updated. it seems than any block connecting to the cloud data causes a slowdown.
BoltBait
Scratcher
1000+ posts

My view: Cloud Variables Have Problems

The only scripts I have that use cloud data are before the game begins and after the game ends.

No scripts access cloud data while the game is running.

Wes64
Scratcher
500+ posts

My view: Cloud Variables Have Problems

BoltBait
The only scripts I have that use cloud data are before the game begins and after the game ends.

No scripts access cloud data while the game is running.

i was just saying problems i have encountered that are similar to this
bobbybee
Scratcher
1000+ posts

My view: Cloud Variables Have Problems

BoltBait
The only scripts I have that use cloud data are before the game begins and after the game ends.

No scripts access cloud data while the game is running.


It's still getting & sending data, unfortunately
TorbyFork234
Scratcher
48 posts

My view: Cloud Variables Have Problems

I think the possibility for you getting a user id for 1,2,3 (and whatever other ones you have) is from the new formula for views. I've seen myself get 50 views (by myself) on my own project, and since the user id goes by what viewer you are, I'm guessing that's what caused it to glitch. Please correct me if I'm wrong.

EDIT: Proof for the view formula getting changed is here

Last edited by TorbyFork234 (Dec. 17, 2012 19:06:06)

Powered by DjangoBB