Let’s be clear. Currently UNET HLAPI is a mess.
Yes, I read that HLAPI it is just an “example of what can be achieved using LLAPI”
Yes, I read that you are thinking to make it open source.
But there is a problem.
First. In most cases, open source = abandoned and low quality. Forget about it.
Second, about LLAPI.
Let’s open your website
https://unity3d.com/unity/features/multiplayer
What we see?
“Unity Multiplayer is the simplest way to create multiplayer games for Unity. It’s fast to implement and highly customizable.”
So, your goal was to create the simple but flexible network solution for everyone, right?
Good goal.
But you have failed.
HLAPI is not easy and not flexible at all.
LLAPI maybe a flexible but it is super complex. Only a super experienced software engineer will be able to create a good network architecture which will be suitable for real projects.
It is not a definition of “simple” network solution.
Besides that. Working on LLAPI is a waste of time.
Why? Look:
What is Unity? Why people using Unity? Because Unity is a high-level solution. People no longer need to develop own game engines. People may create games, not a game engine. And it is great.
But even though Unity is high-level solution - it is super flexible. We can do anything using Unity!
That means that high-level != low flexibility.
Once good high-level solution will be done, it is no longer necessary to work on own solution using low level tools.
The same with network.
If LLAPI is required - it means that your goal with HLAPI has failed!
If HLAPI will be good enough, there will be 0 reasons to work with LLAPI.
For example, previous network system (Raknet) was great, it was high-level, super flexible and we can make almost anything with this tool. But you dropped it.
Raknet is much much much more flexible than HLAPI.
So currently people forced to develop own network system using LLAPI, which is super hard.
Every developer should reinvent the wheel over and over and over again. Everyone should develop the same wheel.
Only because you didn’t managed to make HLAPI right.
People will not be able to use LLAPI in correct way.
People will not develop HLAPI instead of you.
It is your goal to develop HLAPI and provide the best solution for your customer.
You want to use power of community? Great. We will send you ideas, suggestions, bug reports and also, we can work on manuals and tutorials.
But YOU must develop the HLAPI. Not a community.
You receiving a lot of money from customers (since Unity on subscription plan) and it is your job to develop such super complex and important thing like network solution.
=============================================================================
So, actually a list of things which must be done:
1.
GameObject with NetworkIdentity disabled while no connection established. Fix it. There is no any reason for that. Who came up to this idea? No other network solutions are not requires that.
2.
NetworkIdentity component have bad performance. Explanation:
Create 5000 of cubes with NetworkIdentity component attached. Open a profile. You will see 1-2 ms of updates due all of these NetworkIdentity, even if they do nothing.
This completely ruins a possibility to create a complex sandbox games with a lot of dynamic objects.
In previous network system, NetworkView component didn’t had such problem.
3.
Add an option to disable “auto remove game objects when owner is disconnected”.
Maybe it is possible somehow, for example:
But super complex and looks like a kludge.
For example in TNet it can be done using just a single bool argument in instantiation call.
Take a look:
4.
Do not block a possibility to send RPC from objects without authority! Like it was possible in previous network system.
Yes, I read you think that such code is “cleaner”, “more secured” and “easier to debug”. Completely disagree.
Even if you want to teach developers how to develop an architecture - write an article about it! Do not force us to develop thing using only your way! Maybe someone want to use another approach? It is our choice!
5.
Add a possibility to spawn object with additional parameters. Currently we have only NetworkServer.Spawn (), that’s all. If we want to set any additional variables we should use [SyncVar], which is garbage because (look item 2) and not designed for this task anyway. We need to update this variable only once! During instantiation, but SyncVar designed for variables which changes often.
Also we can create additional RPC functions in order to set additional parameters, but such functions is not buffered and also entire code became much more bulky (like spaghetti code, despite the fact that you are trying to assure us that UNET have “cleaner” code).
It should be done using the same approach like in old NetworkSystem using custom spawn function:
The code is super clean and easy to use, and also very flexible. It even managed to spawn a prefab with many NetworkView component inside using this approach by sending array of NetworkViewID which was allocated by several calling of .Allocate (). Super easy and super flexible! Return it back!
Also you can use another very elegant approach like it is done in TNet using special RCC functions. Take a look:
6.
Add a byte counter like it was in previous network system. It is easy. Just add it! When I was beginner, this information allowed me to learn a lot about efficiency of various approaches in network architectures.
7.
Add a possibility to manually allocate NetworkViewID and assign it to NetworkIdentity component like it was possible in previous network system. It is super important feature if we need to spawn complex prefabs with NetworkIdentity on child. Yes, I know that NetworkIdentity on child is a bad thing, but it is still possible! And sometimes it is necessary. Just add this functionality. It was available before and worked great.
8.
Add an analogue of RPCMode.Others from previous network system. Sometimes it is required. It was available earlier and was very handy. Return it back.
0.
Do not mark old Unity network as deprecated while UNET HLAPI is such a mess and not fixed! Raknet is much easier to use than UNET, but new customers of Unity even not aware about this “lost technology”.
There is a lot more flaws, for example very complex procedure of server initialization. But at least it could be acceptable.
However, a list above is completely unacceptable! All these features worked in previous network system. UNET is a pure degradation.
The only thing that I like in UNET: It is very easy to invoke RPC functions. That’s all. Everything else is pure disappointment.
Maybe I am rude in this post. But it is only because I am love Unity and for 3 years I saw like Unity dropped great network solution, replaced it with something unusable and you didn’t even realized a mistake.
As result, currently there is no good and reliable network solution for Unity!
This is something which should be fixed ASAP! You should spend most of your resources on this task!
But I don’t even see something about network in nearest roadmap : (
Hope you will read this, realize flaws and starts to develop HLAPI to the usable state.
If you will need any additional information about my suggestions and why it is necessary - I will be glad to help.