Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Oh my, why so complicated

Discussion in 'Multiplayer' started by ImpossibleRobert, Feb 15, 2016.

  1. Deleted User

    Deleted User

    Guest

    Hey, amazing post. Can I ask you about connections count that your Server can hold via HLAPI or LLAPI?
     
  2. Deleted User

    Deleted User

    Guest


    You just trash.
     
  3. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    Did you just step in this thread to needlessly insult me?

    I can't tell if you're saying I'm trash or I just talk trash. So besides clicking on your dev blog, I am not really sure how I should respond.
     
  4. Deleted User

    Deleted User

    Guest

    Well, considering that I'm 17. I can tell you.

    40 work hours and you failed on a simplest network system, congrats. Also, there is no arguments that you provided to prove that your fail is not your fault.

    Btw, UNET is open source.. Next time use "search" on forum.unity3d.com
    https://bitbucket.org/Unity-Technologies/networking
     
  5. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    I'm not really sure why you believe that because you're 17 years old, it is okay to insult others or express what you perceive as honesty (in such a blatantly offensive way). Your age doesn't change the negativity you impact on others. Nor does it excuse your extremely pretentious attitude.

    Since you're still just a kid, I will go easy on you & your enormous heft of arrogance which results in you belittling others. I get it - you simultaneously think you're amazing at programming (despite being so inexperienced) while also being so insecure about it that you feel the need to appear in threads to point out how unintelligent others are (even those with significant more experience than you). Everyone was young once - although not everyone was a blatant troll when they were young. The arrogance is normal, but seeking out people to belittle is a bit of a jerk move even at your age. And boy is that pretentious ego of yours way too big.

    Hopefully by pointing out how wrong you are, you will be humbled enough to tone down the needless, pretentious attitude. It's fine to be inexperienced, but not fine to act like you know everything (and everyone else is an idiot) when quite the opposite is true (they have the experience which you lack).
    1. The people you are quoting who are trashing UNET, were doing so at a time (over a year ago) in which UNET had just released. At this point it was broken, there was no real documentation, the examples failed to even compile, and after 40 hours I found this out the hard way: It just didn't work. They lied to us, releasing a S***ty product as if it was ready. This isn't any fault of our own, but the actual product itself which was falsely labeled as a "Beta" when it was clearly still in a stage most professionals would term an early "Alpha". You come in a year later after enormous number of updates (when it is much more likely to be an actual Beta product) and insult two people for a year-old post? Because why? Cause I helped others find a working/superior solution? To defend Unity's honor? To boast about your own intellectual prowess? Well done, kid.

    2. As of Today, Forge Networking is still a significantly superior asset to UNET. It not only has many more features than UNET, but it is easier to setup, less frustrating, and just all around superior in every way. People seem to still agree with this according to everything I have ever read about UNET from the community. Not to mention irrefutable facts, such as Full Source Code, which is invaluable for actual professional game developers. I don't know any professional who thinks it is a good idea to go with UNET, even today - it is still bashed as inferior to other solutions like Photon or Forge.

    3. UNET on the other hand has UNITE talks which are pretty much summed up as "How do you make multiplayer games using UNET? You don't. Just don't."

      This professional talk will immediately begin to show you some of the technical limitations of making multiplayer games with UNET. Competent developers are quick to note this in the video, thinking "LOL WUT? Then why did you even use UNET?" Even the comment section will show you users think "The answer: Don't." It's hard to disagree with this.

    4. UNET is NOT open source. This is a common misconception by amateurs who don't fully grasp what UNET actually is. In fact, it makes me question if those users even know how to program. The only part of UNET that is open source is the HLAPI. This is the part that you really don't care is open source. What you want to be open source is, in fact, closed. That is the LLAPI. If there is a problem with UNET, such as in the early days, not having access to the LLAPI means you're screwed. Just like with everything Unity: You have to wait for them to fix it. Having access to the HLAPI is not all that spectacular when the LLAPI is closed.

    5. I don't need to take your pretentious advice to use the "Search" feature because I know extensive details about UNET, Forge, and network programming. Before you go around insulting people, perhaps you should find out a little more about them? I am a professional programmer who has already fully implemented authoritative multiplayer in my own game. I also teach others in the Forge community how to create enormous (infinite) open worlds like Skyrim/GTA/MMO's and how to network them using Forge (or any networking asset which supports authoritative servers). While UNET does support a single dedicated server using the HLAPI, to my knowledge most of the documentation & community uses the Peer-to-Peer networking. My memory isn't perfect, but I believe Phase 2 is where Unity will focus more on dedicated servers.

    And while I don't keep up to date knowledge of UNET, seeing as how it is an inferior product from the start, I do keep up with some of it. To my knowledge most people treat UNET as a piece of crap (Photon is still mentioned almost everywhere in place of UNET) and those who use it focus on its peer-to-peer networking. IMO just based on past precedence with Unity products & Unet? To use UNET for something like a MMORPG would be absolutely lunatic. Forge on the other hand? It already has many fantastic features, a total revamp (Remastered version), and some powerful features in the future. All at a pace that, despite a few stalls, is still faster than anything Unity can do, given their snail pace.
     
  6. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    TLDR: Don't be such a pretentious jerk. This thread was created a year ago when using UNET was ridiculously complicated and UNET was a broken product with broken examples & no documentation. From what I gather UNET is significantly better but still sucks and necroing a thread just to belittle others is not cool, even if you're just a kid.
     
  7. Deleted User

    Deleted User

    Guest

    Well, seems like we have an Forge advertising from "professional" programmer. But still no technical arguments provided about UNET.
     
  8. Deleted User

    Deleted User

    Guest

    All what I can say to you, that I'm started to use UNET in July 2016. And yes, with my age UNET was pretty easy for me to done my work for Small Academy of Science. (Without documentation, where they do all work for you which you are missed so much). Keep going write advertising about Forge networking system, you doing it well, better than coding for sure)
     
  9. Deleted User

    Deleted User

    Guest

    And yes, your memory isn't perfect. Because in 2k16 and now you can have an Dedicated Server on HLAPI which will have Authoritative system. As I said you are not so clever if you can't read documentation properly and realized that, [Command] - is secure unless you don't pass any data in it. Try to find some Tutorials on Youtube which was uploaded around May 2016 and you will see, that you are not that "god" in programming, and your message about 40 hours of work really is useless in this thread.
     
    Last edited by a moderator: Apr 6, 2017
  10. cdarklock

    cdarklock

    Joined:
    Jan 3, 2016
    Posts:
    455
    Not that you know what you're talking about. But you can sure tell us. We'll point and laugh and know you're wrong, but you have fun with that.
     
    CarterG81 likes this.
  11. Deleted User

    Deleted User

    Guest

    Strong words, actually not
     
  12. cdarklock

    cdarklock

    Joined:
    Jan 3, 2016
    Posts:
    455
    You can actually not tell us? I'll get the champagne.
     
    CarterG81 likes this.
  13. Deleted User

    Deleted User

    Guest

    Open your eyes, answers are above...
    I'm faced with really hard trolls.
     
  14. cdarklock

    cdarklock

    Joined:
    Jan 3, 2016
    Posts:
    455
    Oh, that garbage. Yeah. I'm done pointing and laughing at that, it's not fun anymore.
     
    CarterG81 likes this.
  15. Deleted User

    Deleted User

    Guest

    Well, garbage starded from your first message on this thread page, but ok, you doing good.
     
  16. cdarklock

    cdarklock

    Joined:
    Jan 3, 2016
    Posts:
    455
    Bored now.
     
    CarterG81 likes this.
  17. Deleted User

    Deleted User

    Guest

    At least learn to troll if you can't tell something really usefull)
     
  18. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    Nice job cherry picking two sentences in my post while ignoring the rest so it fits your narrative better. You are doing nothing but posting things the community will facepalm or ignore, because you are not just wrong but being an enormous troll about it. You don't have to be so pretentious when you reply.

    For example, you claim I am just advertising Forge but can't code? You haven't even seen any of my code, so how would you even know? That is an example of why you look ridiculous.

    Let me just ask you one question, which finally might get to your incredibly lofty attitude...

    Technically speaking, what are the biggest obstacles in creating an enormous world and networking it? Can you describe to us how most programmers implement this? What about networking it so you can create a huge open world like most Survival games?

    Hell, I can make it easier on you, since you don't know the answer. Without googling it, what is Unity's most common limitation with huge open worlds? The common problem people have to solve when their world gets too big? I will give you a hint: Kerbal.

    Even easier: Without changing tabs, can you explain to us how an authoritative server works? A simple example of cheat prevention using an authoritative server model?

    You can cheat & Google this and claim you didn't, np. That isn't important. What's important is YOU knowing that you don't know the answer. The second is a pretty common problem too which extends into a lot of Unity work. Not just large worlds. The last question is elementary to network programming. UNET is useless without this level of basic knowledge.

    I know you don't know the answer to any of these questions. The problem is... you don't seem to know that. And you think belittling experienced programmers, when you have no idea what you're talking about, is a great idea.
     
  19. Deleted User

    Deleted User

    Guest


    Lmao. If you ask me this questions you are literally retarded, nothing to say to you.with UNET you can have a Client-> Server architecture, if you really don't know how, I'm feel really sorry of you. StartServer() method is for you And CmdMove(Keycode.W); from client is for authoritate moving. I'm just trying to explain it to you, but you are so stereotyped.
     
  20. Deleted User

    Deleted User

    Guest

    Hope lucasmontec code will help you to undestand those basics with UNET.

    https://forum.unity3d.com/threads/unet-fps-fast-paced-authoritative-character-controller.384346/

    https://github.com/InVoid-Games/UnetCharacterController
     
  21. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    The fact you think I am asking you so i myself can learn is perplexing. Let me assume english isn't your first language & let that slide.

    Now your answer reveals you not only have no idea what the answer is, but you have no earthly clue what an authoritative server even means.

    You can't answer the simplest question, let alone the other two. That is all the evidence we need, along with that devblog, to see you are not just clueless...

    But you have no intention on bettering yourself.

    You are clearly here only to troll. And if not? I don't know if I have ever seen such a phenominally pretentious heft of arrogance before. Most 17 year olds are infinitely more mature & humble than what you are displaying here. That is sad, because you are empirically wrong on so many levels... not to mention highly immoral with such childish mockery.

    Grow up kid, and troll elsewhere.
     
  22. Deleted User

    Deleted User

    Guest


    I'm not saying that UNET can handle MMO, but hold on. https://www.assetstore.unity3d.com/en/#!/content/13867
    Here we go. I'm just said that you are trash because you crying because you failed with your 40 hours of work, because it's really your fault. And you still can't say anything technically why you failed, you just can't tell me the technical facts, instead of it you saying about Forge, but the question it's not about your Forge system, chill out boy, and you still call yourself proffesional programmer, what a shame.
     
  23. Deleted User

    Deleted User

    Guest

    Instead of just say that it's your fault, you keep saying something about my personality, but the question it's not about me, it's about you and your 40 hours of useless work.
     
  24. Deleted User

    Deleted User

    Guest

    Authoritative server means, that server handle clients, Client can only ask a permission from Server for interaction with others.

    Example: Instead of saying that I'm client and I hit a player for 100 healths,
    Authoritative server means that client can only Press Left Mouse, and Server will calculate whole shot method if player has enough bullets and alive and then cast a Raycast, calculate damage, etc.
     
  25. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    You seem mistaken. In no universe is my competence in question. This entire conversation is exclusively about your personality, because it is so incredibly rancid I felt the need to try to help you, rather than laugh at you like everyone else.

    My mistake was in trying to reason with someone who has some serious personality issues.
     
  26. Deleted User

    Deleted User

    Guest

    Well, I asnwered to all your questions, but you still trolling me. It's really hard for you to accept this.
     
  27. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    You did not answer my questions, but displayed an obvious lack of understanding in...everything.

    My question was asking for you to show us an example in CODE, without googling. That means you can't copy/paste someone else's work or link to someone else's site. An example is elementary and takes about a minute for someone who knows their stuff.
     
  28. Deleted User

    Deleted User

    Guest

    You really have no idea what UNET is. Don't, just don't ask me questions again and again if you don't even know that UNET ca
    Well ok, give me a minute.
     
  29. Deleted User

    Deleted User

    Guest


    Code below is for simplest Authoritative Shooting system.

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using System.Collections.Generic;
    4. using UnityEngine.Networking;
    5.  
    6. public class NetworkPlayerController : NetworkBehaviour
    7. {
    8.  
    9.     //Global defines :Client, Server will be compilated with preprocessor directives;
    10.  
    11.  
    12.     [SyncVar(hook = "OnHealthChanged")] //Hook for health change;
    13.     public float PlayerHealth;
    14.     [SyncVar]
    15.     public int BulletsCount;
    16.  
    17.     void Update()
    18.     {
    19.         if (isLocalPlayer)
    20.         {
    21.             if (InputGetKeyDown(KeyCode.Mouse0))
    22.             {
    23.                 LocalShooting();
    24.                 CmdShot(); // call command;
    25.             }
    26.         }
    27.     }
    28.  
    29.     private void LocalShooting()
    30.     {
    31.  
    32. #if Client
    33.         //Spawn a bullet localy.
    34.  
    35.         //We also can calculate hit localy to spawn a decal if hit the body
    36.  
    37. #endif
    38.     }
    39.  
    40.     [Command]
    41.     public void CmdShot()
    42.     {
    43. #if Server
    44.  
    45.         //All what we have here will work Independently from client.
    46.         NetworkInstanceId playerId = netId; //Get the netID of player;
    47.  
    48.         //Shooting check here
    49.         if(PlayerHealth > 0 &&  BulletsCount > 0)
    50.         {
    51.  
    52.         //We can cast a shooting method;
    53.  
    54.  
    55.         //if hit,  we can spawn a blood decal and change health via RPC.
    56.         //get the NetworkInstanceId of hit enemy object;
    57.         GameObject enemy = NetworkServer.FindLocalObject(hitNetId);
    58.         var enemyController = enemy.GetComponent<NetworkPlayerController>();
    59.        
    60.         enemyController.PlayerHealth -= damage; //The hook OnHealthChanged will call automatically;
    61.        
    62.         RpcSpawnDecal(decal position, decal rotation);
    63.         }
    64.  
    65. #endif
    66.     }
    67.  
    68.  
    69.     [ClientRpc]
    70.     public void RpcSpawnDecal(Vector3 pos, Quaternion rot)
    71.     {
    72.         if(isLocalPlayer)
    73.            return; // we don't want the dublicate of decal for our client, this function will work for other clients, but not for our local player.
    74.  
    75.         //Spawn decal here;
    76.     }
    77.  
    78.     void OnHealthChanged(float newHealth)
    79.     {
    80.         PlayerHealth = newHealth; //Client can avoid Health change, but still will die cause of server check below.
    81.         UIManager.UpdateHealth(newHealth); //Update our slider Health;
    82.  
    83.  
    84.  
    85. #if Server //This part of code will be only in Server Standalone build and client can't avoid it.
    86.  
    87.         if(PlayerHealth <= 0)
    88.         {
    89.  
    90.             //ServerRespawn method;
    91.             NetworkServer.DestroyPlayersForConnection(connectionToClient);
    92.  
    93.             //Spawn then call NetworkServer.AddPlayerForConnection();
    94.  
    95.         }
    96. #endif
    97.  
    98.     }
    99.  
    100.  
    101.  
    102. }
    More about how global defines works: https://wobesdev.wordpress.com/2016...-the-source-code-from-the-eyes-of-the-player/


    You really can skip them, but if you want to have your code clean it's recommended. If your server code in [Command] has been modifyed with .NET Reflector on client, it's still doesn't matter and it will not affect the server, because Server has its own copy of function. You can try :)
     
    Last edited by a moderator: Apr 7, 2017
  30. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    Congrats, you answered the easiest question among three easy questions, proving you knew what you originally claimed: a basic understanding of UNET.

    You don't have to explain defines to us. We get it. You just found out they exist & love them right now, thinking theyre the best thing since sliced bread.

    Looking at the code it seems fine, although I'd be concerned with quite a few things.

    For someone who needlessly defends UNET & claims I am just advertising Forge...do you even know the differences between Forge Remastered & UNET?

    I dont expect an amateur like yourself to answer the harder questions, but I find it strange you attack Forge, as if UNET is great, when you know nothing about Forge.

    Looking up its strengths would tell you immesiately why it is so much better than UNET.
     
  31. Deleted User

    Deleted User

    Guest

    No no, Forge is also good, I'm not telling to you anything bad about it. All depends on what you want to create. UNET it's pretty for beginners like me I think, but it's free and can be used out of box. I know, that I supposed to look into RakNet, or Forge networking if I want to do something real big, but still, for my survival game which can handle about 100 clients per Server I will use UNET.
    This discussion was pretty good and funny, hope your opinion about UNET will change with the times. Thank you for your time ;)
     
  32. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    My opinion about UNET will change with every update, as it gets closer & closer to what most would find an acceptable release candidate. Which usually takes years after the end of Unity's beta, since that seems to be UT's style. They focus most of their money/employees on their services, not their actual product. That is what I gather from reading reviews from actual employees in the company. Plus it explains their snail pace in development.

    What type of survival game are you making? 2D? 3D?

    100 clients per Server in a survival game? That sounds like something you really don't want to use UNET for. That is much closer to a Forge task, IMO.

    From what I gather UNET is much more acceptable when you're talking very low numbers in a Peer-to-Peer setup. Like a simple 4 player card game or small time COOP FPS. Then again... that sums up Unity pretty well. It really seems more of a K.I.S.S. engine than otherwise. Not that you can't make bigger games, but that you really have to become a Unity expert (there's a ridiculous number of nuances & quirks you have to learn - not to mention Unity's numerous limitations).

    If you haven't already, you seem smart enough to benefit from this UNITE talk, since you're definitely sticking with using UNET.



    You can also check out my signature for some links to creating Huge Open worlds, such as those found in Survival games. If you haven't already used those resources.
     
  33. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Personally attacking people is against the rules, whether you're 17 or any other age.

    --Eric
     
    CarterG81 and Zullar like this.
  34. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,462
    Geez, what the heck is going on in here.
     
    MurcsRoyce and CarterG81 like this.
  35. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    Just a few growing pains is all ;)