Search Unity

What to use for multiplayer ghost backend?

Discussion in 'Multiplayer' started by CreepyD, Sep 21, 2021.

  1. CreepyD

    CreepyD

    Joined:
    Jun 9, 2019
    Posts:
    24
    Less technical, more on the system side of advice is what I'm looking for, I don't really know what's possible here.
    So it's a racing game (space, not a typical one!), I say multiplayer, it's not technically, I'm want to use a ghost mechanism to replicate racing other players as I thought that should be simpler.

    I have it working solo, it writes the ghost lap to a list which is serialized and stored in a file, about 10KB per lap.
    I'm thinking I need a list of available ghosts / times, so you can choose one to race against from the server, that would have a reference to the file which would then be downloaded and played back.

    I'm guessing I'm going to need some kind of login system so everyone gets linked to their own best times / ghosts for updating them - No idea on where best to look for a system like that.

    Then I'm wondering where do I store such data at 10KB per ghost? 1 per ship per track per player - 22 tracks, 12 ships, that's up to 264 ghost files per person potentially or 2.6MB. Ok most won't play that much, maybe 0.5MB per player, very rough guess.

    Am I being too ambitious here? Should I simply stick to each player's offline ghosts only, local storage, then use a leaderboard for times? I kinda want people to be able to race others visually but not sure it's worth a hell of a lot of effort?

    Thanks for any input!
     
  2. qbvbsite

    qbvbsite

    Joined:
    Feb 19, 2013
    Posts:
    83
    For this type of stuff I think you would have to have a server that stores all this files. A web server should be fine that has a rest API to list the ghost available with times and to download the selected file. I personally think its a cool feature and would put it into my game