Cheating, Hacking. How much?

General feedback and discussion of the game.

Moderator: Forum Moderators

Post Reply
SlowThinker
Posts: 876
Joined: November 28th, 2008, 6:18 pm

Re: Cheating, Hacking. How munch?

Post by SlowThinker »

Noy wrote:Okay, fine let me be blunt:

#1 The level of cheating is very very low, and is considered a minor issue.
#2 Any possible patch is likely to be burdensome, often causing more issues than what they are attempting to fix.
#3 Your proposals, quite frankly, are poorly thought out and completely unworkable. The posters in this thread have rubbished all of them.
I think you were blunt before. :)

#1 You said it already. I answered: I explained how the debate started here (concern of cheating by revealing the fog). So I expected your answer would be related to this issue, not that you would repeat a stuff that was answered already.
#2 We are theoreticizing.
#3 Your posts on this subject stay to be quite idle. Feel free to rubbish my two next posts. (BTW I didn't send any proposal, I asked "why Wesnoth's multiplayer is not based on a 'client-server architecture'?")
I work on Conquest Minus • I use DFoolWide, Retro Terrain Package and the add-on 'High Contrast Water'
I moved to Nosebane's corner (Doc Paterson's signature); I am spending my time there, so PM me if I don't answer your post in forums
SlowThinker
Posts: 876
Joined: November 28th, 2008, 6:18 pm

Re: Cheating, Hacking. How munch?

Post by SlowThinker »

Zarel wrote:You could easily write WML that doesn't fit in 5 MB. Thus, you'd be able to easily mount a DoS attack on a server. Such a risk would be far greater than the risk of fog cheating, which is only a minor risk, from what I hear.
Let us say 400 games, each 5MB, would cause a problem to the server.
But imagine the server in present, 400 bots in the lobby, joining games, or starting new games - it would make the server virtually unusable.
So attacks are possible also now, but nobody bothers to put effort into their creation.
I work on Conquest Minus • I use DFoolWide, Retro Terrain Package and the add-on 'High Contrast Water'
I moved to Nosebane's corner (Doc Paterson's signature); I am spending my time there, so PM me if I don't answer your post in forums
User avatar
Pentarctagon
Project Manager
Posts: 5565
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Cheating, Hacking. How munch?

Post by Pentarctagon »

you could have easily put that all into 1 post instead of double posting :roll:
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
User avatar
Captain_Wrathbow
Posts: 1664
Joined: June 30th, 2009, 2:03 pm
Location: Guardia

Re: Cheating, Hacking. How munch?

Post by Captain_Wrathbow »

...especially when the two posts were six minutes apart. :wink:
SlowThinker
Posts: 876
Joined: November 28th, 2008, 6:18 pm

Re: Cheating, Hacking. How munch?

Post by SlowThinker »

Gambit wrote:Look the entire point of your proposal was to have the server constantly checking and comparing everything. ... And besides just the memory there is the processing power required to use the memory! Constantly swapping stuff around inside 4gb of ram takes a decent amount of your processor.
I don't think the server should compare anything, it would just "run the world" and pass portions of the info to the clients. (Now the game engines of individual players must compare their "worlds" for OOS, but this problem would dissapear and the game engine would be simpler.)
"processing power required to use the memory" - what do you mean? The memory management comprises of allocating/releasing memory, and it doesn't cause any special load for the processor. This how the operating system / applications work in general, and it would work same way with the Wesnoth server.

I didn't understand where you see the ceteris paribus in my reasoning, and also where you got the "M=LW/2571" equation.
Gambit wrote:About 2.5kb per hex. But again this is only the map. You want your system to handle the AI, the events, AND sending all this information out, on top of everything else the server has to do.
Memory
How did you count that 44M on friday? and 2.5KB per hex? From map files? Realize in the memory the maps are not stored as text, and so require much less memory:

I made an estimation of memory needed for the Large GEB map (this is just an estimation, of course in reality Wesnoth stores info in memory different):

One hex:
two terrains, each 2bytes, a village present flag, a crop present, unit present, unit's side - total 6B

So Large GEB map (200x200) requires 240 KB

One unit:
XP (2bytes), XPtoLevel (2B), HP (2B), maxHP (2B), attStrength (2B), attNumberOf (2B), attType and flags for special attacks (2B), same for 2nd attack, terrain defenses (10B), resistances (10B), about 40B per unit. I forgot something for sure, so let us say 50B per unit.

10,000 units on the GEB map require 500 KB

Variables:
can be neglected

WML:
macros of the GEB era 180 KB (these 180 KB include also graphics, sound and messages, which wouldn't be managed by the server)

In total it is less than 1 MB. Let us say I forgot something, and it is stored a different way, but the amount of memory used for Large Geb map would hardly go over 2-3 MB.

CPU usage
Standard events are quite simple:
a battle: you deduct values from HP and add XP
move: you change position of a unit and count visibilities

The algorithms of WML events (only portions of them - the server wouldn't manage the interface - messages, graphics, sound) are not very complicated.
Of course if your WML needs to count high prime numbers then such a game needs a lot of CPU time. Such a game would respond very slowly, it wouldn't slow down other games (the server would divide CPU time to individual games evenly).

You know the AI is slow if it controls many units, and so I think the problem would be the AI (but read the last paragraph in this post).
edit: there would be no problems with the AI, read "Post subject: AI + attack"


Net traffic
It would be low: Only changes would be sent from the server to clients (an example: move: new position and new visible items would be sent), and only player's decisions would be sent from clients to server.
Messages, graphics, sound is a private stuff of clients and is not transported.

But people on on computers with a slow connection could notice a lag between the player's decision and the response.

Conclusion:
I think the main problem would be very slow games that include AI-controlled sides with many units. (edit: no problem with the AI)
A minor problem would be a lag between the player's decision and the response.
Gambit wrote: Maybe the reason I take such offense to this is ... Your server plan would, in effect, stunt UMC growth.
The mode "server" = Wesnoth game server would work for ladder games and those people that really want a "safe game".
Other games would work in the mode "server" = computer of the host . (probably all games with an AI would have to run this way)
Last edited by SlowThinker on February 16th, 2010, 9:05 am, edited 3 times in total.
I work on Conquest Minus • I use DFoolWide, Retro Terrain Package and the add-on 'High Contrast Water'
I moved to Nosebane's corner (Doc Paterson's signature); I am spending my time there, so PM me if I don't answer your post in forums
User avatar
Pentarctagon
Project Manager
Posts: 5565
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Cheating, Hacking. How munch?

Post by Pentarctagon »

slowthinker wrote:The mode "server" = Wesnoth game server would work for ladder games and those people that really want a "safe game".Other games would work in the mode "server" = computer of the host . (probably all games with an AI would have to run this way)
so if i am understanding this correctly, we would implement your system to correct a nearly non-existent problem, and then as a result we wouldn't be able to host any games that require a significant amount of ai action on the main wesnoth server?
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
User avatar
Gambit
Loose Screw
Posts: 3266
Joined: August 13th, 2008, 3:00 pm
Location: Dynamica
Contact:

Re: Cheating, Hacking. How munch?

Post by Gambit »

The 2.5kb thing was bad math on my part. I actually edited it out when I realized (or I thought I did...).
The M=LW/2571 I derived from your proportion in which you used the 150x60 map's memory to guess the 200x200 maps memory. I got the 44mb by writing down a list of map sizes and using that formula (your proportion) on them and summing it. I can actually send you the excel sheet if you're on windows or have open office. There were 70 games running.
One unit:
XP (2bytes), XPtoLevel (2B), HP (2B), maxHP (2B), attStrength (2B), attNumberOf (2B), attType and flags for special attacks (2B), same for 2nd attack, terrain defenses (10B), resistances (10B), about 40B per unit. I forgot something for sure, so let us say 50B per unit.
Yes you forgot quite a few things. Much more than 10b of things.:
But imagine the server in present, 400 bots in the lobby, joining games, or starting new games - it would make the server virtually unusable.
Would it really?

Also with your 400 you assume that the server has 2gb of memory, all of which it can use on wesnoth's multiplayer lobby. I believe that Wesnoth shares it's server (?) and our space on it also handles the site, wiki, and addons.
SlowThinker
Posts: 876
Joined: November 28th, 2008, 6:18 pm

Re: Cheating, Hacking. How munch?

Post by SlowThinker »

Pentarctagon,
You didn't understand it correctly. A game with AI would go on the the main Wesnoth server too, but in another mode: the host's computer would take the role of "the keeper of the world/map", and so resources of the Wesnoth server wouldn't be used.

With that system you would get another small advantage - you would get rid of OOS.
Also it seems to be natural to separate a modul that creates player's interface from a modul that manages the map/world. Some other minor advantages would result from that separation.

I don't think that the change would be worth the effort. I rather ask what are the reasons Wesnoth wasn't made that way from scratch.
___________________________________________

Gambit,
OK, the counting around the 150x60 map was my mistake, maps aren't stored in the memory as text, and they use much less space.

Many elements in your "hide/show" list are related to the interface (graphics, messages - for example names of attacks...). Some are related to the unit type and not to the concrete unit, aren't they?
I forgot unit cost, traits, terrain movecost and some more things. If we count with 100 B for one unit in place of 50 B then 10,000 units need 1M. But it doesn't change things.
I believe the memory would be sufficient even with only 500M dedicated for MP games on the Wesnoth server. 100 Large GEB maps must fit in.

Concerning bots
Imagine those 400 bots on the server, There is 50 games waiting for players in the lobby, 45 of them are hosted by bots. You join a game, the bot says hi, and you start to play against an AI. Even if you start a conversation in order to detect the bot, it will be hard to find a game with a real player.
I work on Conquest Minus • I use DFoolWide, Retro Terrain Package and the add-on 'High Contrast Water'
I moved to Nosebane's corner (Doc Paterson's signature); I am spending my time there, so PM me if I don't answer your post in forums
User avatar
Gambit
Loose Screw
Posts: 3266
Joined: August 13th, 2008, 3:00 pm
Location: Dynamica
Contact:

Re: Cheating, Hacking. How munch?

Post by Gambit »

Some are related to the unit type and not to the concrete unit, aren't they?
Yes, but because they can all be modified on an individual basis, wesnoth has to consider each and everyone one of them for each and every unit.
Imagine those 400 bots on the server, There is 50 games waiting for players in the lobby, 45 of them are hosted by bots. You join a game, the bot says hi, and you start to play against an AI. Even if you start a conversation in order to detect the bot, it will be hard to find a game with a real player.
This isn't the same kind of damage they would cause in your system. In your system they DoS it. In the current system, they're just annoying. And that doesn't affect people playing with friends.
Also I'm fairly certain it wouldn't be long until the devs whipped up a system to track which players are playing with the droid command on, and which ones play with droid on more often than off.
I'd give them one stable release, if that. They'd probably release an emergancy patch for the tracking, and have the IP ban up the very next day.

In your system though the multiplayer component of the server would have to be completely shut down because it would be unresponsive due to the memory waste of those 400 bots. Also the forum and website would be unusable until they did so (?).

I put a question mark there because I'm still not sure if the addon server, multiplayer lobby, website, and such are all in one place.
User avatar
Zarel
Posts: 700
Joined: July 15th, 2009, 8:24 am
Location: Minnesota, USA
Contact:

Re: Cheating, Hacking. How munch?

Post by Zarel »

SlowThinker wrote:Let us say 400 games, each 5MB, would cause a problem to the server.
But imagine the server in present, 400 bots in the lobby, joining games, or starting new games - it would make the server virtually unusable.
So attacks are possible also now, but nobody bothers to put effort into their creation.
The difference is that 400 bots takes effort. With your system, we could just create 1 game that takes 16 GB. Standard Wesnoth doesn't take that much, but you can just make an addon that does.
Proud creator of the :whistle: smiley | I prefer the CC-0 license.
SlowThinker
Posts: 876
Joined: November 28th, 2008, 6:18 pm

AI + attacks against the game server

Post by SlowThinker »

1st I will unite my terminology:
"safe mode": The Wesnoth game server is "the keeper of the world/map". This mode takes resources of the server. Games are uncheatable.
"unsafe mode": The host's computer is "the keeper of the world/map". This mode doesn't take resources of the server. (Only) the host can cheat.

No problems with the AI:
Pentarctagon wrote:so if i am understanding this correctly, we would implement your system to correct a nearly non-existent problem, and then as a result we wouldn't be able to host any games that require a significant amount of ai action on the main wesnoth server?
SlowThinker wrote:Pentarctagon,
You didn't understand it correctly. A game with AI would go on the the main Wesnoth server too, but in another mode: the host's computer would take the role of "the keeper of the world/map", and so resources of the Wesnoth server wouldn't be used.
i was blind, now I realized it would be even simpler. The game server could manage a game with the AI also in the "safe mode", but wouldn't control the AI:

The application would be split into independent modules: "server module" (would manage the world), "interface module" (would create interface to the player), "AI module" (would play the AI). Both interface and AI modules could participate in a game managed by the server module.
The AI module(s) could run on any computer (now the AI runs always on the host).
Gambit wrote:This isn't the same kind of damage they would cause in your system. In your system they DoS it. ...
Also I'm fairly certain it wouldn't be long until the devs whipped up a system to track which players are playing with the droid command on, and which ones play with droid on more often than off....
In your system though the multiplayer component of the server would have to be completely shut down because it would be unresponsive due to the memory waste of those 400 bots....
I agree it is different. But...
Those bot-players would not be droided, they would appear to the system like normal human-players. They would be made from a tweaked wesnoth.exe.
In "my" system attacks would still be manageable: after attacks only trusted players would be allowed to start games in the "safe mode". Anyway no attack would shut down the Wesnoth site, the resources for the MP server would be limited

Still, I mainly wanted to point out nobody bothers with attacks against the Wesnoth server, so nobody would bother with the new system.
BTW all RTS games must use "my" system, these games need more resources, so they are much more vulnerable to the attacks, and still they exist contentedly.
Zarel wrote:The difference is that 400 bots takes effort. With your system, we could just create 1 game that takes 16 GB. Standard Wesnoth doesn't take that much, but you can just make an addon that does.
By default you won't allow games to use over 10 MB, because such memory is not needed for Wesnoth games.
Anyway after 1st attack (which is unlikely), there are measures I explained above.
I work on Conquest Minus • I use DFoolWide, Retro Terrain Package and the add-on 'High Contrast Water'
I moved to Nosebane's corner (Doc Paterson's signature); I am spending my time there, so PM me if I don't answer your post in forums
User avatar
Zarel
Posts: 700
Joined: July 15th, 2009, 8:24 am
Location: Minnesota, USA
Contact:

Re: AI + attacks against the game server

Post by Zarel »

SlowThinker wrote:BTW all RTS games must use "my" system, these games need more resources, so they are much more vulnerable to the attacks, and still they exist contentedly.
Hi. Let me introduce myself. I am Zarel, developer of Warzone 2100, an open-source RTS game (and the most popular one, according to Google PageRank, and several other measures).

So believe me, I have the authority to say this: That is incorrect.
Proud creator of the :whistle: smiley | I prefer the CC-0 license.
SlowThinker
Posts: 876
Joined: November 28th, 2008, 6:18 pm

Re: AI + attacks against the game server

Post by SlowThinker »

8) I am glad I could meet you.
What is incorrect from my sentence? And can you be more detailed? (Otherwise I won't believe you :P ).
I work on Conquest Minus • I use DFoolWide, Retro Terrain Package and the add-on 'High Contrast Water'
I moved to Nosebane's corner (Doc Paterson's signature); I am spending my time there, so PM me if I don't answer your post in forums
User avatar
Zerovirus
Art Contributor
Posts: 1693
Joined: July 8th, 2009, 4:51 pm

Re: Cheating, Hacking. How munch?

Post by Zerovirus »

Zarel probably means that not all RTSes must use your system, since his apparently doesn't and it works just fine. I think.
User avatar
Zarel
Posts: 700
Joined: July 15th, 2009, 8:24 am
Location: Minnesota, USA
Contact:

Re: Cheating, Hacking. How munch?

Post by Zarel »

Yes, what Zerovirus said.

Here's an IRC log:

[09:10] <Soliton> Zarel: do you know any (RTS) game that uses a server side world state? well, apart from mmorpg or similar game types where it is inherent in the game design.
[09:10] <Zarel> Soliton: Well, every RTS game uses a server side world state. ;)
[09:10] <Zarel> The question is, are there any RTS games where the server withholds world state information from clients based on in-game visibility rules?
[09:10] <Zarel> Which is rare, because you do run into sync issues.
[09:10] <Zarel> I can't think of any specific example, but I'm sure they exist. They're just not nearly as common as SlowThinker thinks they are. ;)
[09:10] <Soliton> you can run into sync issues either way.
[09:10] <Zarel> True, but it's easier when clients have complete information.
[09:10] <Zarel> Since you can just push deltas out to everyone.
[09:10] <Zarel> And not have to push different deltas to each individual client, and then store knowledge information about each individual client from which to push deltas from...
[09:10] <Zarel> You see the issue?

Circumventing visibility rules in an RTS requires a modified game client. Proprietary RTSes generally have DRM to prevent that, and open-source RTSes generally aren't popular enough for that to be an issue.
Proud creator of the :whistle: smiley | I prefer the CC-0 license.
Post Reply