Encoding And Hashing

When dealing with external files, there is always the possibility that the end user could open and change the information that they contain, and so change your game. This can result in broken gameplay elements or fraudulent scores on-line (for example), and so GameMaker provides you with some basic encoding functions as well as functions to perform hashing checks on strings and files to make sure that they have maintained their integrity before being used. There are also some functions supplied for encoding and decoding JSON format strings, as well as for creating ZIP files.

NOTE Encoding is NOT encryption! A base64 encoding renders the file unreadable to the naked eye and will require an effort on behalf of the user to decode, but it is not secure from hacking. It is recommended that you mix those functions with your own encryption (there are many forms of encryption and script functions for GameMaker available on the internet).

Function Reference

JSON

NOTE See Guide To Using JSON for detailed information on how to use JSON in GameMaker.

Base64

Hashing

CSV

ZIP Files

Encoding and Hashing Buffers