Search Unity

So... the unity networking issues.

Discussion in 'Multiplayer' started by gameproducer, Feb 17, 2010.

  1. gameproducer

    gameproducer

    Joined:
    Jan 23, 2010
    Posts:
    25
    I've checked the lengthy thread but wanted to clarify couple of things and thought a suitable way was to simply start another thread.

    From what I've read, I understand that the major problem in unity networking is:

    #1 master server does not work properly (but that there is some sort of workaround for this).

    Am I right with this?

    And I would like to know the second thing:

    #2 unity might drop connections (mess with networkviewids) accidentally so that there can be problems while playing a multiplayer game.
    - I don't know if this is true, so I would certainly like to hear a simple clarification on this too. :)

    Any pros out there to help? Am I correct with these?
     
  2. ColossalDuck

    ColossalDuck

    Joined:
    Jun 6, 2009
    Posts:
    3,246
    You forgot about question #3, when is this going to be fixed?
     
  3. Quietus2

    Quietus2

    Joined:
    Mar 28, 2008
    Posts:
    2,058
    There are a handful of issues at play.

    First are straight up bugs in Unity's networking. The second is the deadly one. A series of threading bugs in the version of Mono Unity is using which causes not just connections to randomly fail, but has also broken their new Asynch Loading functionality.

    Most of it is cataloged and discussed in detail in the following 9 page thread.

    http://forum.unity3d.com/viewtopic.php?t=35724

    So you are correct. Unity's networking is decidedly broken and not usable in a production game. To a man, every person who has developed a game that uses networking has run afoul of these problems causing their playerbase to scream and yell.

    Well so far the only thing we've been able to get out of Unity on the issues is them admitting there are bugs logged in their tracking system. That in itself took 6 pages in that thread of complaining and multiple emails to Unity staff begging for a response.

    Other than that, there appears to be a sense of Unity trying to sweep the problem under the rug and pretend nobody is discussing it. If you want this question to be answered try sending an email to Higgy and see if you get a response.
     
  4. HiggyB

    HiggyB

    Unity Product Evangelist

    Joined:
    Dec 8, 2006
    Posts:
    6,183
    For reference Andy (andeeee) and I were poking dev/qa for a response but those guys are quite busy right now so it took us a bit longer than desired to get a response.


    Nothing here is us trying to sweep anything under the rug, that's not our mode of operation nor our intent. There is the real problem that right now we can only get those into the bug system and do our best at chasing things down and getting the right staff on the ball. But engineering is working hard on a few things right now so we're just not in a position to say "ok, we'll fix this by <insert date>" as first it seems our staff needs to get a handle on why these issues are occurring.

    There is no "sweeping" here, period.
     
  5. ColossalDuck

    ColossalDuck

    Joined:
    Jun 6, 2009
    Posts:
    3,246
    Ok, sorry. Just curious.
     
  6. Quietus2

    Quietus2

    Joined:
    Mar 28, 2008
    Posts:
    2,058
    Higgy, a little more communication would help. I can point to at least a half dozen threads where these topics were recently broached with people clamoring for a response, but nobody from Unity has chimed in on any of them.

    In leiu of someone actually talking to us, being able to search the bug tracker would help. At least then we could follow the issues ourselves.

    As for why the issues are occurring, that's been for the most part figured out by the community. That legwork has already been done. A simple search of Mono's bug tracker for the version you use, shows numerous bugs that have great synergy with the socket and threading problems we're experiencing.
     
  7. gameproducer

    gameproducer

    Joined:
    Jan 23, 2010
    Posts:
    25
    The reason why I'm not interested in "when this is going to be fixed" is that I simply want to know what the current status is.

    Thanks.

    Okay, this is what I was after.

    Would be good if Unity would clearly mention this right in the front page next to "easy networking". Just a thought.

    I know these can be biggies to fix and there's tons of other work, so I wouldn't worry about "when it's going to be fixed?". It's what it is, and if it gets fixed some day then it gets. It's no biggies - just plain facts.

    This is good to know, since now to me it looks like "multiplayer" (online) game is out of question for Unity.

    Any other takers? (Especially with examples of working online games if there is any)

    (Which makes me wonder how these folks - http://musegames.com/games/guns-of-icarus - managed to handle their networking)
     
  8. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Thats no wonder though given that the first posting on a unity network question, independent on what, normally comes from you and claims that the networking is totally broken.

    Why would anyone else chime in there, will only lead to another 20 page thread that already exists for linking.

    I've myself kept out of any networking thread for exactly this purpose
     
  9. gameproducer

    gameproducer

    Joined:
    Jan 23, 2010
    Posts:
    25
    Please talk about policies/stuff/unityresponse/whatnot that somewhere else. 8) I'm just curious to know what the current situation:

    1) does the master server work
    2) does the multiplayer code work. :)

    If people have thoughts (and especially *working examples*) on these, then please reply.
     
  10. Ethan

    Ethan

    Joined:
    Jan 2, 2008
    Posts:
    501
    Well to be honest i have my issues too with unity, but on the other side, most of the time it runs okay.

    To work around Unity's current issues you could:
    - use RPCs only, dont use OnSerializeNetworkView()
    (but this is bad for action oriented stuff)
    OR:
    - Dont let players join/leave while playing, then you
    shouldnt get a problem with the NetworkViewIDs

    My Game (BlobFoot) unfortunately uses OnSerializeNetworkView() because its very action based and also lets players join leave while playing.
    Most of the time the server game works if there are some players (~2-4) joining frequently.
    If theres a lot of player joining leaving, bugs occur (NetworkViewIDs not assigned or -1 or any strange begaviour we talked about in the other thread).

    I also restart my Server once a day with a batchscript, because of strange behaviours after longer use.

    Some month ago i sent my project folder to unity, but never got an answer about it, dont know if they had a look on it or if it was helpful in any way.

    Ethan
     
  11. gameproducer

    gameproducer

    Joined:
    Jan 23, 2010
    Posts:
    25
  12. Ethan

    Ethan

    Joined:
    Jan 2, 2008
    Posts:
    501
    Didnt help me though, i first used Network.Instantiate() then switched to manual allocation and there was no difference. (for me)

    To add sth: i am building on my own raknet networking stuff (using it as plugin) which is in a pretty first version.
    This way i have more control over the networking for future projects (perhaps for blobfoot too)
     
  13. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    1) The new beta masterserver is very stable.
    2) I've experienced many networking bugs, but none that are real showstoppers for casual games. (There is this one vague bug that after a long duration of time connections might mess up..but then again I can't really say if I experienced this one.)
    3) There seems to be progress, some bugs have been flagged as fixed in a future Unity update.
     
  14. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Just because there are some problems and limitations with Unity's built-in networking, I wouldn't say that multiplayer is out of question in general with Unity. Say "Fusionfall" ;-)

    What I'm currently looking into is moving my networking to Photon - the main reason being that I want to scale up (also in future projects) and larger-scale multiplayer is something that Unity's networking is not designed for and so far, I haven't heard anyone saying that this is a direction they will be taking. By now, my feeling is that having larger-scale multiplayer built into Unity is not even desirable simply because it's better when Unity has its focus on the client-side aspects (and frankly, larger-scale multiplayer is something that - even with a built-in system - will just generate massive amounts of support-requests from people trying to create the next WoW with a 1-person team). My feeling is that using a solution like Photon simply gives you much more flexibility than using anything built-in.

    Btw, I think Paradise Paintball is using Photon for networking, and quite successfully so (see also announcement on Exit Games blog).

    Others have used SmartFoxServer successfully with Unity. So, if you really want multiplayer with Unity, there's quite a few options. One is (in case you plan lower-scale multiplayer, like maybe 20 or 30 players): You go with the built-in implementation and hope that the issues will be fixed within a year (which is how long developing a multiplayer game will very likely take). In that case, be ready to file proper bug reports (and maybe ask if you can participate in the beta-program). Or: Try workarounds. That'll still be *much* easier than coding your own networking from scratch.

    The others are: Use any of the other available options (Lidgren, Photon, SmartFoxServer or some of the more expensive solutions if you are really ambitious).
     
  15. Brian-Kehrer

    Brian-Kehrer

    Joined:
    Nov 7, 2006
    Posts:
    411
    One of our genius engineers wrote custom client / server networking over TCP and UDP for Guns of Icarus, with the server written in Mono. It took him about 2 months to get it (mostly) bug free.

    In a couple of weeks, for scalability, we will be switching our basic communication to run on SmartFox , and have wrapped our own higher level libraries around that, as well as improved upon some of their basic communication protocols.


    We'll be making our multiplayer server technology available to games hosted and/or distributed by Muse. Parties interested in joining an alpha list or would like more information, feel free to ping me.

    We're also planning to release a version to the public for sale, but we haven't set a date yet.
     
  16. HiggyB

    HiggyB

    Unity Product Evangelist

    Joined:
    Dec 8, 2006
    Posts:
    6,183
    I'm with you _100%_ on that! Unfortunately this forum hasn't received proper attention at a time when issues were being discussed and so I can understand the points of view y'all seem to have here. So no bad blood, no hurt feelings. :) I'm simply here to state that it's not a specified plan to do this and I'm discussing this with others internally to see about having someone with knowledge active here more regularly.

    So yes, more communication would help, a LOT! :)


    And as to the above, multiplayer games are most definitely possible in Unity, you just have to look beyond the built-in feature set (which is geared towards small scale efforts - think of a few users, up to perhaps a dozen or three?). Brian from Muse chimed in above, there is FusionFall from Cartoon Network, Paradise Paintball on Facebook from CMUNE, all offering multiplayer game play. So it *is* possible! :)
     
  17. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Just as an idea: Maybe you could have rotating dev-forum-times where each dev spends maybe 2 hours per week on the forums (with the number of developers you have by now that should probably add up to "someone on the forums all the time)? The moderators could help the devs by fishing for postings that are particularly relevant to someone in particular but I think it would also be nice to get "somewhat random" answers. Actually, I think I wouldn't even restrict that to the devs but all the Unity people. In any case, I certainly appreciated getting answers by Nicholas and Aras to my "what would be the best Mac for Unity" question a long long time ago.

    I absolutely loved the very active UT folks participation in the forums "in those old days", but it's also understandable that this gets increasingly difficult with increasing traffic. I'm certainly not gonna complain since I spend significantly less time on the forums myself (it's just an incredible time-eater). And I'm not even saying you guys aren't available on the forum or less than before - it may just get drowned in the intense traffic.

    Hehe, you ask for something, pal ;-)
     
  18. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    I would prefer if UT did what GG does: Monthly IRC hour

    an hour where relevant stuff is talked about within a given focus and where at least a few devs are present too.

    that way its 1 hour a month basically for the assigned dev stuff, so not too "impacting"
     
  19. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    Just FYI, we are currently using a system where I patrol as much of the forum as possible each day and note questions that need attention from a specialist developer. I then contact the appropriate developer directly and follow the question up if nothing seems to be happening. This approach usually works OK, but there are times when things can fall through the net. We're all on a learning curve... ;-)
     
  20. Quietus2

    Quietus2

    Joined:
    Mar 28, 2008
    Posts:
    2,058
    I think Aras is a fine example of what Jashan mentioned in his post.

    I have no idea if his presence is a only a result of someone tagging posts for him to look it. It feels as least, as though he's very proactive, involved with the community and is aware of our problems, concerns and desires.

    He chimes in on threads constantly, communicates with the community through his blog and gives insight into the reasoning behind development decisions on a number of entries on the Feedback system.

    Take Zumwalt for example. He uncovered the mono threading bug in robur's post. He's since started 3-4 threads on the problem in the past couple months. Yet, to this day we can't even say for certain that the developers are even aware of the problem, let alone what you guys think about it. That causes a lot of angst.

    Communication, that's all we're looking for when it comes down to it. A developer's world shouldn't end at the edge of his cubicle. If every developer were like Aras, it would be a utpoia around here!
     
  21. HiggyB

    HiggyB

    Unity Product Evangelist

    Joined:
    Dec 8, 2006
    Posts:
    6,183
    We're going a bit off-topic so if folks want to continue this discussion then let's do it in a new thread (over in Gossip). But...

    1. Andy is very active at identifying threads that need attention and alerting the dev/qa crew so they can come lend a hand.

    2. Staff are already supposed to patrol forum areas that fit their expertise if/when possible, but other than those of us that are regulars most folks aren't on any sort of "required minimum time" plan and when problems arise we usually count on Andy (or me, or Ethan, or any other regular) to raise the alarm.

    3. Neither of the above work always and we are of course striving to do better. I know it grates on me but the negative feedback is what causes the most growth as it points out weaknesses and thus offers areas we can improve. So I actually have to say thanks for the crits...

    4. As to IRC hour, I do try, but don't always succeed, to be on the IRC channel for at least a couple of hours each day, typically in the 9am to Noon Pacific range. But I do have to admit that when push comes to shove and my to-do list gets backed up, my IRC time (much like my Facebook/IM/Twitter/etc. time) falls off so I can focus.


    Ok, if anyone wants to continue this then as noted above let's move it out of this thread so it's not buried. Otherwise if folks have ideas or suggestions they'd rather send to me directly then do that too. And Quietus, I owe you a reply on that Mono issue mentioned above (about a company statement), I'm behind but you're not forgotten.


    TGIF and rock on y'all. :)
     
  22. Mangopork

    Mangopork

    Joined:
    Aug 16, 2009
    Posts:
    108
    What about Raknet as a third party wrap-around alternative?
     
  23. HiggyB

    HiggyB

    Unity Product Evangelist

    Joined:
    Dec 8, 2006
    Posts:
    6,183
    What about it? Raknet is exactly what we've implemented as is? If you want to go for 3rd party solutions, Raknet or otherwise, then you're back at the same notion of multiplayer work being definitively possible, whether that's via the built-in features (work needed as per this conversation) or by adopting a 3rd party external solution. :)
     
  24. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    I think one issue with the current networking implementation is that while it's based on Raknet, it doesn't really like to to talk to "plain Raknet". So, in a way, there's "Unity Raknet" and "vanilla Raknet" and the two don't get along so well. It would certainly be nice to have Unity's Raknet open and playing well with "vanilla Raknet" - but I think you also did some custom implementation there so that may not be something trivial to do.
     
  25. MadMax

    MadMax

    Joined:
    Aug 5, 2009
    Posts:
    203
  26. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    IIRC, it's one of the 3.0s ... and possibly even a beta one of those. zumwalt should know for sure ... and of course, Larus ;-)
     
  27. MadMax

    MadMax

    Joined:
    Aug 5, 2009
    Posts:
    203
    And people wonder why they have problems :roll: If you read though some of the release threads, you will see why.
     
  28. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Yeah, in any case I'm really hoping that Unity 3.0 will be the next version and that *all* the packages that Unity uses (PhysX, Raknet, Mono and so on) will receive an update to the most current version.
     
  29. mgX

    mgX

    Joined:
    Feb 23, 2010
    Posts:
    1
    I dont really see the big problem here... Unless you're making a pretty standard game, you are probably better off writing your own network implementation, which isnt that big of a deal considering we got .net to do most of it for us. We had to do this, but considering we're developing an mmo, its not that big of a surprise.

    On the topic regarding the built in mono JIT... Its hopelessly outdated, and should be kept more up to date.
     
  30. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    Unity uses somewhat of a plain vanilla raknet, but it is the 3.0 beta raknet code. Using vs2003 build and framework 1.1 for obvious reasons, larus could chime in for more details