Storage with TinyDb

Hello, a question, I am doing a puzzle and I want to save it with tinydb, but I see that only text can be stored, can someone help me?

What do you want to save ?

Can we see a screenshot of what is to be saved?

Here is an example of saving and loading games:



Thanks for your answer, the problem with a design with canvas and sprites is that it is very difficult for it to look good on all devices, at least I don't know how to solve it

You are misusing TinyDB.

You need two tags, 'N1' and 'N2', each with the value = the image file name associated with the picture file for the image components N1 and N2 respectively.

Save the new Picture value in TinyDB each time you change N1 or N2.

Load the N1.Picture and N2.Picture values at startup from TinyDB.

1 Like

Thank you very much, I'll try it and then I'll tell you

I was able to solve it!! thank you so much !!

2 Likes