Timeline for How can I protect against a cheater changing variables on the client?
Current License: CC BY-SA 4.0
17 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 1, 2022 at 10:12 | history | edited | Kromster | CC BY-SA 4.0 |
deleted 8 characters in body; edited title
|
Sep 23, 2022 at 9:07 | vote | accept | 李白 puer | ||
Sep 22, 2022 at 14:17 | answer | added | Zibelas | timeline score: 3 | |
Sep 22, 2022 at 13:59 | comment | added | DMGregory♦ | @Zibelas - I think this advice would be worth an upvote/accept if you post it as an Answer below. | |
Sep 22, 2022 at 13:50 | comment | added | Zibelas | Send to the server that player got hit and if your weapons deal different damage, by what the player got hit. The server should already know how much health the player has. Another easy fix would be to check as well against how much ammo the player had. So the hit should not be possible, if the player never had the means of firing. | |
Sep 22, 2022 at 13:25 | review | Close votes | |||
Oct 12, 2022 at 3:03 | |||||
Sep 22, 2022 at 13:12 | comment | added | 李白 puer | @Zibelas thanks for answer! I can change the logic of the players' lives by transferring the health values to the server at the moment. But what about simple redefining the function? | |
Sep 22, 2022 at 13:04 | comment | added | Zibelas |
Start the easy way. You dont trust the client with logic. Changing variables would usually mean, a player gives himself infinite health, damage or ammo, something in that direction. But if those values are on your server and only those taken as truth, it does not matter when the client still tells the server Cheater XY still has full life when server says he should be dead.
|
|
Sep 22, 2022 at 13:01 | comment | added | 李白 puer | @DMGregory ok, what tools should I use? how can I dynamically change the game screen from the server? | |
Sep 22, 2022 at 13:00 | history | edited | 李白 puer | CC BY-SA 4.0 |
deleted 162 characters in body
|
Sep 22, 2022 at 12:58 | comment | added | 李白 puer | @Vaillancourt ok, what tools should I use? how can I dynamically change the game screen from the server? | |
Sep 22, 2022 at 12:57 | comment | added | DMGregory♦ | I'd recommend editing your question to ask that, instead of "can I render canvas element on server side?" - the answer to that is yes, but it's not the solution to your real problem. | |
Sep 22, 2022 at 12:55 | comment | added | 李白 puer | @DMGregory Yes, how can I protect against a cheater changing variables on the client? | |
Sep 21, 2022 at 20:56 | comment | added | DMGregory♦ | Rendering the canvas element on the server side is not a good solution to this problem. It will eat a lot of performance, cost a lot of bandwidth, and give you very choppy/laggy gameplay. Do you mean to ask "how can I protect against a cheater changing variables on the client?" | |
Sep 21, 2022 at 19:45 | comment | added | Vaillancourt♦ | All my current logic [...] is running on frontend You should move everything to the server and have the front end act as a "dumb terminal". | |
S Sep 21, 2022 at 19:36 | review | First questions | |||
Sep 21, 2022 at 19:53 | |||||
S Sep 21, 2022 at 19:36 | history | asked | 李白 puer | CC BY-SA 4.0 |