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

LLAPI vs Forge

Discussion in 'Multiplayer' started by Deleted User, Mar 4, 2017.

  1. Deleted User

    Deleted User

    Guest

    I've been a little confused on using the LLAPI, would I be able to connect to a dedicated server?

    If yes, what exactly does Forge Networking do better than LLAPI?
     
  2. mofirouz

    mofirouz

    Joined:
    Jul 14, 2015
    Posts:
    27
    I've not used either in production so I can't comment on the performance differences (e.g. lag etc).

    Here are the differences:

    Unity Multiplayer uses RUDP (reliable UDP protocol).
    Forge which uses a Websocket connection (which is TCP). Theoretically TCP could seem to be slower because of the fact that messages need to be acked on delivery.

    Unity Multiplayer "can be a client, a dedicated server, or a combination of server and client at the same time. This combination role is the common case of a multiplayer game with no dedicated server." You can use Unet multiplayer services to host the game, use your own dedicated server, or go down the peer-to-peer route which is effectively write your code in such a way that one player within the match is acting as the server and there no hosted servers. The latter is the "cheapest" from a cost perspective but it's the hardest to get going. You'd need to remember to do NAT punchthrough etc.

    Forge Networking does not offer a multiplayer service. You can either do peer-to-peer, or write a specific version of the game to always act as the host server.

    From the looks of things, Forget Networking maybe simpler to use from a coding perspective whereas Unet has many many different bells and whistles (like getting health of the network, pings etc).
     
    ivan866 and dangakun like this.
  3. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    @mofirouz Thanks for helping answering these questions but I want to go ahead and fix a lot of these inaccurate assumptions.

    Forge Networking supports TCP, UDP/RUDP

    Our protocol was started on the websocket protocol. This is so we can easily support websockets and WebGL (which is nearly finished now). Our most used protocol is UDP/RUDP from our users, however if you need TCP then that is an option for Forge (why support one when you can have both).

    This is the same structure as Forge except we give you the native source code so you could build your server without Unity whatsoever. We designed Forge so that it was built completely outside of unity, then we built a bunch of unity libraries to hook into Forge Networking. This makes performance extremely fast and means that there are no dependencies you have to manage from unity inside of Forge if you so choose.

    Forge has this built in and a server for this as well for your own usage.

    We do not offer a cloud service (yet) this is true. We have a large community to show you how easy and cost efficient it is to host in a dedicated cloud environment. Otherwise Forge has a completely Authoritative network architecture, this means all network traffic goes through the server which makes security a concern of your game design and not the networking system. Because all of the network traffic goes through the server, this also means that "peer-2-peer" is not something we support. Peer-2-peer is great for things like voip but are extremely hackable and requires all clients to know each others IP/Port numbers (users can be very concerned with this).

    We actually have many, many tools for you to use. It is true, our code is much simpler and some users have claimed it to be faster due to the effective use of threading for the networking layer (I've not made an elaborate test yet). You can even track the raw bandwidth in/out of each socket, have multiple client/servers running in one instance (a chat, voip, and game server running simultaneously for server/client), pings for round trip, etc. Not to mention we have the best support for a networking system available due to our daily live conversations with our community via Discord.

    I'm sorry for the lack of video tutorials on Forge Networking Remastered. We will actually be getting to those within 1-2 weeks. For now we constantly update our public documentation :) http://docs.forgepowered.com/

    Edit Being the developer of Forge Networking (which was released before UNET) I've never actually used UNET at all. So I am not the best person to make this comparison for you. I'll send a message on Discord to see if anyone in the community has some thoughts on this (for those who have used UNET).
     
    Last edited: Mar 6, 2017
    harleydk, mofirouz and ZhavShaw like this.
  4. dumbfire

    dumbfire

    Joined:
    Dec 11, 2013
    Posts:
    3
    @Entelicon I do not have llapi experience but I have tried the hlapi unet and have settled on using Forge Remastered for my project. As a programmer with little networking experience I have found the community of Forge Remastered to be an incredible help for guidance and bug fixes along with network design. I highly recommend using Forge Remastered for these reasons. Also, the developers are highly responsive which is always a bonus!
     
  5. mofirouz

    mofirouz

    Joined:
    Jul 14, 2015
    Posts:
    27
    Honestly, awesome reply with a lot of valuable content :)
     
    Brent_Farris likes this.
  6. SLAS

    SLAS

    Joined:
    Aug 4, 2013
    Posts:
    15
    is forge FREE?
    im watching this video and it looks like is not free, but in asset store it looks like it is! so, is forge free?
     
  7. SLAS

    SLAS

    Joined:
    Aug 4, 2013
    Posts:
    15
    And now im readis this:

    " Open Source Announcement!
    After much time of thinking we decided to make Forge Networking an open source project. We will continue to develop the system ourselves but now with the help of the community! ..."

    that is the answear I was looking
     
  8. daxiongmao

    daxiongmao

    Joined:
    Feb 2, 2016
    Posts:
    412
    @farrisarts sorry to revive this thread but I had a question. You said forge supports nat punch through. But later you say it doesn’t support peer to peer.

    I guessing what you meant is like true peer to peer with no authority. But not where a client acts as the server. Otherwise what would you need the nat punch through for.