Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question What about Unity Netcode for Persistent Data Oriented Multiplayer Game

Discussion in 'Multiplayer' started by Pierre-Marie, Jan 14, 2024.

  1. Pierre-Marie

    Pierre-Marie

    Joined:
    Aug 3, 2015
    Posts:
    55
    Hello,

    I'm exploring the best service and architecture for my multiplayer game. I've been looking into Unity's integrated solution, Netcode for GameObjects.

    Let me share a bit about my project. The goal is to create an idle game, similar in style to "Shakes & Fidget" for those familiar. It's a completely asynchronous game where players assign tasks to their heroes that take varying amounts of time, from a few minutes to several hours.

    There's no direct player-to-player connection. Instead, players are connected to a central server that processes their requests and simultaneously simulates the heroes' actions.

    The server needs to be always running since the heroes continue to perform tasks even when the player is offline. The number of tasks a player can pre-program is limited, and they need to regularly reconnect to assign new orders.

    I haven't found information on using a permanent dedicated server with persistent data in Unity's Netcode, but maybe I haven't searched thoroughly enough. From what I understand, it seems more suited for "temporary" servers for the duration of a multiplayer/co-op game session without data persistence beyond that.

    Do you have any recommendations or advice on services that might be suitable for this? The target platforms are PC and smartphones.

    Thank you for your assistance.
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    6,521
    You are looking at a REST API here. Not realtime networking. Netcode and similar frameworks are overkill for this kind of scenario, and may not even work at all because they require clients to be connected to a session.

    A sessionless webservice is what you need to implement here.
     
    CiroContns and bugfinders like this.
  3. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    2,021
    pretty sure you could do it with netcode, but it is a seriously like a nuke on a fly.. you would make your life so much harder to do it.

    As for the dedicated server, thats as simple as the database behind it..