From: Forest Date: Thu, 27 Dec 2018 23:07:44 +0000 (-0800) Subject: Update readme to reflect my personal heading for this fork. X-Git-Tag: 1.0.0~62 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=bac49928963ff2bf8c1a2d54e08d1fe144e21fc4;p=rhonda%2Fimpostor.hazel.git Update readme to reflect my personal heading for this fork. --- diff --git a/README.md b/README.md index 3406e07..305b699 100644 --- a/README.md +++ b/README.md @@ -1,32 +1,41 @@ -#### Hazel Networking is a low-level networking library for C# providing connection orientated, message based communication via TCP, UDP and RUDP. +#### Hazel Networking is a low-level networking library for C# providing connection orientated, message based communication via UDP and RUDP. -Its aim is to provide a standardized interface for web communication so that using and switching between protocols is incredibly simple. - -Hazel can be downloaded as a NuGet package [here](https://www.nuget.org/packages/DarkRiftNetworking.Hazel/) or you can get the latest build directly from the releases page [here](/../../releases)! +The aim of this fork is to create a simple interface for ultra-fast connection-based UDP communication for games. ----- ## Features -- TCP, UDP, Reliable UDP and (at some point) Web Sockets -- Completely thread safe +- UDP and Reliable UDP. +- UDP Broadcast for local-multiplayer. +- Completely thread safe. - All protocols are connection oriented (similar to TCP) and message based (similar to UDP) -- Standardised interface so that all protocols can be used interchangeably with each other - IPv4 and IPv6 support - Automatic statistics about data passing in and out of connections - Designed to be as fast and leightweight as possible ----- -### Hazel is currently in beta; things should (but might not) work! +### This fork has been heavily modified from the original to reduce allocations, copies, and locking. As such, it's fairly stable, but not guaranteed. However, my game Among Us currently runs on it with over 200k MAU, so that counts for something. ----- -HTML documentation, tutorials and quickstarts are available on the DarkRift Website [here](http://www.darkriftnetworking.com/Hazel/Docs); support is available through [email](jamie@darkriftnetworking.com) or alternatively Hazel has a thread on the [Unity forum](http://forum.unity3d.com/threads/hazel-networking-open-source-rudp-tcp-library.409863/) where you'll also find updates and other news. +HTML documentation, tutorials and quickstarts from the DarkRift Website [here](http://www.darkriftnetworking.com/Hazel/Docs) should be relatively accurate; but I doubt the original creator will want support calls for this fork. I can provide some limited support if you create an issue. + +I have changed some interfaces in "non-intuitive ways", such as when to recycle MessageReader from DataReceived vs MessageReader.ReadMessage. To be honest, sorry but ¯\_(ツ)_/¯. It's my belief that if a library becomes friendly and proper-API-like, you can expect it to be restrictive or perform slowly. I don't want either of those things, but I try to keep things fairly tidy. -If you want to make improvements, do so! If you find bugs, raise issues! +If you want to make improvements, I am open to pull requests. If you find bugs, raise issues. ----- ## Building Hazel -To build Hazel open [solution file](Hazel.sln) using your favourite C# IDE (I use Visual Studio 2015) and then build as you would any other project. +To build Hazel open [solution file](Hazel.sln) using your favourite C# IDE (I use Visual Studio 2017) and then build as you would any other project. + +----- + +## Tips for using Hazel with Unity + + * Unity doesn't like other threads messing with GameObjects. This isn't a problem for tasks like relaying information. But for tasks like spawning GameObjects on clients or correcting physics, you will want to have a thread safe list of events that are run and cleared during Update or FixedUpdate. + * A List+lock(object) is fine because you have many writers, one reader and Hazel doesn't guarantee event order. + * A ConcurrentBag is not a bad choice, but you will have to do something special to keep the Update method from hanging if you get an overwhelming number of new events (which suggests problems with your code elsewhere). + * I also recommend using the ConnectAsync method in a Coroutine that waits for State to change so you don't hang the game while connecting. \ No newline at end of file