firstly Non-Authoritative server setups seems cool!
Now I want to move into an Authoritative server setup to avoid the “cheating” that can happen?
Can anyone explain “cheating”? Can someone provide a good example? Surely it must be rare that a client can “cheat”??
Ok so authoritative servers calculate all relevant data and let the clients know the score. To overcome latency in this process the client has “Client Side Prediction” processes in place - and if the is different from what the server is telling the client - there will be a correction on the client.
Ok couple of questions:
does the authoritative model seem laggy on client/servers?
does the person acting as the server need a supa computer for this model
Authoritative servers are totall dominant over the game. Clients have to ask ‘permission’ to do certain things, like moving or firing, the server then decides whether it’s legal or not and if so it tells the client (and all the others) it can perform that action.
Cheating in mp games is achieved by sending ‘false’ messages. E.g. a cheater can send a message saying it fired a rocket launcher at someone’s face, while it even doesn’t have one and it is facing some other direction. With the authoritative server model, those messages are ignored, because the server detects they’re bs.
You’re right about client-side prediction. You need it to fill the gab between the moment a client presses a button to move and the moment the message from the server is finally received it can actually start moving.
So yes, it is more ‘laggy’ if you don’t apply proper prediction (which is difficult).
No, the person being a server doesn’t need to have a supercomputer, but it does need a good connection. Unreal Tournament for example uses this model. Here’s some info about that: http://www.acm.org/crossroads/xrds9-4/gamestatefidelity.html
Let’s say you had a game which let you buy potions for 10 gold. You could memory hack the game so you could give yourself 10,000 gold. Then you could buy 1000 potions!
With an authoritative server, you would send a request to the server from the client (Unity), to purchase a potion. The server would check to see how much gold you had (on the server), and then say whether or not the purchase was successful.
In the server/client model, clients are just viewers. No game logic is there. It simply receives information from the server, and displays it.
Ok well I have looked into game “cheating” and it seems complex to say the least - I can’t understand why hackers would worry about hacking games!! Sad!!
The mp game I have created is essentially a co-operative mp game - a game friends play together - not a MMORGP.
So an auth server setup for me would not necessarily be needed?
I can understand than in something like WOW it would be huh?
If your game means something, e.g. money, you need a auth server to prevent cheating. Hacker will try to cheat, for example, telling server I got a dragon. Then, he can sell the dragon to someone else for the money. If your game is just a casual game, auth server is not necessary.
Yeah my game is casual in nature - and like I said is a co-operative multiplayer - so players attacking their team mates is not helpful - even tho they can still do this if they wish.