What should be added
In many programming languages, text-based and visual, there is some way to save data between code execution sessions - in other words, you can take a variable, and somehow save it for “next time”. In some cases, this is through file IO - saving your data in a
.json file or something similar. In others, you can save data through simple methods that save or retrieve a piece of data with a key, or “name”.
Hopscotch lacks anything like this. In other words, Hopscotch variables are per-session. Nothing can be saved or retrieved at a later time. This can be very limiting for things like games, where you might want to save a player’s high score. Or maybe you want to save some parameters in a tool or simulation.
To solve this issue, I’m proposing “saved” or “persistent” variables. These are variables that will keep their value, even when you exit a project. This will allow for things like high scores, or saving a whole game state for later.
Just to clarify, saved variables will be local. They don’t go to anyone else, they are just on your device.
Saved variables could be saved in a
.json file, or another data format, along with the project. This way, when a project is duplicated, deleted, or something else, the saved variables go along with it.
When a saved variable is created, it would get a random, unique ID, which would be used to reference its value in the save file. This way, if you delete a variable, then create a saved variable with the same name, it won’t get the value of the variable before.
Also, a way to access and modify these values in project drafts could be nice, for things like beta-testing.