Another Mirror Networking rant…

It is time for another Mirror Networking rant or whatever you want to call it. And it’s kind of funny, because I’m actually one of the few people in the development team that points out shit that the other developers either don’t care about or “if it was me, I wouldn’t be doing it this way”.

Previously I had mentioned about how transports poll for network updates and how that could be improved, where LateUpdate was way too late for applying network state when the server state could have changed in the meantime.

Anyway, this grumble piece is mainly just the direction of the network stack. Just for some perspective, a lot of our user base are programmers that are not veterans, but they might be advanced Unity developers. That said, we also have a lot of beginners that try to jump in and make networked game in a few clicks. For those people, the jokes on them – they simply burn out and rage quit because they cannot read the fucking manual or understand the difference between Commands and RPCs.

The main point is I do not know where the future of Mirror is heading. To me, it feels the project is so fragmented that I am having a hard time even figuring out what is what. And to me, that’s concerning because I don’t want to be in a mine cart that’s going to derail and fall into the abyss.

Sure, we take PRs and support tickets and try to fix things, but the project leads sometimes flat-out reject ideas because “oh it’s against my vision”. Community developers with good ideas or addons get shafted up the ass because upper management says “Nope”, they then drop Mirror, and get poached by Exit Games or another networking development team.

Mirror was supposed to be a community project in the past… but honestly it doesn’t feel like that anymore. On the discord, there’s a rule that says, “If you can code and want to help, please do!”… yeah, you cannot really do that if you just toss bugs and PRs under the bus all the time.

Right now, one of the lead Mirror developers is busy off making some super TCP transport. Telepathy was used as a stopgap measure to provide a TCP solution, but due to Unity thread limits it caps out at around 600+ CCU. From what he has said, there has supposedly been 5 internal TCP transports or something I cannot confirm and out popped Apathy, which is basically native TCP sockets with a wrapper that plugs into Mirror. Now, there is a work in progress libuv-based TCP transport in development.

We all know that TCP is a bad idea for games, especially when you have high latency and packet drop/loss. Now, the average networking dude will say “oh, TCP has no packet loss” but it does. If TCP does not get an ACK to say the packet was received by the remote device, it will resend that packet. That is how it makes up for its packet loss/drop. Imagine that you have got an unstable connection and you are getting a huge packet build up… yeah, that is going to cause problems, isn’t it? Even network veterans have seen games die when you have 1% packet drop/loss and high ping clients on TCP.

But that begs the question: why is it that the developers are so busy chasing CCU and transport shit when there’s bugs that are still outstanding that need to be fixed and PRs to consider as well that include improvements and quality-of-life ? Get the priorities right, guys, it’s not that hard!

Most of the transports work fine as-is right now (and my transport already excels in that department). It’s the high-level API that needs work and clean-up, not the low-level world. Mirror still inherits a lot of design choices from UNET days and breaking free of that design choices is hard because we’ve got some big companies using Mirror. Breaking their games would literally be somewhat suicidal.

One thing I am seriously considering is forking Mirror. There is some PRs and commits that might have benefited me and my projects, and I really do not give a shit about TCP transports. While it might work for bunch of games, I am not making a game dependent on the benefits of TCP. I prefer to use UDP as my weapon of choice.

If I do fork Mirror, I will probably slap in a slimmed down version of Ignorance, my Enet-powered Transport as the default transport and ditch TCP-based stuff. Enet’s a great network library that is tried and true as well as being used by many AAA titles. Works well for me on my machine.

Anyway, grumpy Coburn out. I really do not have anything against the Mirror development leads, but some of the decisions are so near-sighted and some of them made in the past seem to be caused by having the head up the ass, literally.

Leave a Reply

Your email address will not be published. Required fields are marked *

Comments Protected by WP-SpamShield for WordPress