Currently Online

Latest Posts

Topic: I've discovered a cheater

_Elefantenrennen
Avatar
Joined: 2020-07-11, 17:49
Posts: 86
Ranking
Likes to be here
Location: Why do you want to know this?
Posted at: 2020-09-22, 19:01

I lose dozens of chess games every week. If I couldn't accept losing, why would I play chess?

Interesting to hear that you are playing chess face-grin.png


t h e h a l f h e r o r u s h i s a s t r o n g s t r a t e g y i f y o u k n o w h o w t o p l a y i t

Top Quote
Mars
Joined: 2009-03-28, 10:26
Posts: 77
Ranking
Likes to be here
Location: Germany
Posted at: 2020-09-22, 21:47

I agree with SirVer: One person cannot cheat by modifying the starting conditions. It will cause the game to desync as happened in the game.

Where the problem begins is when you join a game loaded from a save game. This save game could have been created on a wrong assumption (e.g. different starting conditions) or even be tampered with in a more clever way. In the case of loading a save game you more or less have to trust the person hosting the game. If you do not trust the-x, do not let him host your game.

What (I understood what) happened is:

  • the-x changes his starting conditions
  • the-x hosts a game against worldsavior
  • the game expectedly desyncs
  • the-x loads the save game
  • the continue the game and the-x can make use of his changed starting conditions

Since the-x obviously tried different starting conditions in https://www.widelands.org/forum/topic/4956/ I would assume he just forget to reset them.

All in all, I am not really worried about these kind of cheats in widelands. They will always cause desyncs, usually someone will look into the replays to find/fix a bug and find the tampered starting conditions.

What I am more worried about are the following undetectable "cheats": Modify the client

  • to eliminate fog of war (difficulty: very easy)
  • to let a player look into other players military buildings (difficulty: easy)
  • to exploit the known random numbers by simulating fights in advance and only attack when a win is guaranteed (difficulty: very hard, but also very lucrative)

Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 18:35
Posts: 1664
Ranking
One Elder of Players
Posted at: 2020-09-23, 03:07

SirVer wrote:

I do not really understand what is going on here from an interpersonal level, however I feel I can add to the technicalities and at least add an explanation the last question:

What I understand from this rather unpleasant discussion is that there is the possibility for players with programming skills to change the amount of resources stocks during the game...

This statement is not correct. Let me explain: Widelands works on the concept of parallel execution verified by hashing, i.e. all computers in networked games have all the information at any point in time. All computers drive the simulation forward independently and they exchange hashes of the current game state with each other. So all calculations on all machines must be exactly equal, otherwise the hashes become different. These hashes must be the same at all points, otherwise the computers have different opinions of the current game state, i.e. the game has desynced.

which is exactly what happens here, the game desync. and after it was reloaded, the amount of wares has been changed. extra gold popped into exhistance in frisian hq.

then again, it would also be fairly easy to tamper with a replay to make it look like someone cheated. heck, even i may manage it if i applied myself. although in the specific case i am much more prone to believe worldsavior; he's competitive to a fault, and he will exploit glitches (remember the port space blocker?), but i've never seen anything making me think he'd actually cheat. and he wouldn't need it. the-x, instead, had done some shady things in the forum, misquoting people on purpose, spamming threads on the same topic, and such.

anyway, besides the personal question in which i do not want to intrude, there is a potential problem: have we a security issue?

luckily, i'd say no. few enough people play this game, and there is absolutely no reward except some recognition among a community of a few dozens. if someone cheats, people will notice. if someone starts winning suspiciosly, he won't stay hidden. if someone starts slandering, it's kinda hard to manage on such a small group. and we have few enough programmers that preventing people from cheating is not a priority. if this game had the popularity of stuff like league of legends or starcraft, with actual competition and actual prizes, then it would be of paramount importance. but it's a far cry from that.


Top Quote
the-x
Avatar
Joined: 2019-01-19, 13:23
Posts: 635
Ranking
One Elder of Players
Posted at: 2020-09-23, 08:17

Mars wrote:

I agree with SirVer: One person cannot cheat by modifying the starting conditions. It will cause the game to desync as happened in the game.

This is the case. In World Tournament 2020 king of nowhere desynct the games 3 times. There were also a lot of desyncs in games where World Savior played against different kind of players, which led to the conclusion that anything had been changed in data or removed, which could be starting resources but dont have to be.

What (I understood what) happened is:

  • the-x changes his starting conditions
  • the-x hosts a game against worldsavior
  • the game expectedly desyncs
  • the-x loads the save game
  • the continue the game and the-x can make use of his changed starting conditions

Since the-x obviously tried different starting conditions in https://www.widelands.org/forum/topic/4956/ I would assume he just forget to reset them.

If me / or World Saviour was to cheat I would probably do so at something that is counting whatever it is, if it was ranked Games or Tournament Games


Top Quote
teppo
Joined: 2012-01-30, 09:42
Posts: 404
Ranking
Tribe Member
Posted at: 2020-09-23, 19:36

SirVer wrote:

I will not judge if what happened here was cheating or testing, malicious or in good nature, but generally speaking a player with programming skills cannot cheat without it leading to desyncs. If testing of new starting conditions was the aim here, care should be taken that both sides execute the same scripts, otherwise the game will always desync.

I guess there are ways. Example: battles are not fully deterministic, there are predictable pseudorandom numbers involved. An evil genius could program his client to modify the consumption of random numbers via well timed playercommands, to tilt the playing field. Not easily doable (need to look into future, minding everybody consuming random numbers), but probably possible.


Top Quote
WorldSavior
Avatar
Joined: 2016-10-15, 04:10
Posts: 1821
Ranking
One Elder of Players
Location: North of Germany
Posted at: 2020-09-24, 00:29

the-x wrote: There were also a lot of desyncs in games where World Savior played against different kind of players, which led to the conclusion that anything had been changed in data or removed, which could be starting resources but dont have to be.

I didn't manipulate anything, desyncs happen also for other reason, for example there was a time when the development version was unstable. But build21 is stable.

king_of_nowhere wrote:

then again, it would also be fairly easy to tamper with a replay to make it look like someone cheated.

At the other hand, the replay would desync most likely in this case, because additional wares will lead after some time to a player command which makes no sense. Right?

Mars wrote:

Since the-x obviously tried different starting conditions in https://www.widelands.org/forum/topic/4956/ I would assume he just forget to reset them.

But the starting conditions have been normal. If you experiment with starting conditions you will most likely just change them instead of making possible that zero iron leads to a bonus.


Top Quote
the-x
Avatar
Joined: 2019-01-19, 13:23
Posts: 635
Ranking
One Elder of Players
Posted at: 2020-09-24, 10:46

WorldSavior wrote:

At the other hand, the replay would desync most likely in this case, because additional wares will lead after some time to a player command which makes no sense. Right?

Did you read the post above from Sir Ver?

Mars wrote:

Since the-x obviously tried different starting conditions in https://www.widelands.org/forum/topic/4956/ I would assume he just forget to reset them.

But the starting conditions have been normal. If you experiment with starting conditions you will most likely just change them instead of making possible that zero iron leads to a bonus.

Again, Mr. World Savior, did you even read the Post of Sir Ver?

SirVer wrote:

Let me explain: Widelands works on the concept of parallel execution verified by hashing, i.e. all computers in networked games have all the information at any point in time. All computers drive the simulation forward independently and they exchange hashes of the current game state with each other. So all calculations on all machines must be exactly equal, otherwise the hashes become different. These hashes must be the same at all points, otherwise the computers have different opinions of the current game state, i.e. the game has desynced.

This means you generally cannot cheat by scripting, i.e. by executing some code by typing for example in the debug console or changing a script only on your computer: the scripts are not shared over the network, i.e. they only execute on one machine and hence their effects only affect the game state on this one machine. If the things you changed (for example adding wares to your warehouse) ever affect the state of the game the network game will desync. The only meaningful cheat I can think of is to give you full vision, i.e. uncover the map: This will not affect the game state (unless you are using scouts and I think ships, which base decisions on the players visibility).

Similarly, if one player alters starting conditions while the other does not, the game will desync (since the changed starting conditions will execute only on one machine). Same argument if map scripts are altered, the game should descync unless the modified map is shared with all players.

So to summarize: To cheat in a game, you would need to either alter the scripts on both machines (maybe by changing the code in a branch and get the other player to play this branch) or you'd need to alter the map on both machines, for example by sending a modified map around and make sure everybody is using exactly this version - otherwise you will see a desync in the game. As a disclaimer: most desyncs are just bugs and not somebody trying to cheat of course.

Looking at the attached data in this thread, the save files claim to be generated by Widelands b21 Release (though that could have been falsified and scripting files could have been altered in the released version) and the maps in the savegames do not contain any .lua files. This indicates that the map was not modified on both machines, but could have been on the machine that this savegame was not on. What remains as potential explanations is that a player changed the starting conditions on their computer, but not on the other players computer - and this should lead to desyncs as soon as state-altering logic is executed on one machine. Resyncing happens through loading one of the savegames - either from computer 1 (no script executed, i.e. no added wares) or from computer 2 (with added wares) and in fact modified game state could be shared that way. The game can then be continued on, since the states have been resynced.

He explained it exaxtly, since you tried to deny this again, this shows that our Mr. World Saviour is always blaming people who win games against him and trying to denounce them.


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 1553
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2020-09-24, 11:10

Just for clarification:
SirVer pointed out that alteration in game data (based on different versions or singular changes) will lead to a desync of the game. This does not mean it is the only cause of a desynced game. There are multiple other reasons for this as well, especially in networking performance. So in short game alterations will lead to a desync but not every desync is caused by a difference in game data.

SirVer wrote:

So to summarize: To cheat in a game, you would need to either alter the scripts on both machines (maybe by changing the code in a branch and get the other player to play this branch) or you'd need to alter the map on both machines, for example by sending a modified map around and make sure everybody is using exactly this version - otherwise you will see a desync in the game. As a disclaimer: most desyncs are just bugs and not somebody trying to cheat of course.

Edited: 2020-09-24, 11:13

Top Quote
the-x
Avatar
Joined: 2019-01-19, 13:23
Posts: 635
Ranking
One Elder of Players
Posted at: 2020-09-24, 11:28

Okay, so I should have changed the scripts on both machines. Honestly this is ridicously since probably not even you with high programming skills could do that ;D

The reason for this thread is that ws has a problem in losing.


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 1553
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2020-09-24, 11:39

I won't judge on this topic. I simply wanted to clarifiy that not every desync is an attempt to cheat.


Top Quote