Jump to content

I need some advice


suzy19
 Share

Recommended Posts

Hi guys, first my English is not very good. I want to create a game like https://play.google.com/store/apps/details?id=com.etermax.questions.lite.If you have that game, it's a game where you can answer multiple questions by selecting options.

I need a way to store multiple questions and download json files (with the questions) and store them in the game.

I made some simple Android applications, if I made an Android application I would use sqllite to store the questions and synchronize with the server if there are new questions.
but in phaser / html5, how could I do something like that?

Link to comment
Share on other sites

How about using a repository of your questions on a server which is used to initially download those questions.

You simply make an http request and download the json from your question server and save it locally.

All files that are saved locally can then be used for the game (to be able to play offline).

There is no need for a database if you already have the files in a readable format.

 

Phaser has a simple function for that:

let myText = this.load.json('text123', 'assets/json/text123.json');

Docu: https://photonstorm.github.io/phaser3-docs/Phaser.Loader.LoaderPlugin.html#json

 

Otherwise Javascript can read files too but it is a bit more complicated:

https://www.html5rocks.com/en/tutorials/file/dndfiles/

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...