Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

General Auth and Data services advice

Discussion in 'General Discussion' started by Skrapper, Jan 25, 2023.

  1. Skrapper

    Skrapper

    Joined:
    Dec 7, 2012
    Posts:
    11
    Hello,

    (TL;DR Would anyone have some advice on which services would be best to easily allow for game auth, player data, global data, scalability, broad platform use as well as some sort of web api access to the saved data?)

    I see many tutorials about using Firebase Services, Google Services, Unity Gaming Services and some others, but I'm having a hard time understanding and weighing the pros and cons of each. I would like to utilize Unity's multi platform abilities without running into auth/data access platform issues or publishing issues. I would also rather not have to pay for anything until launch or exceeding a max.

    I am planning out my single player puzzle game with competition being against global stats. Auth and data access seems like it should be my first priority. I just don't want to to head in a direction and run into issues later for a bad uninformed decision. I thought someone in the community would have a better understanding of the available services and their pros/cons verses what my needs are.

    There would be 5 difficulty levels with 100 levels each to start with but level generation will be based on a random seed so theoretically 100 could scale to something pretty big. There could also be multiple modes increasing this data.

    I would like to show personal and global level data to a user when they select a level in game as well as have an admin data website where I can read/display/analyze and update the level data as a whole using an API and possibly scheduled server side functions. Maybe track and exclude unsolvable levels, use the global stats to categorize difficulty, top player lists, etc.

    Would anyone have some advice on which services would easily allow for game auth, player data, global data, scalability, broad platform use as well as some sort of web api access to the saved data?

    Thanks in advance for any advice or direction. Sorry for the length.

    Michael
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    4,050
    I would advise not to overthink this if the main use case is storing each player‘s highscores and querying that data. Firebase seems like a reasonable option, and for player authentication you can use any service (including your own) that returns a unique player ID based on a player‘s email + password combo. In the easiest case you cold just use the device ID, disregarding that the same player on a mobile app and in webgl and desktop app will be considered as separate players. Ask yourself how man players will actually play using different devices/platforms, probably not many.
     
  3. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,797
    I can highly recommend Playfab for this. It is free for up to 100k users....

    They offer auth options across many platforms and stores, along with leaderboards etc.

    One of the things I like most about Playfab is their support for Azure Functions.
    So you can build your server-side logic in an Azure Function, and Playfab has APIs you can call into from those Azure Functions.
    And then of course with Azure Functions you are able to integrate other .NET compatible libraries or frameworks, and even call into other 3rd party services or databases.

    Playfab has a large, active community, on forums and Discord, and was acquired a few years ago by Microsoft, who have done a good job making it a part of the Azure platform. So no buyouts with sunsetting the platform will be on the horizon (yes I'm looking at you Gamesparks selling out to Amazon o_O)

    Side Note : Even though Playfab is free up to 100k users, any additional Azure services you use, such as Azure Functions, databases external to Playfab etc, incur additional charges.
     
  4. Skrapper

    Skrapper

    Joined:
    Dec 7, 2012
    Posts:
    11
    Thanks for the advice CodeSmile. I've had a little experience with Firebase and that is what I was leaning towards. After a few tutorials I think it is the way I will go.