Author Topic: Cheating System  (Read 5219 times)

Offline Combine Crusier

  • Sr. Member
  • ****
  • Posts: 456
Cheating System
« on: May 16, 2007, 01:06:21 PM »
This is a post is intended to find out about Outpost 3 and it's cheats.


Although I personally am Disgusted at cheats I must ask what are (if any) the cheats that will be implemented into this game?
Fire at will!

Offline Mez

  • Hero Member
  • *****
  • Posts: 648
Cheating System
« Reply #1 on: May 16, 2007, 01:51:33 PM »
Perhaps these kind of questions would be better suited nearer to the end of the games development.  It is only really at the start of development now!

Offline BlackBox

  • Administrator
  • Hero Member
  • *****
  • Posts: 3093
Cheating System
« Reply #2 on: May 16, 2007, 02:06:54 PM »
Well, I have this to say about cheats.

Don't include them.

Cheats are what killed OP2. When some idiot started telling everyone on WON what the cheats were it essentially killed gameplay. There are few people who really want to play with cheaters. From what I hear the user numbers dropped off after the cheats became widely known, possibly leading to the demise of WON.

Don't include anything like it. Not for multiplayer, not for single player, not even if there is a checkbox to disable them.
Cheats are for the lazy people who can't be bothered to learn how to actually play the game the way it was meant to be played.

Offline Freeza-CII

  • Administrator
  • Hero Member
  • *****
  • Posts: 2308
Cheating System
« Reply #3 on: May 16, 2007, 02:23:16 PM »
I think the only reason some games have cheats was to help with debugging but you dont really see that kinda debugging these days just Memory hack trainers.  So unless some one makes a trainer for the game.  I would really like to see no cheats.

Offline BlackBox

  • Administrator
  • Hero Member
  • *****
  • Posts: 3093
Cheating System
« Reply #4 on: May 16, 2007, 02:26:38 PM »
Well as far as debugging is concerned, there are better ways than to use cheats.

One option would be to force a command line switch in order to allow use of debug commands, and make it impossible to join 'normal' games (with people who don't have the debug switch set)

As far as debugging in OP2 is concerned, the program originally had a menubar which allowed creation of objects like disasters, setting properties on players, etc. (Some of it is evidenced in the pre-release Outpost 2 demo, at one point I wrote a small program to load and set this menu on the Outpost 2 window. A lot of the commands work fine in the release version of the game).

Offline Leviathan

  • Hero Member
  • *****
  • Posts: 4055
Cheating System
« Reply #5 on: May 16, 2007, 06:40:49 PM »
There should be commands in the game for users to play with to spawn stuff, edit funds etc.

More flexable and more things a user can do with the game the better.

Offline zanco

  • Full Member
  • ***
  • Posts: 241
Cheating System
« Reply #6 on: May 16, 2007, 08:55:55 PM »
We haven't really discussed about including cheats or not. It is a bit early to talk about those.
But I already know that I wouldn't want such things. It will kill the game and won't give a chance to the player to really enjoy the hard work put into developing it. Easter Eggs will be better  :P  
if anyone finds and communicate to us that which thus far has eluded our efforts, great will be our gratitude.
          Jakob Bernouilli

"Zanco`, n00b o' The Flares"

Offline Combine Crusier

  • Sr. Member
  • ****
  • Posts: 456
Cheating System
« Reply #7 on: May 17, 2007, 08:21:58 AM »
Da......... I don't want ANY cheats in this game.. but it's your game......
Fire at will!

Offline Brazilian Fan

  • Sr. Member
  • ****
  • Posts: 302
Cheating System
« Reply #8 on: May 17, 2007, 11:07:13 AM »
What type of easter eggs?

Offline Tramis

  • Full Member
  • ***
  • Posts: 178
Cheating System
« Reply #9 on: May 19, 2007, 04:22:32 PM »
You'll just have to hunt for them yourself - thats the point isnt it?

Offline Brazilian Fan

  • Sr. Member
  • ****
  • Posts: 302
Cheating System
« Reply #10 on: May 19, 2007, 06:47:27 PM »
You're right  :heh:  

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Cheating System
« Reply #11 on: May 19, 2007, 09:38:30 PM »
Quote
As far as debugging in OP2 is concerned, the program originally had a menubar which allowed creation of objects like disasters, setting properties on players, etc. (Some of it is evidenced in the pre-release Outpost 2 demo, at one point I wrote a small program to load and set this menu on the Outpost 2 window. A lot of the commands work fine in the release version of the game).
What are the chance you'll let me play with that?  ;)

Also:
Quote
Cheats are for the lazy people who can't be bothered to learn how to actually play the game the way it was meant to be played.

I strongly disagree with you there.  I ALWAYS used Dan's dog to skip those useless "mine metals because we ran out of ideas' missions.  It wasn't because I can't play OP2. It's because those levels suck.

Aside from that though, yeah, no cheats.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Tramis

  • Full Member
  • ***
  • Posts: 178
Cheating System
« Reply #12 on: May 20, 2007, 02:03:26 AM »
I only use cheats, hacks or trainers in one of 3 situations:

1.) I really don't give a rat's butt about playing the game, I just want to kill some time or blow off some steam.

2.) I'm trying to test a custom level I made and want to cut past the beginning base-building boredom to get to an area I want to test the triggers for.

3.) Machinima.  Nuff said.  :P

Other than that, no, leave them out IMO.
 

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Cheating System
« Reply #13 on: May 20, 2007, 12:56:10 PM »
Hmm, and to think an article I read on anti-cheating came to mind earlier today.

One of the points they made was, cheats in single player lead to cheats in multiplayer. One reason being that the code for the single player cheats often gives a hacker significant knowledge about how the game works to write code for a multiplayer cheat. Don't do it. You'll give them an edge.

Another thing they pointed out is that just letting them peak at memory can give them a significant tatical advantage. The case should be obvious for RTS games with fog of war, such as Starcraft. The article also made a point about how in Age of Empires you can tell when a person was upgrading to a new age by monitoring their money constantly and seeing when there is a significant drop. That was allowing for a fairly large margin of error too. With more precision, you could potentially keep track of every unit they've built based on the cost of each unit. It might be a little more difficult to tell if they've built two units in the same game cycle and you didn't measure in between, but if you're measuring a few hundred times a second, which a computer can easily do, the chance of that probably isn't too great. To get around this, the article suggested not storing important values in an easily searched for form. (But not too obscure that accessing a frequently used value is slow). Simple xor "encryption" could work there. You can't expect good security running on an untrusted computer anyways, so you might as well keep it simple and fast. Just make sure to use a random value for the xor, fixed at game startup or so (but maybe periodically changed). Once they know the random xor value, the location is really easy to find, so you don't want it to be a hardcoded constant. It will eventually be found. Especially if you don't follow the next part.

Don't use global data (or pointers). (Static storage is the same as global storage, just with a different access scope. It has the same security problem as global memory.) Once something is found, it's location will always be known. You can use memory on the stack (local variables) and memory on the heap (new/delete), but store the pointers to the memory on the heap either on the stack, or in another data structure on the heap. Don't store those pointers globally. Note that this implies the only way to find the "root" of the data, is to find a memory location on the stack. Then be sure to allocate a random amount of stack space in one of your earlier routines during startup. One that isn't returned from while the game is being played. That way an unknown/undetermined amount of space will offset all the pointers to important data. This is really easy to do from assembly, and easy to do from a high level language if assembly isn't an option. Just write a recursive function that calls it self some random number of times before calling some sort of main function that starts up the game or does whatever. That way if someone ever does find the memory address of something important, that address will only be valid for that run of the game.

I would like to point out that most of the knowledge we have about how Outpost2.exe works internally is given in a format with fixed memory addresses, or if it's not at a fixed location, the structure is given in terms of offsets, and the base address is given in terms of some "root" pointer at a known fixed address. If the above techniques were followed much of that would be invalidated, as would be the techniques used to find those locations.


So, if you want to avoid cheating in multiplayer and having the gameplay destroyed:
1) Don't include any cheats. Not even in single player.
2) Don't store important values in a plain easy to search for form in memory.
3) Don't store anything important globally, or pointed to by anything stored globally.



Edit: By the way, let me know if you want the reference to the original article. I can probably dig it up somewhere. It's been a few months since I read it though.
« Last Edit: May 20, 2007, 12:58:08 PM by Hooman »

Offline Arklon

  • Administrator
  • Hero Member
  • *****
  • Posts: 1269
Cheating System
« Reply #14 on: May 20, 2007, 02:15:08 PM »
Thing is, Hooman, being able to somehow determine what units someone's made by checking how their resources change would be pointless in an OP2-like game because there is no fog of war. As for using cheats in multiplayer like producing units you're not supposed to or whatever by changing memory values, those changes just cause desyncs and the other players' games won't have the cheated units/whatever in them. The only way you could cheat like that is by making a program that sends packets to the other players, which would require extensive reverse engineering.
This reminds me of DRM, the MAFIAA, and all the other witch hunters trying to stop piracy. You cannot stop it. Period.
« Last Edit: May 20, 2007, 02:17:51 PM by Arklon »

Offline Psudomorph

  • Jr. Member
  • **
  • Posts: 91
Cheating System
« Reply #15 on: May 20, 2007, 08:54:13 PM »
Quote
[preventing cheating through variable storage]

Correct me if I am wrong, but it sounds like many of the modifications and much of the understanding that this community has of Outpost 2 would be made impossible or at least very difficult by those kind of anti-cheating measures.

I just keep thinking of some forum community far in the future cursing us for making a game that is virtually impossible to reverse engineer after its creators abandon it (and rest assured it will happen someday, if not by choice then by old age and death :heh: ).

At any rate, I disagree almost on principle with the idea of making the inner workings of something intentionally difficult to understand and interpret, because while it may discourage those who want to do harm with it (cheaters, pirates) it will also discourage to an equal degree the innocent who merely wish to understand/mod/learn from the workings of something they enjoy.

[Wild and all but baseless speculation]
Instead of trying to prevent hackers from figuring out how to cheat, what if instead there were some way for OP3 to somehow check the consistency of an enemy's actions.
Some things would be simple, for example if a lynx is fired on and the damage done to it is any number that cannot be produced by standard weapons/upgrades, then the opponent is cheating. If the cost of the opponent vehicles/structures totals more than the opponent has mined, then he is cheating. If he has Weapon6 in less than the minimum time Weapon6 should take to research, if any of his vehicles traverse a given distance at more than their maximum speed, etc. Basically a system for each computer to see if the other players are advancing within the rules. Ideally there are a finite number of ways a player can gain an advantage in an RTS game, and if you check for each of them, you effectively prevent any and all cheating.

My ideal situation would be if some type of anti-cheating package like this existed as an independent module of the program, one that a player could disable through a simple command line parameter if they wanted to play a non-standard game, or for some reason allow their opponents to cheat. Making it an independent module would also allow it to be updated quickly and easily if someone found a way to slip through it.

The trick is that there is nothing preventing a hacker from disabling this anti-cheat device on their own computer, or making any changes to the program they wish. Instead fair play would be ensured by the machines belonging to the non-cheaters.

I think ultimately that ideal is the only way to go, whether it takes the form of a consistency checker or something else. Realistically if you give a hacker total access to something (i.e. letting them install it on their machine) then they will find a way to hack it. The best way to prevent it I think, would be to give their opponents the job of ensuring fair play.

The idea is that no matter what a hacker does, he cannot realistically disable the consistency checking on another computer being used by someone who doesn't want him to cheat.

[/wild baseless speculation]

No clue if anything remotely resembling that is possible or feasible for reasons of performance, coding difficulty, or failure of core assumptions, but it seems to me to be an option worth considering.

Offline Combine Crusier

  • Sr. Member
  • ****
  • Posts: 456
Cheating System
« Reply #16 on: May 21, 2007, 08:57:15 AM »
Perhaps the easiest way to prevent cheating is to have the game run directly off the disk where the files can be looked at but not modified and only have the game initialization on the computer....
Fire at will!

Offline BlackBox

  • Administrator
  • Hero Member
  • *****
  • Posts: 3093
Cheating System
« Reply #17 on: May 22, 2007, 03:40:02 PM »
Quote
Instead of trying to prevent hackers from figuring out how to cheat, what if instead there were some way for OP3 to somehow check the consistency of an enemy's actions.
Some things would be simple, for example if a lynx is fired on and the damage done to it is any number that cannot be produced by standard weapons/upgrades, then the opponent is cheating. If the cost of the opponent vehicles/structures totals more than the opponent has mined, then he is cheating. If he has Weapon6 in less than the minimum time Weapon6 should take to research, if any of his vehicles traverse a given distance at more than their maximum speed, etc. Basically a system for each computer to see if the other players are advancing within the rules. Ideally there are a finite number of ways a player can gain an advantage in an RTS game, and if you check for each of them, you effectively prevent any and all cheating.
Seems pretty feasible to me. In fact, it's pretty much the only way to prevent a cheater in the case of a game which will have its source code released to the public (as I have heard the case will be with OP3) and would be the way I would implement things.

You can't rely on checksums or anything since with source code available a cheater can change anything they want -- add new code to allow 'cheating' by entering keystrokes / commands / whatever, circumvent checksums, etc. Hiding things by randomly choosing locations to store data, encrypting it while in storage, etc, are pointless since the cheater could just modify their copy of the game to not do these things (it's not out of the question for a game where you don't have source available -- you could remove protections such as the described encryption / decryption, though it would take significantly more work).

(Also, if the game engine is going to use scripts, checksums might be somewhat ineffective and a nuisance since non-code changes to a script -- such as comments, whitespace, etc -- will affect the checksum even though the script is still functionally identical. Same for changes that say, only affect the game during single player, but where the script is used for both single- and multiplayer games).

The checksum would also probably change when the game was recompiled, even if there were no code changes (different version of compiler, linker, installed libraries, different command line options to compiler, many factors there).

But yes, the best way would be to compare the state of the game for all the players periodically. For example, all the players compare the amount of ore each player has, what vehicles they have, etc. In the case that there is a major discrepancy, the offending player could be booted from the game. This way, the only way to get more metals, is by smelting a cargo truck full of ore. The only way to get a cargo truck full of ore, is by loading it from a mine or having it transferred from another player. The only way to do those things ... you get the point. :P

I suppose it doesn't prevent 'information cheats' where the player can find out the ore levels of another player, or morale, or whatever. But it will stop them from building things in game that would allow them to have a huge edge over the non cheaters.

Quote
Perhaps the easiest way to prevent cheating is to have the game run directly off the disk where the files can be looked at but not modified and only have the game initialization on the computer....

You can't stop them from doing anything on their own computer. You can make it more difficult, but if they really have the patience and time, they can do anything they want.
What you _CAN_ do is to write secure network code which would prevent them from hacking the other players' computers and changing the code there (i.e. to inject a cheat).
« Last Edit: May 22, 2007, 03:51:08 PM by op2hacker »

Offline Tellaris

  • Sr. Member
  • ****
  • Posts: 460
Cheating System
« Reply #18 on: May 22, 2007, 10:55:20 PM »
To counter THAT, it'd make the cheating more temporary.   Simply have the game check itself over with an available "list" of what the code should look like when the game logs into the central server (if any).   Server ejects any client that does not make this initial connection, so they can't get around this.   It also ensures all players have the same version..
Spell Checker!   The PoWeR tOoL
Click Here For Coolness
Self Proclaimed OPU Help desk.

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Cheating System
« Reply #19 on: May 23, 2007, 01:28:17 AM »
Yes, you people are quite right. The methods I listed are mainly only useful for closed source projects. I just haven't really heard of any code for Gensis posted yet.

As for people modifying things in the future, that's generally a lot easier to do if the original design allowed for easy modification, and especially if the source code is available. But even if the source to Outpost 2 were available, there would still be certain changes that would be somewhat difficult to make. These sorts of issues are generally quite independent of things like what I just suggested. Not using global variables is generally just part of good coding practices, and the whole random amount of stack space is confined to some small special purpose routine. If the source code is available, then these things really do nothing to hide anything or make changes difficult. But then they're also quite useless (against anyone with the right compiler) since they could just be removed and the result recompiled.

But I don't think we should worry as much about some future community complaining about a lack of modifiability as users complaining about cheaters. Having cheaters around usually does more to destroy a game than lack of modifiability.


As had been stated, the best way to prevent multiplayer cheating is of course to write good network code, and to not be too trusting of the validity of the network data. It's also pretty much the only way with an open source project. But then with open source there is really no good way to prevent information cheating. Plus, if there are bugs in the validity checking, then knowledge of certain information can help in exploiting those bugs. What I was suggesting earlier should be viewed as more of an in-addition-to type of thing. But if the project is open source, then yeah, don't bother.


Curious question: How many people would bother to try and reverse engineer a game if a good editor was supplied, and the ability to make addons and modifications were included?

I suspect if the game were built with a good editor and addon ability, people would be more interested in how to use the editor and addon system then poking around in the executable. I can maybe see people poking around in the data files trying to steal the graphics, but I can't think of any reason to poke around the executable other than to make cheats.


Oh, and Baikon, if I have your idea right, how would the server know whether or not the client is lying? People have tried that sort of technique in other games where cheating was prevalent. It basically just lead to an arms race between the cheaters and anti-cheaters. Each trying to outsmart the other system, with the cheaters trying to remain hidden, and the anti-cheaters trying to detect each new way the cheaters were hiding. Nobody really won. It just became more of an inconvenience for the players.
 

Offline BlackBox

  • Administrator
  • Hero Member
  • *****
  • Posts: 3093
Cheating System
« Reply #20 on: May 23, 2007, 07:21:53 AM »
Yeah, that's basically what Punkbuster / Valve Anti Cheat / whatever other anti cheat systems are (except they extend their scan to the entire system). Known cheats / trainers / etc. are in a blacklist and the programs work by comparing signatures of code that is loaded in the system with the blacklist. If there are matches the player usually gets booted out of the game (and can wind up banned on either the server he is connected to, or perhaps all the anticheat-enabled servers).

Basically it's like a virus scanner for cheat software. Easy to circumvent provided the cheater has knowledge of how to write new cheat software (so that it won't be detected by PB / VAC / whatever). However, stuff like this works against the average cheater (i.e. "script kiddie") since most of them don't actually know how to write code / exploits (that are any good at least). Basically prevents them from using prewritten pieces of software which are already blacklisted by the anticheat system.

Sometimes the anti cheat software is seen as a privacy violation since it continually scans the process list and the memory of other processes when the game is running, sending its 'results' to a central server to be compared with the blacklist. Some of them are kinda hard on CPU usage and memory usage as well. (Which brings it to, people attempting to circumvent and disable the cheat scanner itself, but make it appear (to the central server) that the anticheat software is still running).

I do agree with you however regarding the editor tools and so on. If there are good editor tools people will spend less time hacking the game to add cheats. (I also think if the source code is released most people with any interest in the source are going to be doing constructive work with it, not trying to figure out how to cheat).

As far as OP3 releasing source is concerned, I remember in the past they had mentioned they wanted to release the source (after the game was done).
« Last Edit: May 23, 2007, 07:25:32 AM by op2hacker »

Offline Freeza-CII

  • Administrator
  • Hero Member
  • *****
  • Posts: 2308
Cheating System
« Reply #21 on: May 23, 2007, 10:39:04 AM »
I would like to say that any one that adds cheats to the game just so they can win with out skill is a lame ass.

Offline Combine Crusier

  • Sr. Member
  • ****
  • Posts: 456
Cheating System
« Reply #22 on: May 24, 2007, 10:37:57 AM »
I agree with you on this one.
Should we poll this or throw it OUT the window... As in totally?
Fire at will!

Offline Psudomorph

  • Jr. Member
  • **
  • Posts: 91
Cheating System
« Reply #23 on: May 25, 2007, 01:57:28 PM »
I say throw it out. Not only do cheats seem to be hated by the community, they are also superfluous. People will be able to cheat regardless of whether we provide them with a ready-made method. If anything, we should focus on ways to prevent cheating from ruining multiplayer.