Search Unity

Feedback [WIP] [ScapeNet] Lidgren Packet Library (Unity Support)

Discussion in 'Works In Progress - Archive' started by DaedricWolf19, Oct 17, 2019.

  1. DaedricWolf19

    DaedricWolf19

    Joined:
    Nov 23, 2015
    Posts:
    5
    Hello!

    First, i would like to say that i have debated releasing this, but considering the new Unity networking is coming, and that there is no fully free alternative at the moment, I've decided to just do it. There is some example projects, a Unity networking example and some wiki articles.
    I got fed up with Unity's networking system, although it is pretty good, it's hard to understand at times, and can behave pretty weird. It's also on the chopping block, so it put me off properly learning it. I like high level networking systems, but they don't do it for me anymore. I want full control of whats happening, and so i switched to Lidgren.

    However, i've been battling with Lidgren for sending more organised data for a while, and decided to write a small library from scratch to solve my problem. I used to do some programming in LUA for Gmod, it allowed you to send information between the client and server by way of string identifiers. I loved the setup and decided to create a library centred around this for Lidgren. This allowed me to define generic packets with identifiers, that allowed me to make large packets containing quite a bit of data, that i can then set a name to and send. On the serverside i can simply wait for the name to be received then run the appropriate defined function for a packet with that name. This allows some powerful stuff, such as defining 4-5 types of packets with the same defined packet class at their heart, but do totally different things.

    I've written some Unity support for my library. This contains full player and object id systems, spawning, syncing of player movement, the lot. Its taken me a few months, but i already prefer using it to straight Lidgren, and there are next to no alternatives, since everyone is scared of writing Unity networking stuff at the moment.
    I hope i am giving back just a little to a community that has helped me so much over the years. I will continue developing my little library, and i hope a few of you get some use out of it :D

    TL:DR: I have created a small library that lets you packet up data and send it through Lidgren. It has Unity support, with synced player movement, object and player ID's.

    https://github.com/Ian-Henderson06/ScapeNet