Recently I was playing around with the blocks when I realized the idea for a save code system that allows the user to save a game while playing it. I built the original project with scratch since it was a little bit simpler and easier for me to check the lists in which the data would be stored. When I was done I made a version of the project translated into MIT app inventor.
I'm gonna explain how the save code system works as simply as I can.
The save code reader takes the input from the textbox and breaks it up into chunks. let's have the imaginary save code of 71234567269
the save code reader will break the save code into the chunks of 7[1234567] 2[69].
notice that there are 7 numbers in the section that comes after the 7 and 2 numbers in the section that comes after the 2. the save code reader looks first at the beginning number and repeats the collecting data from the next numbers that the beginning number says to. For example, if the first number is 7 then the save code reader collects data for the next 7 numbers. the rest of the script takes that data and stores it in a list for the app to later use.
the save code generator takes the data that is within the list that has at the point of saving has hopefully been changed and puts it in front of the length of the data. it then combines that with the save code that has been collected so far. for example, if the first item in the list was 1234567 and the second item in the list was 69 it would first look at the length of the first item of the list which is 7, and combines the two, does the same for the second item, and joins the two items together. this causes the new save code to be 71234567269.
If you have any questions about the save code generator or the save code reader, I will be happy to answer them