Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to Encode/Decode
- DotDash
-
Scratcher
1000+ posts
How to Encode/Decode
I'm making a “safe” chatroom, but I need to know how to encode/decode, any help?
- fleurymarc
-
Scratcher
71 posts
How to Encode/Decode
I haven't looked at any other projects that do this, so there may be superior solutions, but I thought it was an interesting challenge, so I whipped up an encoder:
http://scratch.mit.edu/projects/11748261
The notes in the project mostly explain how it works. Let me know if you have any questions.
(I didn't include the decoder. For that, you would take the encoded text, split it up into 2-digit bundles, and look up the that item number on the encoding list.)
–
Marc.
http://scratch.mit.edu/projects/11748261
The notes in the project mostly explain how it works. Let me know if you have any questions.
(I didn't include the decoder. For that, you would take the encoded text, split it up into 2-digit bundles, and look up the that item number on the encoding list.)
–
Marc.
- AwesomeGameCreator
-
Scratcher
100+ posts
How to Encode/Decode

thanks @fleurymarc for the decoder!
I'm going to use it in one of my programs,
but should I call you fleurymarc or Mark in the credits section of the page?
Last edited by AwesomeGameCreator (Oct. 20, 2013 22:30:10)
- leahjosh
-
Scratcher
25 posts
How to Encode/Decode
I'm making a “safe” chatroom, but I need to know how to encode/decode, any help?check here http://scratch.mit.edu/projects/23616013/#player for a fast encoder that can encode a whole 70 item long list in 1.14 seconds
- JacobyJr
-
Scratcher
31 posts
How to Encode/Decode
My encoder is https://scratch.mit.edu/projects/51262342/. Hope you like it! 

- deck26
-
Scratcher
1000+ posts
How to Encode/Decode
If you're using a white list of words or phrases you don't actually need to encode or decode text - just put the item number of the list in a cloud variable using a fixed-length number. So if you have less than 100 words and phrases each can be added to the cloud variable as two digits.
So ‘230956’ would convert to item 23 from the list, followed by item 09 followed by item 56.
This will use fewer digits in the cloud variable and be quicker than encoding/decoding individual text characters.
So ‘230956’ would convert to item 23 from the list, followed by item 09 followed by item 56.
This will use fewer digits in the cloud variable and be quicker than encoding/decoding individual text characters.
Last edited by deck26 (March 31, 2015 11:38:14)
- deck26
-
Scratcher
1000+ posts
How to Encode/Decode
JacobyJr, your encoder isn't shared.It might have been shared a year ago when this topic was current

- Discussion Forums
- » Help with Scripts
-
» How to Encode/Decode







