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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Stay away from UNET

Discussion in 'UNet' started by ikefrc, Mar 9, 2016.

  1. ikefrc

    ikefrc

    Joined:
    Jul 3, 2012
    Posts:
    81
    I've been a supporter of UNET ever since it came out and have been using it in my projects since roughly half a year. As there were some opinions against UNET, I decided I should actually test out how UNET behaves under load.

    Up until today I've never had any issues with UNET, but then again I never did some testing with more then 2 clients.

    So today I tried to simulate 10 players by sending out position updates (packet size < 100 for each update) of every player to each other at a rate of 20 times per second on my LOCALHOST machine. Yes UNET was not capable to achieve that. When I test it with actual clients, all weird things start to happen after a bit, even with players just standing around (in a previously bug free project).

    Starting with "no free events for message" it just randomly starts disconnecting clients, dropping connections "Failed to send message to connection ID '1, not found in connection list".

    The outgoing Message Queue gets filled up so no messages can be send, doesn't matter what combination of QoS Settings, FragmentenSize, PacketSize, MaxSentMessageQueueSize or SetMaxDelay is used.

    The good old "no free events for message", which is happening everywhere, just do a search for it.

    https://www.google.de/search?q=no+free+events+for+message+site:forum.unity3d.com


    I've tried any of the above combinations, and nothing fixes it. You can see by using NetworkTransport.GetCurrentOutgoingMessageAmount() that the Messages just keep stacking up (seriously UNET why are you stacking my unreliable QoS messages?!).

    I'm really disappointed with UNET, as I've build by whole project around network messages and now I have to switch to a networking lib which actually works.

    I went even so far as making two completely new projects to test things out, still same results. How can a "Networking" lib not handle 10 concurrent players with a sendrate of 20 and a packet size below 100 on a localhost machine...
     
    Wattosan likes this.
  2. Alabatross

    Alabatross

    Joined:
    Dec 15, 2012
    Posts:
    223
    Why didn't you submit those projects as bug reports?
     
    Deleted User, Whippets and moco2k like this.
  3. gintautass

    gintautass

    QA Minion Unity Technologies

    Joined:
    Oct 27, 2015
    Posts:
    46
    And write the bug case numbers here ;)
     
    Deleted User and Whippets like this.
  4. ikefrc

    ikefrc

    Joined:
    Jul 3, 2012
    Posts:
    81
    I've went through the effort to create reproducible UNET crashes in two projects and created a bug report 4 months ago (https://fogbugz.unity3d.com/default.asp?760104_i1aan2pja4m8hjpe). As of right now that bug report is still untouched (and that is for a critical bug where a client packet actually crashes the server even when in editor, all reproducible).

    When bug reports go ignored people stop handing in bug reports. This is the forum thread btw where others are having similar issues and where I left some further information when I spend some time digging into the open source part of UNET: http://forum.unity3d.com/threads/ne...-client-crashes-server-even-in-editor.376136/.
     
  5. gintautass

    gintautass

    QA Minion Unity Technologies

    Joined:
    Oct 27, 2015
    Posts:
    46
    I completely understand where the frustration comes from. I will make sure your case gets handled this week. :)

    Lately we have been going through quite some changes that will help us handle more bug reports and make sure that less and less good reports slip by without being handled!

    If you are interested, some blog posts about bug reports.
    http://blogs.unity3d.com/2015/08/17/the-great-incident-bash-of-2015/
    http://blogs.unity3d.com/2013/10/28/bug-reports-incidents-and-some-bashing/
     
  6. asperatology

    asperatology

    Joined:
    Mar 10, 2015
    Posts:
    981
  7. gintautass

    gintautass

    QA Minion Unity Technologies

    Joined:
    Oct 27, 2015
    Posts:
    46
    I will talk with Thomas about that. ;)
     
  8. Wattosan

    Wattosan

    Joined:
    Mar 22, 2013
    Posts:
    450
    The random disconnects seem to be a real problem. And I can support the fact that these happen.

    We "stress" tested with 10 players in one game. Then we tested with 2 rooms, 4 in each. Localhost. Random disconnects and no error messages. The reason I put stress into quotation marks is quite obvious...it was only 10 clients in 1 game, which should be no problem at all.

    These tests were done on separate machines, using IP addresses to connect.
     
  9. ikefrc

    ikefrc

    Joined:
    Jul 3, 2012
    Posts:
    81
    Really appreciate that and hopefully the issues with UNET can be solved. If you look at my forum post you can see that I was an advocate for UNET myself (before running into walls), as it was the perfect networking library for me.

    Agreed, I would also like UNET devs to provide a configuration or even example project which can support lets say 20 concurrent position updates on locahost/localnetwork, because i couldn't get it to work when using NetworkMessages (see first post).
     
  10. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Working LLAPI examples handling 100+ connections wouldn't go amiss either ;)
     
    Driiade, ikefrc and Wattosan like this.
  11. asperatology

    asperatology

    Joined:
    Mar 10, 2015
    Posts:
    981
    Is this being done? Or this is just a wishlist item?
     
    wassx likes this.
  12. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Unity said in the last Reddit that they wanted uNet to be mmorpg ready - so let's see it :)
     
  13. wassxDyna

    wassxDyna

    Joined:
    Aug 17, 2017
    Posts:
    3
    So it seems this issue is dead again,... It's really frustrating. Are there any alternatives? Any maintained 3rd party libraries which are recommended? I would really pay for it.
     
  14. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    There was a lot of work done since this thread that addressed at least some of its issues, such as the new transport layer that came in Unity 5.6.

    https://forum.unity.com/threads/new-multiplayer-transport-release.435133/

    Opening yet another discussion on the various 3rd party networking solutions shouldn't be crammed into this necro thread. At least necro one of the many threads on that actual topic if you don't want to start a new one.
     
    tobiass, TwoTen and FakeByte like this.