-
I have searched the internet but I have not found any information. Is there an equivalent to "localStorage.setItem" and "localStorage.getItem" that I can use in python so that pygbag can save and then load the state of a game? PS: Thank you very much for creating and maintaining pigbag |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
There's no equivalent but you can add fencing and access localStorage directly from javascript namespace like here https://pygame-web.github.io/wiki/pygbag-code/#handling-persistent-data-across-sessions. |
Beta Was this translation helpful? Give feedback.
There's no equivalent but you can add fencing and access localStorage directly from javascript namespace like here https://pygame-web.github.io/wiki/pygbag-code/#handling-persistent-data-across-sessions.
Using utf-8 json for str value should allow saving quite a lot of information.