This is a solid first version of a system designed to transfer relatively large amounts of data between users through Scratch cloud variables. The protocol currently behaves somewhat like UDP: it sends data without checking whether the receiver successfully received it. It does not currently provide acknowledgements, retransmissions, or guaranteed delivery. Important: the current code is experimental, not cleanly structured, and NOT production-ready. It is mainly a proof of concept. How it works The system starts with a message and adds a header: Username £ Destination £ The destination field is already part of the protocol, although destination-based routing is not currently functional. The complete message is then split into chunks of 200 characters or fewer. The 200-character limit is intentional, even though Scratch cloud variables support up to 255 characters, in order to keep a safety margin. The header is included in every chunk, from the first chunk to the last. For every chunk except the last one, the structure is: Header + Message Chunk + Modulo The modulo information is generated from the encoded data and is used to handle cases where repeated data occurs in the message. The last chunk uses a special 00 marker instead: Header + Message Chunk + 00 The 00 marker tells the receiver that this is the final chunk and that the transmission is complete. ### Encoding Each chunk is encoded using token positions and their UTF positions. The encoding uses information based on: Len(UTF(token position)) + UTF(token position) The encoded length and the list-length modulo information are used to preserve the structure of the encoded data and allow the receiver to decode it correctly. #Example A multi-chunk transmission looks conceptually like this: text Header + Data 1 + Modulo Header + Data 2 + Modulo Header + Data 3 + Modulo Header + Data 4 + 00 Every chunk contains its own header and remains within the 200-character limit. The receiver processes each chunk, decodes the data, and reconstructs the original message. When it receives the `00` marker, it knows that the transmission has ended. ### Current protocol behavior text Message ↓ Split into ≤200-character chunks ↓ Add header to EVERY chunk ↓ Encode each chunk ↓ Add modulo ↓ Send through Scratch cloud variables ↓ Receiver decodes and reassembles ↓ 00 = End of transmission The current implementation is therefore a lightweight, UDP-like data-transfer system built entirely around Scratch cloud variables. A future version could add TCP-like features such as acknowledgements, retransmission, packet validation, and reliable delivery. Data By Matt-38 Text By GPT5.6 - Luna