I started creating online open source game as a project in school. It will be server with n connected clients. But now I have a problem with "security". What to do if one client would used modified source code for changing some restrictions? How can I prevent it? My first idea was make client only for connection to server and server would send all necessary files but I don't like this idea very much. Can you advise me something better? Thank you.
Asked
Active
Viewed 257 times
1 Answers
1
You need to keep your validations in the server. The server should check each client move, and if it's not allowed according to the server's rules - reject it.
You should still keep validations in the client, too, so that users who don't mess with the client code can get speedier responses.

zmbq
- 38,013
- 14
- 101
- 171
-
Beat me to it by 30s. It might be interesting to know that this is exactly what Freeciv does to prevent users from cheating with modified versions of the game. – Fred Foo Oct 14 '12 at 11:22
-
That's what *every* web application should do, game or not a game. – zmbq Oct 14 '12 at 11:27