SoftwareGuy / Ignorance

Ignorance utilizes the power of ENet to provide a reliable UDP networking transport for Mirror Networking.
Other
248 stars 31 forks source link

Question: Use Ignorance without Mirror/Unity #75

Closed NullQubit closed 3 years ago

NullQubit commented 3 years ago

Hi,

Are there any plans to decouple Ignorance from Unity? We are looking to integrate the transport layer provided by Ignorance but we want to use our own non-unity networking library on top.

Thanks!

SoftwareGuy commented 3 years ago

Hi there!

There shouldn't be any major reason why you can't decouple Ignorance from Mirror. You'll need to modify some parts in the core (ie. Unity's Debug.LogX calls) to not call various Unity things but I can't see why the core won't work on another network stack.

The client/server implementation are self-contained classes and you process I/O via ConcurrentQueues. As you can probably see, I use Unity's update loops, but you could probably hook them up to a while loop that handles network IO stuffs in your own networking stack implementation.

I have no plans in doing so because I'm using Mirror in my own project, if I was using a different networking stack then I'd consider it.

So the tl;dr is yes, Ignorance can be cut away from Mirror and Unity. You'll need to do some refactoring but it should be straight forward.

NullQubit commented 3 years ago

Yes I've realized it was pretty straightforward to decouple it, wanted to confirm that there was nothing else that I was missing. Thanks!