How do I make an Anti-Cheat?

Get help using Construct 2

Post » Wed Aug 23, 2017 1:18 am

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
B
10
S
3
G
1
Posts: 38
Reputation: 1,242

Post » Wed Aug 23, 2017 5:07 pm

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.
B
16
S
3
Posts: 69
Reputation: 1,048

Post » Wed Aug 23, 2017 9:54 pm

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
B
10
S
3
G
1
Posts: 38
Reputation: 1,242

Post » Thu Aug 24, 2017 2:30 am

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.
SoftWork Group Ltd

Co-founders:
Robert Matik (UK Division)
Lukas Zyrek (CZ Division)

07399443703 (UK Division)

International(at)softworkgroup.wtf - for basic questions and information
Office(at)softworkgroup.wtf - email for questions about team and proposals
B
16
S
5
G
1
Posts: 49
Reputation: 1,656

Post » Thu Aug 24, 2017 11:45 am

I don't know what you are trying to say...
B
10
S
3
G
1
Posts: 38
Reputation: 1,242

Post » Thu Aug 24, 2017 3:27 pm

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. :roll:
https://drive.google.com/open?id=0B7-sv ... 2ZwdEtRaEk
B
16
S
3
Posts: 69
Reputation: 1,048

Post » Thu Aug 24, 2017 3:33 pm

Ok, thank you :D Ill put it into my game
B
10
S
3
G
1
Posts: 38
Reputation: 1,242

Post » Thu Aug 24, 2017 4:13 pm

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.
B
10
S
3
G
1
Posts: 38
Reputation: 1,242


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 27 guests