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

Question Single player offline mode

Discussion in 'NetCode for ECS' started by optimise, Sep 24, 2022.

  1. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,041
    How's progress of single player offline mode feature that I can create the game that player able to play single player without needing to connect internet and support multiplayer game mode at the same time? Basically I want to have streamline development workflow that I can just use dots netcode way to develop both single player and multiplayer mode without needing to purposely spend a lot of time to implement single player mode in another way.

    Another use case is the initial game requirement is single player game but at later time the requirementsl change to multiplayer game. So I would like to use dots netcode to make it multiplayer ready at day 1. So I won't lost anything even game requirement still ends up being single player and if change to multiplayer I already have multiplayer support by default that I can just flip a switch.

    Will be a thing at 1.0 preview release?
     
    Last edited: Sep 24, 2022
  2. CMarastoni

    CMarastoni

    Unity Technologies

    Joined:
    Mar 18, 2020
    Posts:
    804
    1.0 preview release will help reduce some friction in that sense. But still, the differences in between a single player game and a multiplayer game can be big.
    It is is now easier to make a single player game that run also in multiplayer, because we changed some core logic about how to check an entity is predicted, input, replicated physics etc.
    However, game flows are also a thing that can't be the same. There are some necessity (ex: exchanging of RPCs) that cannot be avoided, and other things as well (pre-spawned ghosts, etc).
    We are working hard to make this smoother as possible, but as I said, it is not completely solved in 1.0 preview (and so 1.0).
     
    optimise and Occuros like this.
  3. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,041
    Thanks for the reply. Currently what I want to achieve is able to run single player game mode with only client world since mobile platform like android not able to put server world into player build because android platform can't support server world code like windows and linux platforms. Is that possible at 1.0 preview release?
     
  4. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,647
    It would be extremely useful if there was an option to merge client/server worlds into a single world for single player (or even to speed up editor testing).

    It obviously would not be as fast as a proper single player game without the network overhead (ghosts, serialization etc) but it'd still remove a lot of overhead by not running large chunks of your simulation twice.
     
  5. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,041
    Currently I just want to confirm that does 1.0 preview release support mobile platform specially android platform to run single player mode? From what I know even the latest 0.51 release it can't include server world into android player runtime build to run at android platform but no issue at windows platform.