Search Unity

New User account creation. Save locally on device?

Discussion in 'Getting Started' started by Sparticus, Dec 1, 2020.

  1. Sparticus

    Sparticus

    Joined:
    Mar 15, 2014
    Posts:
    149
    Hey all,

    When a new player installs your game and loads it up for the first time, what is considered the standard for new account creation? Should I bother them with "Sign In" or "Register" buttons (an account is required to play the game)... or do I just let them go straight into the game and then save all their game progress locally on their device?

    The game I am making is a longer term game where their progress in the game will need to be tied to an account. What I was thinking of doing was (on first load) was get the game to make as request to the server for a new unique player id (a very long hash). That id then would be saved on the players device. Any time data needs to be saved, it would pass that unique id to the server along with the dat to be saved into the database.

    I understand that does mean the player would be tied to the device and couldn't log in elsewhere. I could easily add something to create an account after they fact and that hash then tied to a username/password.

    What are your thoughts? I am not familiar what is considered the best practice here.

    Thanks!
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    You should let them play right away. If I download your game and the first thing it requires is creating an account, the next thing I do is quit and delete that app.
     
    Ryiah, Joe-Censored and Vryken like this.
  3. Vryken

    Vryken

    Joined:
    Jan 23, 2018
    Posts:
    2,106
    I'd say it depends on the game and the type of data being saved.
    Generally, any data that's account-sensitive (email, password, etc.) needs to be saved server-side always.

    Game-related data can vary though. Is this a single-player or online-multiplayer game?
    If it's single-player, then there's really no harm in saving game progress locally. If players want to cheat and modify their progress, they're not affecting anyone else. Saving progress server-side could then be used as a backup.

    A big point here if this is a single-player game: Requiring an account will likely immediately turn away users, like @JoeStrout mentioned above.

    If this is an online-multiplayer game though, then yes, I'd see why progress would need to be saved server-side and tied to an account. However, again like @JoeStrout mentioned, you could ideally let your players be able to play without an account, which could be treated as a "Guest" account. The "Guest" account wouldn't save any progress, and its only purpose would be to let players experience the game first to allow them to decide if they like it and actually want to make a real account.
     
    Ryiah and JoeStrout like this.
  4. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    I think there's a big difference between a small indie game resembling Candy Crush requiring an account login and something like World of Warcraft doing so before playing.

    If a major conceit of your game is reliant upon online functionality, whether it's multiplayer, live content, or something similar, then I think it's okay to require a login/account creation. However, you want this to be as frictionless as possible. Don't have fields in there that might make the user wonder why you're collecting that info (your game doesn't need their real name, date of birth, etc), and don't have extra steps like awaiting confirmation of email if at all possible.

    If your game is only using online functionality for things like posting scores or for asynchronous features, consider having the game function normally without this enabled and allow them to set up the account only when they're attempting to use that feature (such as after completing a level or when attempting to start an online game). It's really up to you and I wouldn't say there's a "best practice" firmly established, but the rule of making things as easy and friendly to your user as possible is a good one to follow.
     
    Ryiah and Joe-Censored like this.
  5. Sparticus

    Sparticus

    Joined:
    Mar 15, 2014
    Posts:
    149
    The game isn't really single player. It's a tower defense game where you compete against others. It's not multiplayer in the sense though that you compete in real time. You play on your own and your scores are sent to the server. There is leaderboards, friendlists, a store... all the normal mobile game stuff.

    So I do need to save their details server side as I want to minimize cheating as much as possible. But like you mentioned, no one likes to register accounts.

    Sounds like a good approach would be to let them join without registering... I'll auto-create them an account on the server based on a unique id I give them. Later if they decide to tie a username/password to the account I'll map those details to their already precreated account.
     
    Ryiah and Schneider21 like this.
  6. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    That sounds like the right approach. As long as your server-side can handle merging multiple accounts based on device id.
     
  7. RichAllen2023

    RichAllen2023

    Joined:
    Jul 19, 2016
    Posts:
    1,026
    Most people use a throwaway email account to register for stuff so that they don't get tons of spam on their main account anyway.