Jump to content

User account inside app


Codenburger
 Share

Recommended Posts

Hi,

I have built a prototype for a simple game.

This game is used by parents and children.

The next stage of the app, is the ability to create a simple user account for the child, managed by the paren.

Steps:

1. The parent would create an account and input the child's name.

2. The account would keep simple data about the game and save the data to be retrieved,

the next time that the game is played.

Is this kind of thing possible in Phaser ?

Thank you to anyone who can give me advice about this.

Codenburger

Link to comment
Share on other sites

That kind of thing is possible in any modern browser independent of Phaser.

 

Look into local storage. It's easy to use, but the data can potentially be erased and you are limited to a relatively small amount of space (which differs from browser to browser and user settings) of around 5 MB.

For a more permanent solution you will need a server where the data would be stored.

Link to comment
Share on other sites

Hi horkoda,

 

Thank you, localStore is working fine with Phaser in my app.

 

I am trying to use Javascript to dynamically build a html form, which I want to pass user input to a localStore variable, for a user's name.

 

I basically want to have control of the dom using Javascript, so that I can call on a function which will act like a pop up window whenever called.

 

Codenburger 

Link to comment
Share on other sites

Dynamic form stuff is pretty easy...

var tbFirstName = document.createElement("input");tb.FirstName.name = "tbFirstName";tb.FirstName.placeholder = "Give me your name";tb.FirstName.style.top = "10px";tb.FirstName.style.etc.etc.etc;document.appendChild(tbFirstName);// later...console.log("somebody entered: " + tbFirstName.value);
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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