Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  4. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Server runtime - First steps forward: feedback and questions

Discussion in 'Connected Games' started by BHouse, Sep 13, 2018.

  1. BHouse

    BHouse

    Unity Technologies

    Joined:
    Jan 10, 2018
    Posts:
    22
    In a September ‘18 blog post, we shared more details about the long-term vision for Unity as a Server runtime, as well as some details about our first steps forward that will be available in alpha soon.

    This sticky post will stay up-to-date with blog posts and talks that are relevant specifically to the the future of Server runtime support. Here’s the list that exists today:

    Talks
    • None yet...
    Blog posts
    If you have feedback and questions specifically about Unity as a server runtime, please post here to ensure the support team and developers dedicated to this topic see and respond.
     
    dichardson and Joe-Censored like this.
  2. Zante

    Zante

    Joined:
    Mar 29, 2008
    Posts:
    332
    My suggestion is that you make it clear who you are aiming these questions at. I'm a self taught developer who has dabbled in everything from JS and C# to UNET authentication systems working via tokens and web APIs.

    There's much I'd like to feedback and discuss but I don't know what a server runtime is. I will after I post this because I will educate myself. The level of assumed prior knowledge you're dealing with might not match the existing baseline/literacy. Many game developers are known for their ability to improvise and aren't necessarily going about things in a manner you might see as standard or typical.
     
  3. VToon

    VToon

    Joined:
    Sep 17, 2018
    Posts:
    5
    Suggestion: A Customizable, Minimal, Headless Server Build

    Hello,

    First of all, I'd like to express my admiration for Unity's commitment to democratizing video game development, especially connected games. I'm excited about the evolving networking features of the Unity engine, in particular the new dedicated server/cloud based networking model.

    As you all know, cost is still the biggest obstacle for indie developers when it comes to server-authoritative connected games. Bare metal or cloud, most indie developers can't afford to successfully launch a server-authoritative massively multiplayer game!

    One of the helpful solutions that I've been thinking about is having a partially authoritative server model instead of a fully authoritative one. So that the server will only run a simulation of the critical physics objects and actions that need to be synchronized between all players.

    What I'm suggesting is a Trimmed Headless Simulation; not just Headless (without graphics), but also Trimmed (without non-critical objects/actions in the scene).

    So the game world will be divided into two categories:
    1. Critical objects and actions: These will be included in the trimmed headless build, and will be handled server-side based on input received from the clients.
    2. Non-critical objects and actions: These will be processed by the clients and won't even exist in the simulated world on the server. The server will only pass commands for these non-critical objects/actions and let each client process them locally.
    For example, objects/meshes outside or inside the playable area that have no effect on gameplay do not need to exist in the server-simulated world.

    Now, which objects and actions are critical and which are not will largely vary from one project to another, so the headless build should be customizable to allow each developer to create their own customized minimal headless server build.

    Maybe this can be achieved by adding a "TRIM_HEADLESS" tag or flag to scripts or game objects and components in the inspector, which excludes those items from the headless build. These still need to be accounted for in the server runtime (for passing commands to clients), but they don't need to be simulated on the server.

    For example, suppose you have a bunch of houses in a remote non-playable area with some lights on them that turn on/off based on certain in-game actions. These houses do not need to be part of the server-simulated world, but there should be "ghost references" to them within the server runtime to keep track of the lights' state.

    This is just a rough idea -- I hope it makes sense!
     
    Last edited: Sep 17, 2018
  4. VToon

    VToon

    Joined:
    Sep 17, 2018
    Posts:
    5
    @Zante - The server runtime is the headless build of the game that runs on the server, or more accurately, while it is running on the server.
     
  5. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,266
    It's really quite simple.

    Quit with making nothing but cloud based networking solutions.
    They are nothing but cash grabs with nice features until you get the 'bill' for them features
    whether your game sells enough copies to sustain it or not.

    Make actual dedicated server instances. I don't understand how this cloud based non-sense has gained so much traction when it's one of the worst design decisions to ever be designed.

    I can't speak for every developer. But I'm not a fan of being limited to how many players a game can host because of a CCU or message limit. It's stupid.

    Make unity be able to be a self-sustaining dedicated server, with no relay systems to the outside world.

    I know this thread was about the server-runtime stuff. But my point was. Make it a server-runtime without all that extra junk that isn't needed - such as relay services. In my whole time ever hosting dedicated server for anything, I've never even ran into anyone who needed to NAT Punchthrough, etc. to host a server.

    The minority of people in this case should just get with the program and get the proper network devices if they want to avoid them issues.

    Sorry I don't mean to sound so harsh in this. It's just been a really long road for me and one of my games.
    Finally just made the jump and purchased TNet3, does exactly what I mentioned above, and better than that, it even has a built in ready to go Console Server. Perhaps you guys should buy it from the developer and use that as the network solution. It works, works great and is VERY easy to get up and running.
     
    Vincenzo likes this.
  6. VToon

    VToon

    Joined:
    Sep 17, 2018
    Posts:
    5
    Why do you think many multiplayer games are using or have switched to cloud-based solutions instead of bare-metal servers?

    With bare-metal dedicated servers you'll have a hard cap on the total number of players your game can accommodate, which doesn't grow when suddenly needed. That is not unless you buy more servers and get them running, but new players won't wait for you to get more servers and will just leave and probably never come back. Maybe you would be happy with a fixed upper limit for your player count and you wouldn't mind losing those extra potential players, but that's not what Unity have in mind for Connected Games, as far as I can tell. And that's just one of the advantages of cloud hosting.

    I agree that a cloud-only solution is not financially wise, so to get the best of both worlds a hybrid solution would be the best way to go. You use bare-metal servers as a primary solution to host the expected everyday traffic, and a secondary cloud-based solution which you can burst into in times of sudden surges of players.

    Going back to the server runtime, I think this still is the main source of financial hindrance to a dedicated server architecture, regardless if you use a bare-metal or cloud solution. How many game instances (full server-side world simulation) you think you can run per bare-metal server? That's the main problem! Forget about bandwidth/CCU, it's the computing resources needed to run the Unity (headless) engine on the server that's going to be break the bank.

    Any way you look at it, unless you are a AAA studio, making an online multiplayer game with total server-side game world simulation is out of reach. Hence my suggestion above for a partially authoritative server with partial server-side game world simulation. A custom headless build where each developer can choose what exactly they want to simulate on the server and what will be left for local processing by each client, which can then be reported back to the server and checked against some custom server-side logic.

    Obviously, this won't be a one-size-fits-all solution, but the idea is to make the headless build readily customizable so that each developer can easily exclude objects/actions from the world and add custom server-side logic, resulting in a much lighter server runtime process than a complete simulation of the whole game world. This will still be costly, but it can make a significant difference, which will vary per project.
     
    Last edited: Sep 22, 2018 at 1:00 PM
  7. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,266
    @VToon I'm not talking about Master Servers. I'm talking about dedicated servers..

    Player buys game. Player hosts a server.
    Client 1 buys game. Client 1 types IP/Hostname, and directly connects to that server, no master relay services that points you where to go.

    No middle man, no server-to-server communications. most games do not need multiple servers.
    For example. Starbound, Ark, Empyrion, Terraria, etc. All of which have dedicated servers that players can host on their own machines, or rent. But truthfully speaking, it costs the developers absolutely nothing to go this route, literally nothing, which allows them to focus on their game, rather than worry about extra stuff that isn't needed.

    I mean yeah,some games could use the cloud based systems, but if they are a big-time game, such as Battlefield, it's literally impossible to use any cloud network system, only because of the imposed limits.

    Now the developers could always just have an actual physical server somewhere that server-owners could send their hostname/ip and name of server so others can find it easily. But that's like hardly any cost involved there.
    Nor is it really required.

    That's my only point is the above^^^.

    Cost of Investment is slim to nothing at all, depending which route you'd like to take.
    People who host the servers manage it them-selves.

    So for the entire lifespan of your game, no matter how much it sells, or doesn't sell, the game could theoretically still be online in 3000 years if people still want to host the server for it (I know unlikely that far in the future), but my point was, the game can be online forever, and even if your company goes bust and crashes, people can still enjoy the game.
     
  8. Raystorm

    Raystorm

    Joined:
    Mar 28, 2016
    Posts:
    3
    @N1warhead I think that is closer to what unity is aiming for, they do provide the hybrid dedicated server + cloud solution if anyone needs it, they did this because of the growing market for multiplayer games with developer controlled dedicated server.
    But, unity also stated that u can host the server runtime on your own solution (like, if you prefer to manage your own server, or like you stated, let the player rent or run the server on their own).

    so if what you're aiming is for player hosted server, it's possible, unity is not stopping you (event right now, with current UNet it's possible).

    as for player hosted servers, some games actually have a NAT punchthrough solution to make sure players can connect, other's don't. this could be a problem for those machine behind a router, as people need to know their public IP & port of the server to connect. usually, those running the server (who are behind the router) can configure their router to allow port forwarding, this will fix the problem with connection, but not all users might know how to do this and this is where the problem is.

    example is killing floor 2, where you have to configure for port forwarding if you are behind a router, even then, they have their own server to pass on the public IP of the host for anyone trying to connect.

    this is why other networking solution like Forge Networking provides a Nat Punchthrough solution for this.
    With Tnet they use UPNP for automatic port forwarding (so the users don't have to do this) & this is not perfect as not all router can support this (or if they do support it, some might be disabled by default, so you may have to instruct users to enable these).

    i am currently developing a multiplayer game where player can host on their own, and this is the biggest problem i have encountered so far. my options are, creating my own NAT punchthrough solution, give instructions to players on how to port forward (but this just reduce the overall User Experience, as it creates extra steps for players), or implement UPNP (like Tnet). at least steam provides a nat punchthrough solutrion, so im using steam for now to help with this.

    so saying that there is no worry for the developer, is not entirely correct. because for me, creating the best user experience is a top priority.

    conclusion, yes you can have player hosted server, but if you don't have a good dedicated community that helps each other on hosting, this might reduce the overall User Experience(there are user's that just want to play the game & not go through the hassle of problems that might arise on player hosted servers, these user's may get a bad experience).

    the service unity provide is to make it easier for indie devs who makes a more competitive type (where an authoritive server is a must).

    i do hope unity implements a nat punchthrough & UPNP solution, to make it easier for devs.

    note: killing floor 2 uses multiplay (this is service unity is currently implementing) with hybrid bare metal & cloud, but they also allow users to host their own servers on their machine in case their servers are all full. (i think this is the server runtime unity is aiming for)