0 Favourites

How do I make an Anti-Cheat?

  • I am slightly worried that someone will cheat on my game, and I HATE cheaters, so I want help making an anti-cheat. I did design one earlier, but when i collect a coin it sets off the anti-cheat. I would give a capx but I don't want people stealing my game. If you want moree info, just PM or reply.

    • Ryan, Kdot Development
  • Well it depends on what your game does. Specifically, what values do you worry about beeing cheated? Score? Player health?

    I see there are two categories: Static and Dynamic values (that you want to protect)

    Static values you can theoretically compare to a different static value, so in case someone tinkers with said value (e.g. Player jump strenght = 9999) then the event "Player jump strength = 123" would not be true and anti-cheat would kick in. Consider though, that a cheater might be able to adjust both values, so I´d make the second value be send from a server, rather than beeing inside the app.

    For coins (dynamic value) I´m not sure what the best method is. You probably want to check for "was that possible?". E.g. having coins always go up by 1, it´s not possible to suddenly go up by more than one coin (indicating cheating) Also you could use a server, that instead of counting the coins up, you send a request to the server, and the server then responds if the coin pickup was legitimate. Only then you count up the coins. You also likely have to use some protection for that so someone can´t simply fake the server response. That could probably be done using sessionIDs and hashing + salting.

    I´m no expert on that subject though, take it with a grain of salt. But maybe you can google some of the stuff I said and find a solution.

  • I'm worrying about cheating coins/chests/etc. so that means I would use your dynamic value method. And because I'm so unfamiliar with servers and all that, would it cost me any money? I don't really want to spend money on this little game that no one even finds on the app store. My idea is that maybe I connect it to their WIFI (Like a server that you can only access if you are on the hosts WIFI) but then I'd probably need to ask the users permission to do that. Otherwise Ill have a backup value that is "Coins * 1029 / 8756 * 2 / 1.1029" or something like that, and yes I have tried that method and it sets off the alarm when you just collect a coin. So maybe give me an example CAPX or something?

    • Ryan, Kdot Development

    BTW I know you aren't good at this subject, but it doesn't hurt to ask :P

  • I'm using functions to determine what to do and when. For example:

    Func:

    "ClenUpAC"

    'set everything in the AC to OFF, every boolean etc'

    "StartAC"

    'Now set what should happen with the AC'

    "Debug"

    'only if you are using debugging as I do'

    Simple way and you can call it anytime you need.

  • I don't know what you are trying to say...

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Try this, no warranty. If you alter the coins by more than one, it will reset the coins. (Press c to try it) But I´m pretty sure if you are dedicated you will be able to cheat anyway. But it´s probably enough of a scriptkiddy speedbump. <img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes">

    https://drive.google.com/open?id=0B7-sv ... 2ZwdEtRaEk

  • Ok, thank you Ill put it into my game

  • Its working on your capx, but not on mine. I don't think im putting it in the game correctly but thats mostly the only way. I guess I can deal with the cheater as its their choice. Unless you have any other ideas, Ill just deal with it.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
167 14,497
DMT2005's avatar
DMT2005
Unread sticky
1 Favourites
C2 Games made with CocoonIO
136 89,826
minhcuong's avatar
minhcuong
Unread hot topic
99 10,139
karshinkoff's avatar
karshinkoff