question

dmasubuchi avatar image
dmasubuchi asked

In Login Scequence, Please tell about good reference

Let me ask you a question about the sequence at application startup.

I am thinking of dealing the sequence when Game app start. The game is mobile native app.

Could you give some advice around API or case study on the sequence?

Sequence

1) Account check with deviceID/Facebook ID

Which API is the best to check the account is new or existing, before login-scequence.

Which is the best to store account information on to game client or server(PlayFab) , or Should we store the information onto both side?

2) When user logi-in

Design login function with LoginWithIOS (Android) Device ID or Facebook account

If the application is new to start, AccoutCreate flug will set to TRUE. is it correct understanding?

3) Set the initial parameters of the player account when logging in for the first time

The Player parameter will set by Cloud Script

Is it good design? If the initial parameter is randamized, I think CloudScript is needed.

4) PlayFab will receive player account data

Please tell me how to select between, Player Data(Title), Player Data (Read Only), Object, etc...

Also, if there is good explanation about object programing compare to clasic model, please share it.

apis
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Seth Du avatar image
Seth Du answered

    1. Any PlayFab Client API will require session ticket or entity token in the header for verification. Only login related API doesn’t require one, which means clients cannot access any PlayFab service without login. Simply set the property “CreateAccount” as false in the request of Login API should do the job. If the account is not existed, failure callback will be returned. Please note that if CreateAccount is set as True, PlayFab will automatically create new account if it is not existed.

    In addition, the callback result of login API will contain a property "NewlyCreated", which indicates if this login call has created a new account.

    The login identity will be linked to the account on PlayFab. You may store a local copy of the login information in the devices. However, we recommend linking a recoverable login method. PlayFab documentation website provide a detailed explanation on authentication: https://docs.microsoft.com/en-us/gaming/playfab/features/authentication/login/

    2. Yes

    3. Yes. You may also use Rules with Cloud Script to do the setup job automatically for players. When a title player account is created, PlayStream Event "player_added_title" will be generated, which can be used as a trigger of Rule, to execute Cloud Script for initialization. In the script function, pre-defined varibale "currentPlayerId" can be used to get the target player's ID.

    4. There are many resources on PlayFab for data storage. For example.

    • Title Data. Client API can only read it. Only Server/Admin API has the permission to update. It is shared globally.
    • Player Data. There are 3 types of Player Data, which are Player Data, Player Read-Only Data, Player Internal Data. Client API will have the permission of read/write on Player Data. The other 2 will need Server/Admin API. All of them have a permission to set it public/private. Basically other players can get those public data as long as they keep a PlayFab ID. You may see there are 2 tabs in Player's page of Game Manager. For Player Data (title), all the belonging data is title-specific, meanwhile for Player Data (Publisher), it can be shared between titles (but must be within the same studio). it is because a Master Player Account is shared between titles within the same studio. Players are able to login in different titles within the same studio via the same identity and Player Data (Publisher) is the shared data in the studio.
    • Objects. It belongs to the new Entity Data Model, the use scenario is similar to Player Data but controlled by the Entity Policy. The Read/Write permission can be modified. In some scenarios, small group of players can modify one Object, like Group Objects. However, please understand that you shouldn't use any resources for multiple read and write at a short time. If it is required, you may consider using external database, like Redis.
    10 |1200

    Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

    Write an Answer

    Hint: Notify or tag a user in this post by typing @username.

    Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.