Advanced Networking Questions.

Ok, so I have a few questions about networking. Don’t give me those looks, I’m no noob to this subject :stuck_out_tongue: I’ve worked with networking many times. I’ve creating instant chat clients, simple MMO worlds, and such. The problem is I’ve never touched it in unity, and also; nothing I’ve made has ever been “serious”… (most just POCs, so not very efficient).

So let’s get into some of my questions.

I’m making a game which needs HIGHLY responsive controls. I mean, I’m talking anything longer than a 25ms is going to cause noticeable lag. So obviously I’m going to need to work on some client side prediction in order to remove most latencies. Now, which is the best type of networking to go with for a game like this?

It’s not a shooter. It’s a 2d “sports” type game. Teams ranging from 4-12 (no larger than 12… most games will be 4-6 players). They have a ball or some sort of object they’re playing with (top down) and there’s going to be passing and scoring involved, so there will be a need to have minimal latencies between players.

So, should I go with a authoritative server? My gut is telling me to, but I have no clue how this works in unity.

If I go with an authoritative server, how would I… say… handle physics? Can the server be powered by unity’s physics engine?

I guess that’s my biggest question. They say they made networking easy, but how easy? Is my server going to be written in pure code, or am I going to have a literal unity game instance running on the server? The latter seems too CPU intensive as you want minimal latency.

I’d appreciate some help :slight_smile: thanks in advance guys!

low latency requirements explicitely forbid authorative servers. You need the informations being pushed through without additional processing and being pushed back 1+ ticks on the server.
But what you can do is have the server verify the changes.

If you want to use unity networking and its physics, then yes you are running to run unity game instances on the server. Its no problem for cpu intensity normally, but you will need unity pro so you can use headless clients which get rid of audio and graphics altogether, write some code so it also does not use animations unless really required and you should be fine to go :slight_smile:

Thanks for the help! No, my game uses no animations. All in all my game is built for low latency gaming. It’s very low poly / low texture resolution. I just don’t want to build an entire networking setup wrong, which is why I was coming here for guidance first.

Can you by any chance point me in the direction of some guides / tutorials on networking in unity?

Of course if I do a non authoritative server I’m not going to be having a game instance on the server… or am I just going to be creating a blank unity game that will only be transmitting data to and fro?

Hmm… After a bit of research I think I’m going to try and use Photon Cloud to adapt networking into my game. Any suggestions? It’s in beta, but it looks quite promising. Not sure how many unity developers are using this, so support might be lacking.

I guess I’ll probably end up posting my WIP in the works in progress eventually… for now it’s just an experiment though, I might come crawling right back to this forum for help.

unity photon plugin is pretty good, note if you test it locally there is a slight delay no matter what, meaning two instances, if you test it with someone else the delay is gone because your cpu is only looking at one instance of the game lol