GM:S 1.4 Detecting Cheaters

Discussion in 'Programming' started by alper41, Mar 12, 2019.

  1. alper41

    alper41 Member

    Joined:
    Jul 5, 2018
    Posts:
    91
    Hi there, I have a game and I want to detect that ini file has been manually changed in this game, how can I do?
     
  2. marasovec

    marasovec Member

    Joined:
    Sep 15, 2016
    Posts:
    308
    If you want to detect that while the game is running I'd copy the file data into a one long string everytime you save something in it and then compare the string with the file every x seconds or before you save something in it again
    If you want to do this when you open the game I'd save the file data into a different file that is encoded. Then when you start the game compare the save file with the encoded one. If the encoded file is missing that means someone manually deleted it to prevent comparing
     
    Last edited: Mar 12, 2019
  3. curato

    curato Member

    Joined:
    Jun 30, 2016
    Posts:
    320
    Depends on how intense you want to be about. I would just use game_id to do some minor encryption. Otherwise you could do some check like if the players health max health was 10 then all of a sudden it jumps to 1000 (or what ever would be ridiculous in your game) then flag the violation and take the action you would want to take.
     
  4. NightFrost

    NightFrost Member

    Joined:
    Jun 24, 2016
    Posts:
    1,864
    Don't store in plain text or numbers, but instead have the save / load system route all data through a DS map and use ds_map_secure_save and ds_map_secure_load.
     
  5. alper41

    alper41 Member

    Joined:
    Jul 5, 2018
    Posts:
    91
    nice suggestion but I cannot change the game's save system radically
     
  6. Taddio

    Taddio Member

    Joined:
    Nov 16, 2018
    Posts:
    463
    On a very basic level, you could ust encode every string base64, plus add a couple of usless strings and values in there that do nothing more than make it more complicated to find the "real"stuff.
    Ini aren't safe at all and are easily editable, so you just have to go with the "confuse/discourage the user" strategy if you use them
     
  7. Liquid

    Liquid Member

    Joined:
    Sep 8, 2016
    Posts:
    80
    encrypt file before save
    or save a hash from the data concat with a secret phrase (only your programm code knows the secret phrase) to ensure nothing changed
    hash = md5_of (data2save+secret_phrase_the_cheater_cannot_know)
    and you save hash after the data, than you can check if hash is still suiting to the read data
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice