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

Third Party coherence – A modern and flexible networking stack

Discussion in 'Multiplayer' started by CiroContns, Nov 8, 2023.

  1. CiroContns

    CiroContns

    Unity Legend

    Joined:
    Jan 28, 2008
    Posts:
    81
    Website | Documentation | Learning content | Video tutorials

    Hello everyone! We’re a distributed team of around 30 game developers who are passionate about multiplayer. Five years ago, we decided to start building the kind of networking stack we ourselves would love to use.

    Today, we’d like to share the result of that continuing work. coherence is a network engine, platform and a series of tools to help anyone create a multiplayer game. About a year ago we made it available publicly for the first time.

    coherence features a powerful, flexible networking model, and a great integration with Unity. You could say that we put it to the ultimate accessibility test by bringing it to Global Game Jam, Nordic Game Jam, Castle Jam and more; which resulted in more than 30 networked jam games made with it.

    This summer, we launched the 1.0 version. And recently, we’ve been able to unveil some of the companies building big, ambitious games on coherence, like Bossa Studios and Gardens – among others still unannounced.

    Now we’d like to invite you to try it out for your next game.

    No matter the genre, from competitive action games with large maps and authoritative servers, to co-op games with distributed enemy simulation, to casual games and virtual worlds: coherence can be used for any kind of game running on desktop, console, mobile, VR or WebGL.

    Campfire_001.jpg
    One of our advanced downloadable samples, Campfire


    In short
    • Fast network engine with managed cloud hosting and scaling or client hosting through Steam Datagram Relay or other services.
    • A wide range of useful features like built-in persistence, highly configurable bandwidth optimization, areas of interest, authority transfers, and much more.
    • Easy to develop, iterate and operate connected games and experiences.
    • SDK allows developers to make multiplayer games using Windows, Linux or Mac, targeting desktop, console, mobile, VR or the web.
    • Tools that help even non-coders create and quickly iterate on a connected game idea.
    • Scalable from small games to large virtual worlds running on multiple servers.

    What’s so different about coherence?
    There’s a lot to mention about what makes coherence a great choice. Here’s a few highlights:

    Easy Integration – No need to inherit from “NetworkBehaviours”. No “NetworkTransform”, “NetworkAnimator” and the like. Integrating coherence requires minimal changes to the project structure, to scripts, and to Prefabs. This makes it easy to experiment with and change things at a later stage. Instantiating a networked object just means dropping a prefab with CoherenceSync into the scene.

    Great UX – The Unity SDK feels like a native part of the engine, perfectly integrating with Prefabs and Variants workflows. Designers can add, play and tweak network gameplay with no need to code, which enables multiplayer prototyping, for real.

    Hub.jpg
    The coherence Hub is a multi-tool to bake netcode, debug your setup, create Client and Server builds and upload them to our cloud

    Config.jpg
    Configure what to sync on each Prefab directly within our Config window for a code-less experience

    Optimisation.jpg
    The Optimization window gives you maximum control over network data, offering the ability to tweak the precision, frequency and range of each synchronised value; and to add distance-based LODs.

    Simple APIs – A lot of functionality just relies on Unity’s classics: Instantiate, Destroy, SetParent, and changing the value of public properties, they all work. We then provide simple and understandable APIs to go the extra mile.

    Multiple Topologies, All in One – We support basically any network topology you can think of: Match-based Rooms, persistent Worlds, client-server, client-to-client, managed or client-hosted, and we do pre-match Lobbies too. You can build a game that is purely client-side, or make it server-authoritative… or mix the two. Then you can change it later, with little effort. Or use the same Prefabs, in offline mode.

    Native Big Worlds – We have plenty of tools for big games and big worlds. We have areas of interest to focus on particular areas of the world; distance-based LODs to reduce network traffic when an entity is far; we can shift the origin around and handle 64-bit precision coordinates (yes!). You can even easily make servers talk to each other and move entities across for load balancing, like shown in this video.

    LB.jpg
    Load balancing of servers (Simulators) in one of our demos

    Hosted by Us... or not – coherence offers cloud hosting, with a flexible pricing plan. However, we also allow you to create client-hosted games, effectively bringing the cost to zero.

    Obviously all the rest that you would expect is also covered. This is just a small selection of the points that set coherence apart.


    Spotlight program
    If you have a project already in development and want to make it multiplayer, we recognise that picking up a new networking framework is not an easy task, on top of all the other things you need to deal with. If that is you, we’d like to hear from you – we might be able to support you through our free Spotlight program. Read more about it here.


    Cool games in development with coherence
    A few studios already chose coherence for their networked games:

    Bossa Studios – Wild Skies
    A cooperative survival adventure for 1-6 players set amongst the clouds. Find and craft ancient technology, build your own skyship, brave ferocious storms, and battle the giant threats that await beyond the horizon.




    Gardens – Unannounced title
    A dream team of developers, some of them who worked on the likes of Journey, Sky, What Remains of Edith Finch, and more; is working on a yet unannounced title that’s making everyone curious and excited. We tried a build at GDC, and it’s fantastic.




    Squingle Studios – Squingle
    Squingle is a fantastic, psychedelic VR game for Meta Quest and Steam VR, that you can already try out. The team is currently working on a multiplayer update.




    Getting started
    To get a feel for coherence, we would recommend trying it hands on!

    Here are a few resource to get you started:
    • Video showing how to add multiplayer to a single-player game in 5 minutes:

     
  2. CiroContns

    CiroContns

    Unity Legend

    Joined:
    Jan 28, 2008
    Posts:
    81
    Reserving the second post for announcements later!
     
  3. qbvbsite

    qbvbsite

    Joined:
    Feb 19, 2013
    Posts:
    83
    Neat stuff, I was thinking about writing something similar in terms of the load balancing of simulators.
     
    CiroContns likes this.
  4. qbvbsite

    qbvbsite

    Joined:
    Feb 19, 2013
    Posts:
    83
    Quick question, for the simulators are these headless Unity instances or a console application? Currently I'm building a game that is server authoritative but I run it as a console application and not within Unity.
     
  5. CiroContns

    CiroContns

    Unity Legend

    Joined:
    Jan 28, 2008
    Posts:
    81
    Simulators as of now are headless Unity applications, yes. They connect to the Replication Server (very much like Clients do), which is instead our own tech.

    We have it on the roadmap to allow to connect other tech to the Replication Servers (for example, a C++ application or something), but it's not there right now. If it's a business need, we might explore it as a custom solution, but it would need to be investigated and planned.
     
  6. qbvbsite

    qbvbsite

    Joined:
    Feb 19, 2013
    Posts:
    83
    Cool stuff, some impressive work that's for sure. Seems similar to the stuff Star Citizen is doing with Dynamic Server Meshing.
     
  7. CiroContns

    CiroContns

    Unity Legend

    Joined:
    Jan 28, 2008
    Posts:
    81
    Oh wow, tough comparison there! :)
    Yes, we do have some of the tools required to create a setup like that, partly shown in our Load Balancing demo video. From my limited understanding of their video, they also add a robust level-streaming system that we don't offer out of the box. As you imagine, that would be something for Unity to create...
    But it would be fun for us to build one, and showcase it as part of a demo project. Maybe something to think about.

    By the way, in regards to your previous question and my previous answer:
    I checked with my colleagues, and we do have pure C# support for Simulators already in, but currently offer no examples so it might be hard to do. If you need it for a business case, please reach out to devrel@coherence.io and we can figure out a way to help.
     
  8. CodeRonnie

    CodeRonnie

    Joined:
    Oct 2, 2015
    Posts:
    345
    I was just watching Dino Patti's GDC talk on founding a successful indie game studio, and he suddenly started talking about coherence! Now I am even more interested than I was.

     
    CiroContns likes this.
  9. CiroContns

    CiroContns

    Unity Legend

    Joined:
    Jan 28, 2008
    Posts:
    81
    We have a new video out! I tried to make it in a way that it could be useful even to people using other networking frameworks – though it does dive a bit into some specific things that we have in coherence, like the ability to do Distributed Authority.


    (subtitles are available)
     
  10. mishakozlov74

    mishakozlov74

    Joined:
    Aug 8, 2018
    Posts:
    139
    What about two players carrying one object?.. Would that be possible?