Hi, I’m getting started with NetCode and have some questions, I’ve only used Mirror for networking before and am not very experienced, I’d be glad if you could answer some of those
1- I want to prototype a co-op Hack and Slash game (like 4 players), is NetCode suited for this? If not what other choice do I have (with dots)?
2- Is it possible to do ClientRpc, Command, TargetRpc with NetCode?
3- Is there a better documentation/tutorial somewhere? I’ve checked the getting started part and barely understood anything.
4- I want to use TDD, is it possible to create Client/Server worlds in and simulate them in test cases?
5- Can I test the game on single machine, with Mirror I used Editor for host and build for another client
Should be fine as long as you have a dedicated server. Client hosted server should also be mostly possible, but we don’t have utilities for nat punch through / relay server.
It doesn’t work the same way, but you can send "rpc"s (they are more like messages) both client → server and server → client. You also have a command stream going from the client to the server and a snapshot stream going from the server to the client.
You will probably have to re-learn a lot though as it is not trying to stay close to our previous solutions.
We use the NetCodeTestWorld for this, we have pretty many tests already so you can look at the tests in the package for inspiration.
Yes, whenever you enter playmode you sill start client and server worlds in the editor process. You can use the PlayMode tools to simulate high ping / packet loss etc. and also add fake “thin” clients as long as you generate some fake input for them.
You can also connect the editor playmode to a build player with either of them being the server.
1 Like