Search Unity

About UNET, TCP/UDP

Discussion in 'UNet' started by Nsuidara, Sep 5, 2017.

  1. Nsuidara

    Nsuidara

    Joined:
    Apr 22, 2016
    Posts:
    36
    Hi all!
    Can we a little discuss about UNET vs TCP.

    I made simple tutorial example about UNET... but i'm dont feel 100% is good way for me... and i start thining about... I using few times TCP etc. for fun and not only Client - Server aplications but not for games 3D :p so...

    I made one project for UNET Client/Server - ok, but this way isnt good because ILSpy give full code game + server side... then i made two projects: UNET Client side and UNET Server side and work fine for me
    but i meybe bad but i a little worry about performance UNET

    and feel waried about this...

    i have skill for made server side in Java / C# (mean example: TcpListener/TcpClient)
    and Unity3D client side...
    (i try for now "join" UNET with TcpListener Server side... but i think is bad way :p - for now not work but isn't problem) because i can also write totaly in Unity3D client side using TcpClient...

    for me isn't problems but i like got any opinion more experienced users Unity3D ?
    it's good way going "own server side" ? or continue going "UNET" way ?

    and also pls not sugesting me about Forge or Photon :p
    what + and -
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    You're making a comparison between UNET, a high level networking API, and TCP, a low level networking protocol. That's like comparing the English language to someone just making some sounds. You can certainly roll your own networking system on top of TCP, but then you're not really comparing TCP to UNET, you're comparing your networking API to UNET.

    TCP though is generally a poor choice for game networking, as the delivery guarantee in the protocol usually creates more problems than it is worth (you don't need a missed position update resent when another will be sent in 1/10 of a second later anyways). UNET uses the UDP protocol.
     
    xVergilx likes this.