Is the player state stored on server?
Like the title says, is the player state stored on the server? I ask this because i want to know is it good/bad to use player state for game play logic (eg. health) or can it be hacked/compromised.
So if i do this within a server function :
Player->PlayerState->health += 10.f;
is that bad?
asked Dec 30 '15 at 02:11 PM in C++ Programming
Every player (human or AI) will have a player state, it will live everywhere on the server and the client, it's values are replicated through variable replication. So to answer you question you have to decide where the authority of your logic is, the server can perform the logic changing the values and those are then replicated to the clients (this would be an example in the case of health logic). So yes do it on the server :D. Also if the server is hacked you can't actually do much about it.
answered Dec 30 '15 at 02:16 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here