Tiny DB save game

Hello.

I have a bingo style game that can’t be completed in one day. I want to be able to have users go back next time they open the app to where they left off. Is there a good tiny dB tutorial someone could point me to.

Thanks,

Rick

TinyDB tutorial by Stephen
protip: use the search feature of the community to do a search yourself…

A very good way to learn App Inventor is to read the free Inventor’s Manual here in the AI2 free online eBook http://www.appinventor.org/book2 … the links are at the bottom of the Web page. The book ‘teaches’ users how to program with AI2 blocks.
There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro and the aia files for the projects in the book are here: http://www.appinventor.org/bookFiles
How to do a lot of basic things with App Inventor are described here: http://www.appinventor.org/content/howDoYou/eventHandling .

Also do the tutorials http://appinventor.mit.edu/explore/ai2/tutorials.html to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

I know the basics. I just need to learn how to save a game card on tiny db. The tutorials on how to use tiny db don’t apply to what i;m doing.

Please clarify that in more detail. And show what you've tried so far, so the (relevant) blocks ...

There's a very small chance that you will find the exact tutorial for exactly the same thing you are doing. TinyDB basically do 2 things: Save a value in a tag and retrieve it. So there's not much to it. Have you tried something? Why it didn't work?
Maybe you can save in a tag a list of lists with the numbers and a true or false value next to it depending if the user has that number checked or not?

I know this is not right. It’s the best I could take from another tutorial.

So I guess each number is a button? And if it has the redmark.png image in it then it means the user has than number checked. Right?

Correct each image is a button that turns to a redmark when pushed.

Then you can save in a tag named Button1 the image you have in button 1.
When you have to read back what button one should have, just set button 1 image to whatever is in the tag button 1.
And so on for all the buttons.

Thank you. You’re awesome. I owe you a beer

1 Like

Make it a Coke Zero. :grin:

I did this but I can’t test it in the companion. How would I test this to see if it works before I do the rest?

You said up there you know how TinyDB works but by what you are showing, I don’t think that’s the case. :neutral_face:

Do this to save Button 1 state.

image

And this to retrieve it:

image

Italo,

I’m sorry if I misspoke. I understand basic coding. I didn’t know anything about tiny dB. Your solution works perfectly. Thank you. I owe you a Coke Zero.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.