tryton-vanmeer / LibreTrivia

An Open Source Trivia Game for Android
GNU General Public License v3.0
33 stars 13 forks source link

feature request: offline mode #9

Open nutpantz opened 6 years ago

nutpantz commented 6 years ago

It would be great if it could be played offline. Maybe am option to pre download a large number of questions for offline.

tryton-vanmeer commented 6 years ago

Yep, caching was something I planned for the future.

lgommans commented 6 years ago

I would like this too, but it seems that the authors of the "open trivia database" are not so open as to provide a download with answers. One can browse questions, but not the answers. I also doubt that there is a revision number available, even internally in their database, to track updates per trivia question. The only way to download all questions would be to keep querying the API until you have all answers, which is terribly inefficient (it mainly creates load for them, though). To update the database, you'd have to repeat the process and string-compare each question and answer.

They mention on the forums[1] that the reason for this is that they don't want people to cheat at one of their own games, where the trivia database is apparently used. I think it's a silly excuse: an in-game trivia game, who cares if someone cheats at that? The only reason would be if it's worth in-game currency, so it's worth money... but in that case, players would just brute force the API as described above... so I don't understand why they keep this secret.

Anyway, the license permits copying of the whole database under creative commons. Liberating this (supposedly) "open" trivia database would be nice.

[1] http://forums.pixeltailgames.com/t/how-to-get-the-answers-to-the-questions/18717

Edit 1: correction, one can just use a session and keep querying to obtain the set. No brute forcing needed. I really don't see the point of not distributing the database raw...

Edit 2: code to download the database is here: https://gist.github.com/lgommans/1b766fd7a24b85f56be13b37c4400218 And the database itself: https://gist.github.com/lgommans/35ace94db2c5bf9940ea8e5743ed20ab

tryton-vanmeer commented 6 years ago

Thanks for the info @lgommans!

I'll create a local copy of the database to be included in the game. This also means removing the need for networking permissions.

WPFilmmaker commented 4 years ago

First of all thanks for creating this amazing game! Second, I totally agree with an offline mode! Internet is not available everywhere/all the time, so the ability to play it without connection (just think about long airplane trips it would be amazing!