Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Are there any anti-cheating frameworks for Java games in order to make it a bit harder to cheat? (eg. something that protects from things like Cheat-Engine) Obviously if the cheater were to develop his own tools this wouldn't help much, but I'm looking to protect the game from the average cheating 13 yr. old child.

share|improve this question

closed as off-topic by Byte56 Aug 16 '13 at 13:59

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions that are about "which tech to use" are outside the scope of the site. For more information, see this meta post" – Byte56
If this question can be reworded to fit the rules in the help center, please edit the question.

add comment

3 Answers 3

up vote 9 down vote accepted

None ready that I know of.

Commercial (expensive) systems like PunkBuster exist, which constantly scan memory locations for changes, asserting that they haven't changed by impossible amounts or at impossible moments in time.

You could implement something like this yourself, by occasionally asserting that the changes to the contents of your variables make sense.

If it's a singleplayer game you're working on, I have a very personal request: Please don't do it! Back when I was 13, I learnt a lot about how games work by CheatEngineering or Poking them. It's like taking apart toasters and RC cars. I want my kids to live in a world where they can choose to break their things regardless of the opinion of a grown-up who "knows better".

share|improve this answer
4  
I want my kids to live in a world where they can choose to break their things regardless of the opinion of a grown-up who "knows better". +1 –  Grimshaw Jun 16 '12 at 21:55
    
Thanks for the help, its a multiplayer game (although it does have a single player mode) So I think I might just implement it in the multiplayer areas when cheating wouldn't be fair for others, as I too learned my initial bit of programming from poking around in games like Civilization and Roller Coaster Tycoon –  user185812 Jun 16 '12 at 22:04
2  
@user185812 if the game is multiplayer, you should protect it server-side, not client-side. I'm sorry but if you don't know this, you don't know anything about security, and you'd better learn. –  Lohoris Feb 3 '13 at 12:42
    
Totally agree with Anko, if you aren't interfering with the fun of others, and can find any fun in cheating (it can be fun), you should be able to do so. That said, even if the game is single player but will have feature like leaderboards, you can have a bit more control by having your own cheating menu and disqualifying the player for using it. –  petervaz Jun 13 '13 at 12:35
add comment

When it's a single player game, there is really no reason to prevent cheating. Cheaters can only hurt their own game experience, not that of others. The cheaters themself, however, perceive the ability to cheat as a vast improvement of their game experience. So why bother?

When it's a multiplayer game, you can prevent cheating by designing the network protocol in a way that trust in the client application is not required. This is much better than any 3rd party AC-tool.

  • Handle each message from a client on the server as a request which can be denied, not as an order.
  • Have the whole game state and game mechanics on the server. Do not allow clients to alter the game state directly.
  • Do not give the clients any information they are not supposed to show to the player
share|improve this answer
add comment

This is a simple way to do it:

public class SecureInt {
    private static int KEY = (int)System.nanoTime();
    private int secureValue;

    public void setValue(int value){
        secureValue = value ^ KEY;
    }

    public int getValue(){
        return secureValue ^ KEY;
    }
}

You just use the above class for ints, floats, etc.

share|improve this answer
1  
Doesn't do anything to stop cheat engine. Find health by scanning for "changed value" enough and then freeze the value -> immortality. What you need is to create an object that stores each of its bits in separate objects, and allocates these in random order, every time the value changes. –  Jari Komppa Jun 13 '13 at 12:17
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.