Search Unity

Looking For Read & Write Global Player Statistics Solution

Discussion in 'Scripting' started by local306, Jul 19, 2019.

  1. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    155
    I'm looking for thoughts on how to manage simple statistics on a per level basis for a project that I'm currently brainstorming for.

    What I need to track are the XY coordinates of players per level (only once per level) on a low-res level (maybe 10x10 grid), like a 2D histogram more or less. Players will need to be able to read and write these values. As an example, think of how Mario Maker shows the positions of each player death per level.

    I was looking into whether I could leverage something like Playfab or Firebase. However, from a high level overview of those services, I'm not sure if they are suitable. Maybe Firebase since it now has an increment method which help eliminate race conditions of players writing to the same XY space. But Firebase seems to really be for mobile whereas I'm looking to do this on desktop.

    Any suggestions?
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    A simple PHP/MySQL server sounds like it would work fine.
     
  3. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    155
    @Joe-Censored any resources you'd recommend for beginning with this? Long ago I learned a little PHP + MySQL for some web dev stuff but I've forgotten that all since :(
     
  4. GeorgeCH

    GeorgeCH

    Joined:
    Oct 5, 2016
    Posts:
    222
    Hm, are you sure PlayFab wouldn't work? You can use its player data fields to basically store any form of data parsed as a string. It also supports desktop platforms.
     
  5. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    155
    @GeorgeCH I was browsing Playfab's forums trying to find an answer for this and it appears they are working towards something that can support this. But as it is now, it sounds like you'll get throttled if you have too many read / writes to a single value.

    Someone else that I was chatting with posted about this on their forums, and we are waiting to hear back.