Scratch Cloud Variables: Learn to Encode and Decode Text Using Numbers
HTML-код
- Опубликовано: 5 авг 2024
- Curious about Scratch cloud variables? Well check out this tutorial that introduces you to them. We’ll learn what they are and how to encode and decode text values to the cloud.
Educators, get news and resources sent straight to your inbox here: bit.ly/SurfSubscribe
--------------------------------------------------------------------------------------------------------------------------------
🔗🔗🔗 LINKS 🔗🔗🔗
➡️Scratch Project: scratch.mit.edu/projects/3652...
➡️Scratch Cloud Variables: en.scratch-wiki.info/wiki/Clo...
➡️Scratch Website Cloud Data FAQs: scratch.mit.edu/info/faq#clou...
➡️Sparkfun HEX Explainer and Conversion : learn.sparkfun.com/tutorials/...
--------------------------------------------------------------------------------------------------------------------------------
🙏🙏🙏 SUPPORT 🙏🙏🙏
➡️PATREON: / surfingscratcher
➡️MAILING LIST: bit.ly/SurfSubscribe
👕👚TEE I’M WEARING - : shrsl.com/1qyee
Surfing Scratcher receives a percentage of the purchase price when you make a purchase through some of these links.
--------------------------------------------------------------------------------------------------------------------------------
🛒🛒🛒SHOP 🛒🛒🛒
Educators and teachers, you can find unplugged lessons, resources and activities to purchase for this tutorial series on my website here:
➡️Educational Resources: www.surfingscratcher.com/shop/
➡️Browse my Teachers Pay Teachers Store: bit.ly/2Tq45lH
--------------------------------------------------------------------------------------------------------------------------------
👻👻👻 SOCIAL MEDIA 👻👻👻
➡️Scratch: scratch.mit.edu/users/surfing...
➡️Website: surfingscratcher.com
➡️Like my Facebook Page: bit.ly/2HnR1Gg
➡️Subscribe to my RUclips Channel: bit.ly/2TDtqI3
➡️Follow me on Instagram: bit.ly/2NWlxZe
➡️Follow me on Pinterest: bit.ly/2CdKIl5
--------------------------------------------------------------------------------------------------------------------------------
📝📝📝 VIDEO DESCRIPTION 📝📝📝
--------------------------------------------------------------------------------------------------------------------------------
❓🤔❓ WHAT IS SURFING SCRATCHER? ❓🤔❓
Surfing Scratcher wants to show learners, students, educators and teachers how to learn mathematics through coding games online with Scratch 3 programming projects. Whether you are a Scratch beginner, or you're an educator wondering how to use Scratch in your classroom or looking for lessons & resources for your classroom, Surfing Scratcher is here to help you on your journey.
--------------------------------------------------------------------------------------------------------------------------------
⏯ ⏯⏯PLAYLISTS ⏯ ⏯⏯
bit.ly/2J1q5i3
--------------------------------------------------------------------------------------------------------------------------------
#scratch #scratchtutorials #howtocode
If you add a script that checks if the item in the list is less than 10, then if so puts a 0 in front, you wouldn't need to worry about not using the first 9 items in the list.
Ex. the letter 'A' is in the first slot in the list. Instead of writing '1' to the output, it would write '01.' That will then be read by the decoder as just the number 1.
It's a good method but starting by 10 is much easier 😉
'Have you been dreaming, of, Scratch cloud variables?' Yes.
Hehe then your subconscious mind is well at work to finding you solutions!
Wow. This is SO helpful! Thank you so much!
Pumped that you found some value in the video Thomas :)
Thank you! I will use this in my live scratch chat room! I will give credit!
chatrooms are disallowed, F
The Scratch Team will remove any shared chat room projects.
The only exception for chatrooms is if you make a list of whitelisted people to chat with
i loved this
AWESOME
Awesome hack!!!
It isn't a hack
im using this for my read people's notes game which i will include in my game console
can you save the samevariable in diferent projects? like if i wanted to make 1 project on my acount and one on a freands and save the variable on both so i cold send mesages between?
0:47 alien creak
bruh this was so much more simple than i thought id be
Glad that it helped, Ashton. Thanks for sharing :)
me who already made an encoder and decoder without any help or instructions: Hmm, very helpful.
I'm finally a Scratcher!!!
I can use Cloud Variables now!!!
So I had a problem that you might have gotten a notification for but I realised what the join operator does and fixed it (thanks to your video ofc) I thought I was gonna have to make a new block but I didn't
I did anyways lol
but I can't make a cloud variable, the check box doesn't appear, how do I fix this? nevermind I figured out that i'm still a new scratcher even tho I've had a scratch account for over 3 years, but it makes sense because i forgot my password and had to make a new one.
I feel so smart for figuring this out myself but I know how simple it actually is lmao
Great job on figuring it out yourself! That's absolutely epic. The next step after that is to just make it more efficient :) Thanks for sharing, William
lol same
Noice, I learnt a lot, yet i'm working on a cloud game (lenny) i needed help with the decoder. Thanks! :D
Same I didn't know the encoding
yes i have
yes
Whenever I press encode, it gives me the number, but there is a zero in the front, and when I decode the number, it would give me mxxb. When that is not my username
SCRATCHY QUESTION: Why couldn't we use the first 9 spots in the CHAR_LIST list variable?
The first 9 numbers don't have 2 digits, and therefore, can't work when counting by 2.
@@Judeinator9001 Swoosh! 🙌
Judeinator9001 Awesomeness bruh this dude didnt watch the full vid did he xD
It is actually possible to use the first 9 spots in the CHAR_LIST list variable by adding an if then set add to (join (0) (add) (you would need to create an add variable which is what you would set tempUsername to instead of (letter (i) of (username)) in [CHAR_LIST]. I hope this makes sense, if not please tell me why (I can't tell).
Hi @@fyrdiamond7506 , thanks for posting your solution. I think I'm on the same train of thought with your thinking, but I think the problem is reading the variable back from the cloud. From my experience, a number starting with 0 just removes the 0 so you'd never be sure if we're referring to the 2-digit number or the 1-digit number. So to read the cloud variable 1234 would the 1 refer to 01 and the next number be 23, or would it refer to 12? How would we be able to distinguish between a number that is 12 and a number that is 01?
Curious to hear your thoughts. Love that you've put in some thinking regarding this, and I may well not be on the same page with your thinking!
Hello why there cant be any spaces in text?
i'm having a problem it first put's my username then it put's the random numbers
Can you make a video on encoding that works with capital letters?
Hi and thanks for your suggestion. A scratcher came up with a solution that uses costumes. You can name costumes with a capital of the letter you're interested in and assign the variable the costume name.
Can you please jute a link for the CHAR_LIST file
Click the show more link in the description for the scratch file.
Umm when you use letter __ of username it only lets me add numbers
it didn't work for me :(
i cant decode though
When I tried to make the decoding part the answer became nothing
scratch.mit.edu/projects/429749500/
it uses 1 cloud variable to save and load 3 different lists (sorry if the code sucks, but atleast is works)
it saves encoded codes into a cloud variable, so for example:
it has 3 lists, encodes each list into 3 different variables
then it takes those variables and encodes that and turns it into 1 long string of numbers and then decodes that into 3 different variables again so basically its double encoding
i beat the top score but it didnt save rip
I do see most high scores logging. However, I'm aware some scores haven't been logged. Any ideas for possible causes?
I'm thinking two possibilities (of course there could be more): closing the window too quickly not allowing for Scratch to autosave the variable. I don't think it does an automatic push to the cloud once the variable is changed.
Second, the game was played using 'See Inside' or remix, which would create a clone of the game and not log the high score on the master copy.
Also, beating 2.8 seconds is a huge effort! That's some epic typing my friend :)
@@SurfingScratcher i played it from the main menu! However, after I beat the record, and reloaded the page the top name variable was just "reset" and the top time hadn't changed. Although I am not sure of the reason, I believe it may be because scratch apparently limited cloud variables:scratch.mit.edu/projects/46587498/#comments-137475092
if you look into the notes there, it states " I'm terribly sorry because I know how popular this game is. Cloud variables have been restricted so that we can no longer use them for high score tables, achievements, questionnaires, per user voting or game levels like this one :("
im not sure how correct that is though. Btw. it took me an hour and i only got like 0.5 less XD. I closed the tab after waiting for like 1 minute. So honestly, I don't have much of a clue :/
Can i call Youtu.be channel from scratch project?
Scratchy question:
You break up the decoded data to the next 2 digits. If it is only 1 digit it will take the next one too.
When I search for scratch tutorials, I instantly click your videos once I see you made the video
btw my scratch username is WhyWhyCheese and yes I know its a cringe name anyways pls check out the game I'm working on called No!MoreEvil
Hi Gian, thanks for your lovely comment. If you post a link to your game on my Scratch profile, then I'll have a look when I'm on Scratch next ✌️
Im having trouble with my cloud variable, I want to store the name of all the people that played but after 7 people the cloud variable breaks and stops storing data! Why does that happen? Is there a characters limit in cloud variables? Help :(
Hi Pedro, thanks for your comment. You've stumbled upon something that I didn't include in the video that will be of use to others. Here's from the Scratch Wiki:
"A character limit of 256 digits[4] per variable has also been implemented (formerly 128 digits). Hexadecimal numbers are no longer supported."
en.scratch-wiki.info/wiki/Cloud_Data
@@SurfingScratcher Yeah, I ended up realizing that... so I just managed to make the game work with 10 cloud variables for data storage xD. If you are curious about the game or the code check it out scratch.mit.edu/projects/372371947/
I'm trying to show my friend how this works but I copied this exactly after it not working and it still didn't!
Great for trying it out. Now it's onto debugging! Let's isolate the problem. As you're working through the tutorial, at what point does it not work?
My cloud variables aren't saving
You might not be a scratcher, or if you have a chunk of them with sets that doesn’t normally work
Also if you have when start is clicked change the variable to ____ that would be why
a space does not work
Don't worry, a username can't be write with spaces.
aussey
this is 69th comment
I just realized im not a scratcher ;(
It won't take too long before you are :)
@@SurfingScratcher Thank you
decoding doesnt work
Hi Marz, thanks for posting your comment. It can be a tricky process. Have you checked out the starter project? You can test out to see it works through remixing it. I know it doesn't encode capital letters. Another user has remixed a version that utilised costumes to do that. Let me know how you get on :)
@@SurfingScratcher when i said that i forgot to place 1 block
Haha ruining 69 comments