Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Networking in Project Tiny

Discussion in 'Project Tiny' started by ratuspro, Mar 24, 2020.

  1. ratuspro

    ratuspro

    Joined:
    Apr 5, 2015
    Posts:
    17
    Hello all,

    In the past few months, I've been playing with Project Tiny, and I found it to be very domain-specific. Actually, I believe this is the right way for Unity to satisfy the needs of its audience.

    In the past few years, the efforts to accommodate several workflows and solutions into a single engine may not have been as successful as Unity would like it to be. Personally, among other aspects of the engine, I always found the built-in solutions, such as UNET, suitable for development but very far away from being production-ready. Always ended up using other solutions like Photon, more recently tried out Mirror, and, for some projects, custom made solutions.

    All of the above are great for P2P and, behind some paywalls, can even work with dedicated servers but managing and deploying multiple rooms as needed was never really their focus (to the extent of my knowledge). Recently, I've been working on some .io games. To design an architecture that supports a very scalable solution with dedicated servers, would end up very costly or a nightmare to develop (using these assets).

    The fallback for this .io games has always been writing my server code since the logic to put on the server was pretty straightforward. But now, I'm working in a game that supports a lot of the physics already implemented in Project Tiny. Development wise it would be very fast to use the same code (to a certain level in the server and the client, as many solutions offer)

    Considering that Project Tiny is aiming for mobile/browser games, and I believe that there could be a strong second wave of .io games powered by Project Tiny, I would be willing to implement a networking plugin that supports most of the functionality needed for this games (lobby, scalability, leaderboards, server authority, dedicated servers, and a lot of other things).
    Still, I would not like to invest any efforts into this if the Unity team aims to implement it themselves. As such, I would like to grasp, and potentially discuss, the Unity (or other developers) intents of developing this and what is the community looking for.

    Thanks,
    Diogo
     
    Tangximing and Maras like this.
  2. SINePrime

    SINePrime

    Joined:
    Jan 24, 2019
    Posts:
    54
    Sounds awesome, I think everyone would benefit from a Tiny networking solution.

    Personally I'd like to see a platform agnostic implementation of a transport layer using WebSockets with an "Entities as events" design pattern.
     
    ratuspro likes this.
  3. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    There is some work being done on utilising WASM server side. Could Unity in theory tap into this and provide the option to build a headless (no display) server WASM build that any Web Server that supports that technology could launch and run?

    It would not have to be the be-all and end-all of multiplayer servers, just provide multiplayer capabilities for indies and make it easy to setup remote multiplayer/simulation servers for professional/advanced users.

    If unity had a database access system then it could even be used for more mainstream business apps that could be written in Unity Tiny for the client?
     
    Last edited: Apr 3, 2020
    ratuspro likes this.
  4. ratuspro

    ratuspro

    Joined:
    Apr 5, 2015
    Posts:
    17
    Thanks for the interest!
    Can you elaborate a little bit more on what you mean as "Entities as events". I'm not familiar with that design pattern/paradigm. If you could provide any references it would be great! :)

    Based on the article you shared (and other sources I found) it seems that there is still a long road ahead before considereing WASM for server-side as a widely adopted solution. But take it with a grain of salt since I'm not really into server-side tech. Still, this concerns more with the build process than the overall networking architecture, right?

    I was waiting for 2020.1 and it seems that finally some experimental stuff will be included. For istance, the networking code available on FPS Sample project: Unity's NetCode and Network Transport. However they don't support websockets yet and it is unclear id they aim to do it in the near future.

    Overall, they are preview packages and, thus, not production ready.
    Waiting for stable releases might take a while...