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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Non-real time multiplayer online

Discussion in 'Multiplayer' started by Nyfirex, Jan 28, 2021.

  1. Nyfirex

    Nyfirex

    Joined:
    Jun 26, 2019
    Posts:
    179
    Hi guys,
    i want to start learning how to create multiplayer online videogame but got stuck immediatly. Let me explain first what is my objective: i want to create a game like oGame, Farmville, Hayday, etc... so not a real time multiplayer online. I just need the client to comunicate to the server when he do something, like buying a new item, then the server update the database. The database has tables like "Player" that keeps track of player data (money, inventory, lastTimeLogin, etc...) and tables like "Shop" or "Item". Unfortunately i didn't understand well how to achieve this because i haven't found many information about this, just realtime multiplayer. That said
    - what about CCU? Does a user playing the game count as always connected or just when he performs an action?
    - what you suggest to study? The new Unity netcode or something like Mirror, Photon, etc...?
    Any suggestion on how to approach is appreciated, thank you :)
     
  2. u-doug

    u-doug

    Joined:
    Jun 6, 2017
    Posts:
    11
    You probably want to use something like PlayFab. CCU usually tends to be a factor in real time services like Photon so don't worry about that.

    Bear in mind that PlayFab only allows a few calls per player per minute, any more than this and you'd want to switch to a real time service like PUN or Mirror. Make too many requests and your title will get throttled as it's not designed for real time, frequent access.

    It's free to use up to a point, so if your game doesn't do well you won't pay much/anything. Also, stuff like Photon / Mirror are for real time communication only, you'd still need to use a BaaS like PlayFab to store your player data anyway, so you'd likely need something like PlayFab in either case.
     
    Nyfirex likes this.