V
V
Viktor_P2017-07-02 15:27:24
Node.js
Viktor_P, 2017-07-02 15:27:24

How can I implement data authentication on the game server?

For example, there is some simple network game, the essence of which is who will drive the car further or, in other words, who will score more points. To implement a leaderboard, data must be sent to the server anyway. And here the question arises - how to implement logic in which the server will understand that the data is really the result of the game, and not some "left" request sent through a REST client with twisted data?
Are there any patterns how the servers are implemented in these cases?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
devalone, 2017-07-02
@Viktor_P

Encryption + authorization + verification of data for "reality", i.e. if the maximum speed of the car is 100 km / h, and the result comes from the client that he drove 1000 km in a second, then something is clearly wrong here. But even in this case, there is a chance that the program will be reversed and the left results will be sent, you can transfer the entire game process to the server, but I think this will not work in your case. In principle, it is impossible to protect yourself from cheaters 100%, because there is a chance that they will write a bot for your game.

A
Alexey Pavlov, 2017-09-29
@lexxpavlov

how to implement logic in which the server will understand that the data is really the result of the game

It is impossible to protect yourself 100%, but it is possible to make hacking become much more expensive than the benefit. For example, validating data in the game server in the conditional "Flappy Bird" can be noticeably easier than GTA.
A very good and useful article Fighting cheaters in online games: 22 do's and don'ts on Habré (plus, important comments). Choose what level of protection you need for your game. For example, some protection methods cannot be done by one programmer (too long and expensive).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question