Search Unity

Is there a go to solution for multiplayer now?

Discussion in 'General Discussion' started by Le_Tai, Dec 9, 2016.

  1. Le_Tai

    Le_Tai

    Joined:
    Jun 20, 2014
    Posts:
    442
    A long time ago everyone use Photon, but now UNET been out for a time, is it mature enough yet? What people usually use for multiplayer game now? Does big company like Supercell share info on what they use?
     
  2. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    Photon still blows UNET out the water.

    Photon is like 0.05 cents per gig and Unity last time I checked was like 0.49 cents per gig.
    I've never used UNET, I hate to say it's bad, but Photon is still in my opinion the top dog in the scene.
    If the price doesn't get your attention I don't know what will.

    But from what I can tell, Photon has definitely gotten more advanced, even buying out Bolt. Even has now the option to use their relay servers for UNET, so you can still get the good cost effective pricing of 0.05 per gig.
     
  3. Le_Tai

    Le_Tai

    Joined:
    Jun 20, 2014
    Posts:
    442
    What if I want to use my own server? Can photon do that?
     
  4. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    I think so
     
  5. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,363
    Maybe there's not a go-to solution in the same-way that there's not a go-to solution for people wanting to make the next Facebook. If it was too easy to make a MMORG then they wouldn't be worth making if you see what I mean?
     
  6. Le_Tai

    Le_Tai

    Joined:
    Jun 20, 2014
    Posts:
    442
    A go-to solution for multiplayer does not make creating multiplayer game easy, the same way Unity does not make creating game easy.
    All I want to know if photon have any competitor worth looking into now
     
  7. Deleted User

    Deleted User

    Guest

    Forge Networking looks good
    but yeah .. looks .. i dont really know

    but doesnt Photon have pay per concurrent users ?? and you have to use their servers or something? .. seems REALLY LAME to me.. but guess i dont know know for sure..
    is offline LAN a thing your players could do if you use Photon??? .. i dont think so... ???
    i dont like the always online middleware BS Photon had .. from what i seen when i tried to look into it...

    pretty sure that was one of the main reasons the dude that made Forge made Forge .. ?

    Photon Bolt is a thing too.. but i dont like the idea of Photon from what little i looked into so screw em, Bolt looked really good when it was owned by the dude that made it, but he sold it to Photon



    but all said, if you were to use Forge, you'd have to rent servers from somewhere..

    but the functionality I am looking for is LAN, and player to player connections they handle themselves, first and foremost
    .. i want my game to be able to be played, say 50, 100 years from now, if you were to assume/keep the same hardware, etc..
     
    Last edited by a moderator: Dec 11, 2016
  8. zugsoft

    zugsoft

    Joined:
    Apr 23, 2014
    Posts:
    453
    The best server will be always a server developed by you, specially for your game.
    With a RTS game you have to manage 1000 units, buildings...
    With a FPS game you have to manage only some units , synchronize animation, and weapons.

    Photon, Bolt, Unet are for me just a solution for bad developers or no developers.

    I created my server with System.Net.Sockets in a pool of threads, I can handle 1000CCU on a 5$/month Linux VPS or on a my Windows computer.
     
    Ziron999, ramand, ZJP and 4 others like this.
  9. stanchion0

    stanchion0

    Joined:
    Feb 14, 2015
    Posts:
    3
    Photon has CCU to use their relay, matchmaking, etc. UNET is similar but more expensive.
    Bolt is still "really good" :)

    For Forge you either need to use their master server for hosting and punchthrough, or host your own dedicated servers. However punchthrough fails fairly often, so your players will often not be able to connect to a host.

    If you are looking for basic LAN functionality, pretty much everything but PUN will let you do that.
    Bolt is also based off of .NET sockets, it took years to develop by a very skilled developer. Not everyone has the time and skill to do something like that, but if you do you probably have a leg up on most other Unity developers.
     
  10. Deleted User

    Deleted User

    Guest

    i dont know much about networking...
    is Master Server .. a required thing??
    what is with the OLD games like say the original command and conquer?
    it just does, you type in an IP address and thats all there is to it.. ? i mean.. theres DEFINATELY no master server still existing for that game, but it still works over the internet

    i guess you guys are mostly focused on mobile multiplayer games??
    iam more interested with making a timeless, totally (admittedly, stupidly) ambitious PC game
     
    Last edited by a moderator: Dec 11, 2016
  11. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    Photon sucked if you tried to use hundreds of photonviews, which is the default way of doing it.
     
  12. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Please share your knowledge and ability. Make it a product and sell it to developers who are not networking gurus. ;)
     
    Rodolfo-Rubens and Socrates like this.
  13. zugsoft

    zugsoft

    Joined:
    Apr 23, 2014
    Posts:
    453
    I have no problem to share my knowledge, but I don't want to sell my server code because as I already said each game need a specific server:
    -RTS server will be different than a FPS server, and different than MMO server.
    -MMO server needs to divide the world in 10 servers for example
    -RTS server needs to use more Socket to manage more units
    -FPS server needs to predict movement, calculate if a bullet hit a player, calculate the physics.
    -Local server will be different than a web server
    -Maybe you need encrypted data, maybe not(increase a lot CPU usage)
    -Maybe you need to compress data, maybe not(increase a lot CPU usage but decrease bandwidth)


    Then, if I sell my code, many hackers could find a solution to hack my system.
    My RTS server use only 400 lines of code, and my FPS server only 350 lines.
     
    zoran404 and theANMATOR2b like this.
  14. Le_Tai

    Le_Tai

    Joined:
    Jun 20, 2014
    Posts:
    442
    I just realize I never think of C# as a language in Unity :) Never stepped my foot too far outside of Unity's dll and System.Collections. This looks like a great side project. Can you elaborate more on this? Do I create a .NET app as the server for Unity player client to talk to? Will the client work cross platform? Will Mono 2.0 Unity is using put any restriction to what we can do?

    Edit: Unity use Mono 4.4 now. Shouldn't make any different thought
     
    Last edited: Dec 12, 2016
  15. zugsoft

    zugsoft

    Joined:
    Apr 23, 2014
    Posts:
    453
    You just have to create 2x C# class in Unity.

    Server.cs where you have to create your System.Net.Sockets object + 3 methods .
    -InitServer (create socket + bind the socket)
    -PacketR (to read the socket)
    -PacketS (to write in the socket)

    ServerControler.cs where you process all data
    In the Start you have to create a Thread and create your Server object, and call InitServer.
    In the Thread you have to call PacketR and PacketS
    In the Update you have to get and set all datas used in your Thread.
    OnApplicationQuit , stop your Thread

    My games work on Android, iOS, WindowsPhone, Linux, MacOS and Windows with the same server and client, so yes it's crossplatform
     
    ramand, elias_t and Le_Tai like this.
  16. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,572
    I have heard many people say the same thing about Unity developers. I don't agree with them.

    Let people use what works for them. Small developers can get more done by using tech that is already available rather than developing their own stuff from scratch. It doesn't make people bad developers if they want to focus on making gameplay rather than tech.
     
  17. zoran404

    zoran404

    Joined:
    Jan 11, 2015
    Posts:
    520
    It seems to me that you see networking frameworks as a simplification for less experienced programmers while in fact you need to learn much more than if you just used a simple tcp socket.
    This is because a socket only has Send and Receive functions that work the same way as Write and Read functions on files. While a framework like photon has several components and 10's of classes that you need to learn and understand before you could make anything playable.

    @menfou tried to explain how to implement this, but I doubt anyone will understand it unless they already know what he's talking about. I'd advise that you google for Socket programming in C# on YouTube and see the actual working code.

    If you need to calculate physics on the server then you'll code the server in unity, because of it's physics engine. Unless it's simple enough physics that you can code it yourself. Otherwise create a .net or mono app.
    Using unity app as a server implies a big overhead, so only use it if you have to.

    Unity runs on mono, which is why it's cross-platform. So if you use mono then your server will work cross-platform as well.

    Unity uses Mono 4.4 COMPILER, which could not be less important. Unity's version of RUNTIME is equivalent to .NET 2 (with some additions), but the Socket class was introduced in .NET 1.1, so you're still covered here.

    Game engines and networking frameworks are 2 very different things.
    If you didn't use a game engine you'd have to write code to draw each model from it's vertices and textures.
    But if you didn't have a networking framework you'll just have to serialize your strings and numbers when sending them, instead of having the framework do that for you.
     
    Le_Tai likes this.
  18. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,521
    I guess it really depends on what you need to do. If all you need is a client to host an authoritative server with a number of clients connecting and playing together then you're basically set to do it for free with UNET and its pretty stable (and easy) from what I have seen.

    Rooms, matchmaking, dedicated servers, NAT, etc... All extra as services and from what I hear Photon still rules that department but Unity seems to be trying to build their own tools for that.
     
  19. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Networking - is very alien to me. I'm hear googling away on what seems to be common terms to ya'll about networking for games, spending 60+ minutes a day just understanding the basics, in hopes of learning enough when I need it for a simple turn based game - to get the game setup correctly.
    This is my schooling - for an artist - it's like learning a difficult foreign language. One slow step at a time.

    Off to google tcp socket. ;)
     
  20. radicalEd

    radicalEd

    Joined:
    Mar 19, 2016
    Posts:
    81
    Is a simple networking solution something that's in demand for private server implementations?

    If it is, I would be totally happy to make a simple server script and rake in some cash. Really, I would have no problem doing that.
     
  21. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    I must be a bad developer because I use Unity instead of writing my own engine+tools, and because I use loads of third-party plugins rather than downloading all the native SDKs and writing my own solutions.
     
  22. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,729
    Why did this thread instantly steer towards costs and server features?

    When I read the thread title I would think the interesting part of the discussion had to do with the API and how easy it was to write the multiplayer code, or am I mistaken? Is that not a factor for any of the alternatives? Are Photon/UNET similar in that regard?

    If I were to make a multiplayer game I don't think I would need any features that cost money. I would just want to write a solid peer-to-peer online game.
     
  23. tartiflette25

    tartiflette25

    Joined:
    Nov 6, 2016
    Posts:
    55
    This.

    menfou answer is quite pathetic and narrow-minded really. Feel free to build your own renderer and physic engine if you're a "real" developper. Everything is possible, it's just a matter of time and go-to market. There's no sense in pissing code for the sake of it

    Hopefully mankind don't have to re-invent the wheel at each generation. It's called innovation, building upon, moving forward.

    Don't get stuck re-inventing elementary Algebra before understanding that 1+1=2 dear Menfou
     
    Rodolfo-Rubens likes this.
  24. zugsoft

    zugsoft

    Joined:
    Apr 23, 2014
    Posts:
    453
    I never discussed about game engine, but only multiplayer server.

    Unity3D is a very good engine, but Bolt, Photon or UNET are not the best for all games and all architectures.
    The best server for your game will be always a server created for your game.

    A good developer need only 1 or 2 day to create a client and server for a game.
    If you prefer to use a blackbox, pay every month something, switch from Photon to Bolt because you would like to play without Internet, it's your choice, but you will spend more time to understand Photon , Bolt or Unet, than just create your system.

    If you are not a developer or a junior developer, yes you have to use Photon, Bolt or Unet.

    Apparently you want to use Photon for your FPS, great if you have 20 CCU or 100CCU, but if you have 101CCU you have to pay $95 per month.
    For $25 per month I have 5 servers around the world and I can handle 5000CCU.
     
    ramand, zoran404, ZJP and 1 other person like this.
  25. ShilohGames

    ShilohGames

    Joined:
    Mar 24, 2014
    Posts:
    3,021
    I agree that many Unity developers are building games that don't need their own custom high performance networking solution. For those devs, something like UNET works fine. What Menfou is talking about are games that do benefit from a bare bones highly optimized custom solution.

    All of the off the shelf networking solutions are trying to be a one size fits all solution, and that is very seldom the absolute best answer. If somebody is building a simple turn based mobile game, the off the shelf solutions are good enough. If somebody is building a next gen FPS, RTS, or MMO, then a custom implementation is always going to yield the best performance.

    Ultimately, a developer could choose to build a FPS, RTS, or MMO using UNET (or similar), but it may end up actually being more difficult to get it working well than it would have been to simply build a custom networking solution in the first place.
     
    pcg likes this.
  26. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    :confused:
     
  27. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    ... speak for yourself, menfou 400lines of code for rts server and 350lines for fps .. is the kind of standalone server code I'd want to look at for learning purposes :p especially as its compact and at the stage when it hasn't grown into a unweidly monster of spaghetit code only the person who wrote it knows what its all doing without having to spend hours on it yourself.

    So yeh not really, some of us who want to develop a dedicated standalone server prefer this route.. or would if we have more of clue on how to. And the fk wants to have to run unity server in headless mode and have to look at an output log txt.. when a console window is realtime feedback and can take cmd input directly.. its just effing retarded.
     
  28. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Remember, when you pay for UNet or Photon or the like, you are not just paying for server code. You are also paying for the bandwidth, the global hosting, the scalability, and the like.

    Be sure you don't confuse the idea of simply writing a custom server with the idea of maintaining one.
     
  29. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    It's more likely then not if you have a big hit with a bespoke solution network code multiplayer game you will be re-writing it to use photon or Unity multiplayer hosting anyway. No Indy in his right mind is going to want to do as much tech support as is going to be needed to do a good job to support his game if the game becomes a big hit.
     
    Kiwasi likes this.
  30. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,147
    If one of my games became a big hit I'd hire someone to maintain it for me. :p
     
    Teila, Socrates and Kiwasi like this.
  31. larku

    larku

    Joined:
    Mar 14, 2013
    Posts:
    1,422
    No developer will create a client and server for a game that is in any way production ready in 1 or 2 days - that's pure fantasy.

    I think you underestimate what's required to have a scalable production ready client server implementation. 2 days isn't even enough to design a robust API for such.

    A good programmer will choose the best solution for the time and budget. There's no such thing as the 'best solution' ever. It's always a compromise of time and budget.
     
    Moonjump, aer0ace, zugsoft and 2 others like this.
  32. zugsoft

    zugsoft

    Joined:
    Apr 23, 2014
    Posts:
    453
    I am agree about the time and budget.

    When I created my first game with Unity, I tried Photon, and after 1 day I decided to work on my server, I lost 1 day by trying to use Photon.

    About the scalable problem:
    1 day is enough to create a client/server for a FPS game with 16 players per room, I did this in 1 day for my first FPS game using XNA and Socket 5 years ago, I reached 2 millions players with this game, with 300 CCU without any problem.
    2 days is enough to create a client/server for a FPS game with 100 players per room.
    2 days is enough to create a client/server for a RTS game with 2 players with each 500 units.

    The scalable problem will appear only if you want more than 150 players per room, but if you stay under 100 players, a simple VPS with 0.5CPU ,256Mb , 100Mb/s is enough, and I know what I am talking about.
    With a simple client/server the limit will be the bandwidth.

    I am pretty sure 99.9% Unity developer need a server to handle 20-30 players per room, mainly for FPS game, for a RTS is lower.
    Only if you think able to create a MMO game like WoW with thousandssss CCU , you will have to think about scalability.

    If you have 20-30 players per room, a 5$/month VPS can handle 50 rooms without any problem(1000CCU).
     
    zoran404, wccrawford and Le_Tai like this.
  33. ShilohGames

    ShilohGames

    Joined:
    Mar 24, 2014
    Posts:
    3,021
    That logic might not be completely sound, though. The main reason to build your own custom networking code is to get the best scalability for your exact game use case. That might end up being the reason your game becomes a big hit. Converting a successful game to use a popular off the shelf networking solution (like UNET or Photon) might make your game perform worse. And it might actually be more work to get it working well enough with the off the shelf solution.
     
  34. Le_Tai

    Le_Tai

    Joined:
    Jun 20, 2014
    Posts:
    442
    Thanks you all for the input. Another thing I would like to know, if I use an Unity player as server, can I implement a CLI, I never seen it before? Do I have to use the GUI?
     
  35. zugsoft

    zugsoft

    Joined:
    Apr 23, 2014
    Posts:
    453
    I am not sure to understand exactly what you ask.
    Do you mean a interface to command your server ?
    If it's what you mean you have 2 solutions or more :
    1- Create a client to communicate with your server on a special socket port, and your server could start some function/code when he will receive some command.(ex : addMoney 500 player5)
    2- Add some hide function in your game to have a special access to your server to send command, by using hidden button and a "admin" user with password.

    In my game, I can reset my server, add money to a player by sending some command to my server using my chat system.
    I could also add a feature to ban a user :D
     
    Le_Tai likes this.
  36. pcg

    pcg

    Joined:
    Nov 7, 2010
    Posts:
    292
    @menfou thanks for sharing. Do you have a blog or any resources you could point us to with regards to learning this dark art?
     
  37. tiggus

    tiggus

    Joined:
    Sep 2, 2010
    Posts:
    1,240
    Menfou, what VPS service plan would cost $5/mo that includes the bandwidth needed for a moderate amount of users(lets say less than 500 active monthly. I write my own serverside code as well but bandwidth is not THAT cheap.
     
  38. zugsoft

    zugsoft

    Joined:
    Apr 23, 2014
    Posts:
    453
    Teila, Ryiah, Le_Tai and 4 others like this.
  39. zugsoft

    zugsoft

    Joined:
    Apr 23, 2014
    Posts:
    453
    Sorry but I have no blog or resources to share.

    But I could create a Asset in 1 day with 2 scenes and a lot of comments:
    Simple server scene ( running on Windows, Linux)
    Simple client scene, where you have to attack all others players with a Tank.
    But without database connection, with simple prediction, no security.
     
    pcg, Ryiah, Le_Tai and 2 others like this.
  40. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,513
    On this thread, a rep from GameSparks also "touted their wares". So, there's that too, I guess.
    I just recently did some mild research on multiplayer, as I'm starting to implement a bare system myself, for my game.
    I just went with Photon because the general "pulse of the Internet" told me that uNet is still not quite ready, and I know that Photon is "battle-tested". Not only that, I picked up PUN+ on an earlier Unity sale.

    Unfortunately, I found out that the way to go for a turn-based multiplayer game with persistence and asynchronous gameplay requires the Photon SDK, as PUN isn't quite updated for webhooks/webRPCs, which are needed for said persistence. However, the 100CC limit that is part of that purchase is still applicable to non-PUN implementations. On top of that, Photon does not rent out http-web servers, so you have to find your own. They recommended PlayFab, so I am looking into that with great detail, and I finally am starting to "get" how it all integrates together with my game. Additionally, @tobiass, a Photon developer, is active and very helpful on these boards, so that gave them more points to them.

    While Photon does provide servers you can rent, I'm opting for client authority for the time being, as I have no idea if my game warrants spending so much for renting server space. Since my game is turn-based, server authority isn't that big a deal to me for now. PlayFab does provide rudimentary support for server authority by way of javascript in the web hooks, but again, this is not the sort of anti-cheat measures that you need for more sophisticated games.

    Anyway, once I stumbled onto PlayFab, I realized that Photon isn't the end of my "troubles". I seriously don't want to work on all this multiplayer infrastructure, so I'm glad these services exist, but I'm still sad that I have to spend time to learn and implement it all. PlayFab provides all this support for user accounts, etc, and even across your "studio", so that if/when you create more than one product, the account can transfer across products. I feel sorry for those who think that setting up their own network infrastructure is the way to go, because it takes up so much time away from the actual game. I've left a lot of unfinished projects behind in the past decade or so, so any available middleware is a godsend to the small developer.
     
    Moonjump and tiggus like this.
  41. tiggus

    tiggus

    Joined:
    Sep 2, 2010
    Posts:
    1,240
    I agree with both points of view actually. Menfou is right that if you have experience writing systems code(thats a key point that keeps getting lost) doing it yourself is not terrible. You can setup some cloud load balancers and scale it out quite easily if you design your architecture correctly. Many of us have been doing "web scale" apps at our dayjobs so this part is easy and familiar.

    On the other hand - if you don't have that kind of experience and/or willingness to invest in rolling your own, photon/playfab and others are great. So there is something for everyone. Systems/networking newbies should definitely not be rolling their own in my opinion.
     
  42. zugsoft

    zugsoft

    Joined:
    Apr 23, 2014
    Posts:
    453
    So, I created a very simple Server using System.Net.Sockets, with less than 380 lines of code in only 5 hours.
    The server use only 1 Thread
    A 2-5$/month VPS server can handle 1500 CCU if you limit the maximum player per Room to 8.
    Or can handle 800 CCU if you limit the maximum player per Room to 16.
    Or can handle 110 CCU if you don't limit the maximum of player.
    The server doesn't use snapshot, world splitter, or compression to reduce the bandwidth.

    Why 1500 CCU :
    8*40*8*20=51KB/s => 512KBit/s, so it's possible to have 195 (100MBits / 512KBits ) rooms with 8CCU

    Why 800 CCU :
    16*40*16*20=205KB/s => 2MBit/s , so it's possible to have 50(100MBits/2MBits) rooms with 16 CCU

    Why 110 CCU: 110 clients will send 40Bytes to the server, then the server will send 40Bytes * 110 clients to 110 clients, 20 times per seconds (50ms ping).
    110*40*110*20=9.7MB/s => 100MBit/s

    The server works on Windows or Linux.

    I am finishing the Client, and a very simple game.

    Just some lines of code for the ServerUDP.cs
     
    Last edited: Dec 15, 2016
    dc_network, Le_Tai, ZJP and 3 others like this.
  43. zugsoft

    zugsoft

    Joined:
    Apr 23, 2014
    Posts:
    453
    I hope to finish my SimpleServer+Client game next week, I would like to finish first my next game "Mars Colony"

    For Mars Colony, I use a very simple server created in 2 days.
    This server receive encrypted and compressed data from each client
    This server send only the data need by each client
    This server can handle 300 clients and more on a 5$/month VPS
    The world update time is less than 0.02ms (I calculate the time every 100 packets)

     
    pcg likes this.
  44. Crouching-Tuna

    Crouching-Tuna

    Joined:
    Apr 4, 2014
    Posts:
    82
    Hi, I'm bumping this thread rather making a new one..
    First reason is because I was following and really hoped @zugsoft would release the sample custom server project..

    I'm about to start a project for a client. While I'm fairly experienced with Photon PUN, I have no experience what comes after release (CCU limit, server cost).
    For my personal game, 100CCU of Photon Cloud for $95/5 year sounds like a good deal.

    For my client's project, I expect much more players. It's a casual game, on mobile, so the bandwidth usage for each player will be very low. Using these services (like Photon) with their CCU limit seems an overkill.
    I'm looking to try making a custom server and rent my own server.

    The other option is to use Forge (no CCU), is this the best solution for hosting your own game server with low bandwidth games + high players?

    Cheers
     
  45. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Networking for Unity is in an odd place, where there is no "go to solution" at the moment. Unet is deprecated, so don't start a project with it now. If you liked the Unet HLAPI, you can try the Mirror project (which is a port of Unet, a replacement transport layer, and actual bug fixes).

    Photon has a big following, but it has a fairly rigid network architecture and pricing model, which will be not optimal for certain game types.

    Unity has a new networking API on the way (their 3rd networking API in as many years) but what they have shown so far is just a barebones transport. It will take some time before they release something more suitable for general use, and even more time before it is seen whether they will abandon it as fast as they release it as they have done before.

    Forge Remastered is free and open source, but even simple questions in its own thread here go unanswered for months, even from its developers.

    There are other API's available as well, but all have their own issues preventing one from coming out as a clear go to solution. Be it lack of high level implementation (being basically a transport only), to poor documentation or examples, poor support, etc.

    I ended up moving my project from Unet to my own networking API using the Socket class, because the Socket class is not going to be deprecated, it is free, if I am the developer I'll always be available to fix bugs in the networking API, when I write the API it is far easier to troubleshoot networking issues, there is no hidden code, and various other reasons.
     
    vakabaka, Antypodish and Ryiah like this.
  46. zugsoft

    zugsoft

    Joined:
    Apr 23, 2014
    Posts:
    453
    The best solution is to create your Socket UDP server/client in C# with Unity to have a very low latency in Game, to calculate life, collission, physics.
    And put this Socket client/server in a Thread with a sleep.

    And to use WWWForm to send and receive https data like name, email, stats.

    A simple VPS server can handle 50 games with 10CCU , 500CCU.
    Or 1 game with 100CCU if you didn't split your map.
     
    ZJP and Joe-Censored like this.
  47. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Valve have splitted the UDP framework from Steam networking into a seperate project. . We use it in our project (Though through Steam networking)

    https://github.com/ValveSoftware/GameNetworkingSockets

    We have also abstracted the low level functions away from our domain, so can move to other library if needed
     
    Joe-Censored likes this.
  48. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    edit: moderator remvoved the message this was reply to
    Seems like the right place for such a question
     
    Last edited: Oct 31, 2018
  49. Crouching-Tuna

    Crouching-Tuna

    Joined:
    Apr 4, 2014
    Posts:
    82
    It seems using Forge/DarkRift is pretty "not reinventing the wheel" for Low level stuff. Although the one most important feature is the MasterServer starting/managing game servers in the VPS.
    I was following this: https://github.com/proepkes/SpeedDate/wiki (based on MSF https://assetstore.unity.com/packages/tools/network/master-server-framework-71391) and it seems spot on but can't get it to work for various reasons, the author is still going through the problems I'm having.

    I don't wanna go back to Photon just for the room stuff..
    And someone mentioned the MSF asset doesn't work on Unity 2018... Was about to go over this guide: https://emilraineroblog.wordpress.c...aster-server-framework-part-9-custom-spawner/

    Anyone can recommend the best way to handle MasterServer, that's somewhat all-purpose?

    Cheers