Discuss Scratch

APGTswaggy
Scratcher
31 posts

I can't find out how to test my game with cloud data!

(boohoo help me please!)

Every time I try to test my game, it automatically says: not connected, when I have another account which is “Scratcher” that is connected! I want this game to work! Please help! It would make me so happy! Here is the link to my game: https://scratch.mit.edu/projects/147487834/

Last edited by APGTswaggy (Feb. 28, 2017 05:37:29)

TheMgamer206
Scratcher
9 posts

I can't find out how to test my game with cloud data!

i think it's because you can use cloud data when you are a scratcher but not a new scratcher
(☁ score)
deck26
Scratcher
1000+ posts

I can't find out how to test my game with cloud data!

APGTswaggy wrote:

(boohoo help me please!)

Every time I try to test my game, it automatically says: not connected, when I have another account which is “Scratcher” that is connected! I want this game to work! Please help! It would make me so happy! Here is the link to my game: https://scratch.mit.edu/projects/147487834/
You appear to be a Scratcher now, have you tried it again?
TheLogFather
Scratcher
1000+ posts

I can't find out how to test my game with cloud data!


How to Set Up the “cloud check” Variable on the Scratch Wiki Multiplayer Page


The page on the Scratch Wiki about “Creating a Multiplayer Game” makes use of a variable name named “cloud check”.

Unfortunately, it doesn't correctly explain how it should be set up – all it says, in a script comment is “set to 1”. This is missing some important information about what you really need to do, which is to give it *two* different values in two places – one value is in the project when you save it to the Scratch site [so that's the value that first gets downloaded when someone goes to the project], and the other different value is in the cloud [which gets retrieved when the online Scratch player connects to cloud right after it has finished loading the project, assuming the user is signed in and not a New Scratcher, and cloud is working fine].


The key things about the variable are as follows:
  • Every time you save the project, you must ensure it is set to zero.
  • Every time the project has completely finished saving, you should manually change it to one – but *without* the project saving again.
The above will ensure that it has the value zero in the project you uploaded, while it will have the value one in the cloud. It's only a full Scratcher who will see the value one (assuming cloud is working correctly), while a New Scratcher (or someone not signed in) will not connect to cloud, and so will only see the value zero from when you saved the project.


However, Scratch's autosave function makes it tricky to do the above – it's not straightforward to ensure it will have value zero every time the project gets saved, nor that the value gets switched to one in the cloud (and *only* in the cloud) once the project has finished saving. So read on for some tips about that…

__________________________________________________________________________________



How to take control of autosave, and prevent the wrong value getting saved


I usually do this in my own projects by having some way to control it with key presses, or something.

For example, I would have a couple of scripts in some sprite that has no clones (to avoid problems with multiple clones all running it together), or in the Stage (in which case use something other than “say” to show status), that look like this:
when [0 v] key pressed // press zero when you want to make edits to the project
if <(username)=[TheLogFather]> then // ensure only the project owner can do this...
stop [other scripts in sprite v] // want to ensure everything has stopped
broadcast [stop all scripts in all sprites v] and wait // other sprites should respond by stopping their scripts too
ask [Edit your project and dismiss this ask prompt when ready to save...] and wait // prevent autosave while editing
set [☁ cloud check v] to [0] // the test variable needs to be zero when project is saved
say [Checking if cloud has worked...] for (2) secs // should allow ~2 seconds to see if it changes back
if <(☁ cloud check)=[0]> then // Did it work?
say [Ready to save -Press "1" after project has saved.] for (3) secs // Yes! -Can save project now
else
say [Failed! -Try again. If it keeps happening reload the project...] // No... (may mean disconnected)
end
end
when [1 v] key pressed // press one *after* the project has saved
if <(username)=[TheLogFather]> then // ensure only the project owner can do this...
if <(☁ cloud check)=[0]> then // The test variable should be zero at this point. If not... :/
set [☁ cloud check v] to [1] // Try to reset the test variable to one in the cloud
say [Checking if cloud has worked...] for (2) secs // should allow ~2 seconds to see if it changes back
if <(☁ cloud check)=[1]> then // Did it work?
say [All done! :)] for (1) secs // Yes! -The cloud test is all set up now!
else
say [Failed! -Try again. If it keeps happening reload the project...] // No... (may mean disconnected)
end
end
end
(You might want to replace the “say” blocks with some other way to indicate the status –for example, showing a variable with the info text, and hiding it once the two seconds is up, etc. You must do that if you put the above scripts in the Stage, which is a decent place for them.)

Yeah, it's a bit complicated, but I hope it makes some sense if you read it through carefully!

Last edited by TheLogFather (July 25, 2018 13:20:08)


Siggy the Kumquat slayer:
Main account: DadOfMrLog –– Frameworks for basic pen-rendered 3D in scratch (see studio). Examples:

- - - - 3D Text - - - - - - Simple shapes - - - Controllable structures - - - On the ground - - - - - - In space - - - -

APGTswaggy
Scratcher
31 posts

I can't find out how to test my game with cloud data!

deck26 wrote:

APGTswaggy wrote:

(boohoo help me please!)

Every time I try to test my game, it automatically says: not connected, when I have another account which is “Scratcher” that is connected! I want this game to work! Please help! It would make me so happy! Here is the link to my game: https://scratch.mit.edu/projects/147487834/
You appear to be a Scratcher now, have you tried it again?




I did this game once i became a scratcher, it is just that i can't find out how to test if my cloud check works!
APGTswaggy
Scratcher
31 posts

I can't find out how to test my game with cloud data!

TheLogFather wrote:

You haven't understood how your “cloud check” variable gets used to test for cloud connection. Until you understand the details of how that works, you will keep having problems with this.


The key things about it are as follows:

1) Every time you save the project, you must ensure it is set to zero.

2) Every time the project has been saved, you should manually change it to one – but *without* the project saving again.


I usually do this in my own projects by having some way to control it with key presses, or something.

For example, I would have a couple of scripts, in some sprite that has no clones (to avoid problems with multiple clones all running it together), that look like this:
when [0 v] key pressed // press zero when you want to make edits to the project
if <(username)=[APGTswaggy]> then // ensure only YOU can do this...
stop [other scripts in sprite v] // want to ensure everything has stopped
broadcast [stop all scripts in all sprites v] and wait // sprites should respond by stopping their scripts too
ask [Edit your project and dismiss this ask prompt when ready to save...] and wait // prevent autosave while editing
set [☁ cloud check v] to [0] // the test variable needs to be zero when project is saved
say [Checking if cloud has worked...] for (2) secs // should allow ~2 seconds to see if it changes back
if <(☁ cloud check)=[0]> then // Did it work?
say [Ready to save -Press "1" after project has saved.] for (3) secs // Yes! -Can save project now
else
say [Failed! -Try again. If it keeps happening reload the project...] // No... (may mean disconnected)
end
end
when [1 v] key pressed // press one *after* the project has saved
if <(username)=[APGTswaggy]> then // ensure only YOU can do this...
if <(☁ cloud check)=[0]> then // The test variable should be zero at this point. If not... :/
set [☁ cloud check v] to [1] // Try to reset the test variable to one in the cloud
say [Checking if cloud has worked...] for (2) secs // should allow ~2 seconds to see if it changes back
if <(☁ cloud check)=[1]> then // Did it work?
say [All done! :)] for (1) secs // Yes! -The cloud test is all set up now!
else
say [Failed! -Try again. If it keeps happening reload the project...] // No... (may mean disconnected)
end
end
end
(You might want to replace the “say” blocks with some other way to indicate the status –for example, showing a variable with the info text, and hiding it once the two seconds is up, etc.)

Yeah, it's a bit complicated, but I hope it makes some sense if you read it through carefully!



THANK YOU SO MUCH! Yaaay! I understand everything. It is just that I couldn't find a way to test my game out, and thank you for showing me how!

Last edited by APGTswaggy (Feb. 28, 2017 23:45:47)

APGTswaggy
Scratcher
31 posts

I can't find out how to test my game with cloud data!

TheMgamer206 wrote:

i think it's because you can use cloud data when you are a scratcher but not a new scratcher
(☁ score)

well, I already am a scratcher
CccYyy
Scratcher
44 posts

I can't find out how to test my game with cloud data!

Happy your problem got solved. Have a good day!

I can't wait till Scratch 3.0! - CccYyy
HELLO!!
Add custom blocks with inputs like this one:
choose choices [choice1 v] [choice9 v] [choice12 v]
Scratch is the easiest way to code ever! Everyone should try scratch out. They do not know how much fun they will have. - CccYyy
Bye!
Peterstar2008
Scratcher
6 posts

I can't find out how to test my game with cloud data!

… this makes sense now…

Last edited by Peterstar2008 (Jan. 22, 2018 13:56:28)

deck26
Scratcher
1000+ posts

I can't find out how to test my game with cloud data!

Peterstar2008 wrote:

How did you put letters in the cloud? did you hack it?
You have to encode letters as numerical data. See the wiki page on Global High Scores for example.

Better to create your own topic rather than necroposting.
chariZARD140
Scratcher
3 posts

I can't find out how to test my game with cloud data!

ok EVERYTHANG EVER makes sense now no sarcasm intended thanks
1ScrachMaster
Scratcher
19 posts

I can't find out how to test my game with cloud data!

I tried to make a cloud multiplayer game and for some reason it doesn't work. I don't think it is the code. I think it might be because my computer can't connect to the scratch server. It might work I just don't know how to test it. Here is the game https://scratch.mit.edu/projects/341438867 please tell me what you think is wrong with it.

when green flag clicked
repeat until <the cloud multiplayer works>
help the cloud multiplayer to work
end

Last edited by 1ScrachMaster (Nov. 3, 2019 21:35:40)

deck26
Scratcher
1000+ posts

I can't find out how to test my game with cloud data!

1ScrachMaster wrote:

I tried to make a cloud multiplayer game and for some reason it doesn't work. I don't think it is the code. I think it might be because my computer can't connect to the scratch server. It might work I just don't know how to test it. Here is the game https://scratch.mit.edu/projects/341438867 please tell me what you think is wrong with it.

when green flag clicked
repeat until <the cloud multiplayer works>
help the cloud multiplayer to work
end
Please create your own new topic rather than necroposting.
DJIdris
Scratcher
27 posts

I can't find out how to test my game with cloud data!

deck26 wrote:

APGTswaggy wrote:

(boohoo help me please!)

Every time I try to test my game, it automatically says: not connected, when I have another account which is “Scratcher” that is connected! I want this game to work! Please help! It would make me so happy! Here is the link to my game: https://scratch.mit.edu/projects/147487834/
You appear to be a Scratcher now, have you tried it again?

set [cloud cleverness v] to [0]
i have been on for 2 weeks and i need to know more about cloud, can you help me?

this is my siggy protector
^.^ :: #54e3ff
he protects my signature from evil kumquats
“You can do anything if you focus.”
Why not go HERE?
Or here because it doesn't take a long time to press a juicy blue button that shows that you care

DJIdris
DJIdris
Scratcher
27 posts

I can't find out how to test my game with cloud data!

i have been on for two weeks. i cant use cloud and i dont know what to do. i am still new to scratch and i need advice

this is my siggy protector
^.^ :: #54e3ff
he protects my signature from evil kumquats
“You can do anything if you focus.”
Why not go HERE?
Or here because it doesn't take a long time to press a juicy blue button that shows that you care

DJIdris
DJIdris
Scratcher
27 posts

I can't find out how to test my game with cloud data!

show variable [i am not a variable v]

Last edited by DJIdris (April 23, 2020 15:45:11)


this is my siggy protector
^.^ :: #54e3ff
he protects my signature from evil kumquats
“You can do anything if you focus.”
Why not go HERE?
Or here because it doesn't take a long time to press a juicy blue button that shows that you care

DJIdris
deck26
Scratcher
1000+ posts

I can't find out how to test my game with cloud data!

DJIdris wrote:

i have been on for two weeks. i cant use cloud and i dont know what to do. i am still new to scratch and i need advice
Please create a new topic when you want help. Your status is currently ‘New to Scratch’ so cloud variables are not available to you. Be more active - create and share projects, like/favorite other people's projects etc - and you'll soon get Scratcher status.
DJIdris
Scratcher
27 posts

I can't find out how to test my game with cloud data!

th

deck26 wrote:

DJIdris wrote:

i have been on for two weeks. i cant use cloud and i dont know what to do. i am still new to scratch and i need advice
Please create a new topic when you want help. Your status is currently ‘New to Scratch’ so cloud variables are not available to you. Be more active - create and share projects, like/favorite other people's projects etc - and you'll soon get Scratcher status.

thank you how many projects do i need???

Last edited by DJIdris (April 23, 2020 17:43:51)


this is my siggy protector
^.^ :: #54e3ff
he protects my signature from evil kumquats
“You can do anything if you focus.”
Why not go HERE?
Or here because it doesn't take a long time to press a juicy blue button that shows that you care

DJIdris
Tairan
Scratcher
49 posts

I can't find out how to test my game with cloud data!

DJIdris wrote:

th

deck26 wrote:

DJIdris wrote:

i have been on for two weeks. i cant use cloud and i dont know what to do. i am still new to scratch and i need advice
Please create a new topic when you want help. Your status is currently ‘New to Scratch’ so cloud variables are not available to you. Be more active - create and share projects, like/favorite other people's projects etc - and you'll soon get Scratcher status.

thank you how many projects do i need???
The wiki says 2.
EDIT: Oh wait you're already scratcher
EDIT 2: I reported my post for removal, to prevent necroposting.

Last edited by Tairan (June 27, 2020 09:27:05)


when I receive [TaiOS collaborations]
download [apps] to [List-based hard disk(TaiOS File System)]
add [features] to [next version]
If you want to collaborate, go to https://scratch.mit.edu/discuss/topic/417860/
DJIdris
Scratcher
27 posts

I can't find out how to test my game with cloud data!

Tairan wrote:

DJIdris wrote:

th

deck26 wrote:

DJIdris wrote:

i have been on for two weeks. i cant use cloud and i dont know what to do. i am still new to scratch and i need advice
Please create a new topic when you want help. Your status is currently ‘New to Scratch’ so cloud variables are not available to you. Be more active - create and share projects, like/favorite other people's projects etc - and you'll soon get Scratcher status.

thank you how many projects do i need???
The wiki says 2.
EDIT: Oh wait you're already scratcher
EDIT 2: I reported my post for removal, to prevent necroposting.

Dude im a scratcher now so chill

this is my siggy protector
^.^ :: #54e3ff
he protects my signature from evil kumquats
“You can do anything if you focus.”
Why not go HERE?
Or here because it doesn't take a long time to press a juicy blue button that shows that you care

DJIdris

Powered by DjangoBB