Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Hosting a Database, advices for noob ?!

Discussion in 'Multiplayer' started by RemDust, May 16, 2017.

  1. RemDust

    RemDust

    Joined:
    Aug 28, 2015
    Posts:
    431
    Hi guys, :)

    I'd like to know what is the easiest (but if possible fairly secured) way to host a simple database for a Unity game.
    The idea would be simply :
    - an array of players, referenced by their name, and for each of these players a few int and strings.

    In this scenario I wouldn't implement a real networked multiplayer gameplay but more a local one -think smash bros but with character creation/persistence- the players would log and then read/write their character progress in the database.

    I don't even know if I can do this in C#, I'm a real newbie here !

    Si any input from you would be really appreciated ;)
     
  2. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    Something like Playfab or Gamespark? Or do you want to host yourself?
     
    RemDust likes this.
  3. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Is the database global, or to be stored locally? If local, you can just store all that in playerprefs.
     
    RemDust likes this.
  4. RemDust

    RemDust

    Joined:
    Aug 28, 2015
    Posts:
    431
    I want it to be a global database so the players can play their "characters anywhere" :)
    I already heard about Playfab but it seemed a little bit "overkill" for my needs.

    In my thoughts it would be a cheap cloud storage of an array that I can populate like
    - player list
    - for each player an int for gold and xp
    - a list of stuff, each stuff contains another list of strings (player names) that I write and check to see if players possesses the item or not.

    Maybe a few other really simple things as you can see !
     
  5. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    Playfab would be good for that. They handle Authentication and other things for you. But if you really want it yourself I guess just a PHP page connected to some SQL db? Or possibly something like Google Firebase (Android and iOS only for Unity).
     
  6. RemDust

    RemDust

    Joined:
    Aug 28, 2015
    Posts:
    431
    I'm gonna check out all of these solutions, thanks man !

    Also as a secondary topic, I've been hesitating between a networked multiplayer game and a local "party game-like" multiplayer.
    Well, even if I already worked a bit with Unet I found out that I would need help i was going the full network road.
    So if I'm choosing to go local :
    - the big downside is for 4 players playing, you sell one game copy, and it's a big deal.

    I've been thinkingo of an "elegant" solution, tell me what you think about it.
    The characters data would be linked to the players Steam accounts, if you wanna save your progress, money and stuff, you must possess yourself (every player) a copy of the game. If you don't, you can play but as guest, meaning that you are not able to keep your progress xp etc...
    (also it would potentially solve my all data persistence problem as I think Steam does have such a service, but maybe i'm wrong)
     
  7. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    What is Full network vs party game like? Whats your defenition?
     
  8. RemDust

    RemDust

    Joined:
    Aug 28, 2015
    Posts:
    431
    Sorry, I meant fully networked like a sever hosted game, like "any recent" game.
    Partygame is for me more like a "mario kart" game where you plug 4 controllers and play locally in a single instance of the game.
     
  9. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    Oh, Split screen vs Multiplayer basically? Split screen is not really what people play these days. But if you want to make a split screen game. Go for it. If you do you don't have to worry about Network code at all. You can simply write your singleplayer code and make sure you split the screen with different cameras.
     
  10. RemDust

    RemDust

    Joined:
    Aug 28, 2015
    Posts:
    431
    Yep, I know that, but I still want the different created characters to persist through games (and space ^^).
    Dont know if you ever played Gauntlet, but it's basically what I want :
    - you log in with your ps4 account (every players in the room) and then when you play your progress are stored 'inside" your account so everyone can have a character progression.
    So yes, I do need some sort of cloud and id service ;)
     
  11. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    Playfab can do that for you. And you can also link steam and other accounts with playfab directly.
     
  12. RemDust

    RemDust

    Joined:
    Aug 28, 2015
    Posts:
    431
    Sounds cool :)
    Is it expensive ?
     
  13. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    https://playfab.com/pricing/
    Free development and you can launch free. but if you have a large player base you need to upgrade. But limits are very high for the free plan. They can host dedicated game servers for you and other things.
     
  14. RemDust

    RemDust

    Joined:
    Aug 28, 2015
    Posts:
    431

    The player limits bothers me a little bit, even if I get a large amount of players, the actual data to keep would be really low so a price per player might not really fit my need.
    Thanks man, I'm gonna take a deeper look into it :)
     
  15. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    More indepth:
    https://playfab.com/pricing/details/#pro-mix
    Good luck!
     
    RemDust likes this.