ive been searching the forum/googling for a good easy way to encrypt external text files/.gmspr files. (and possibly the entire executable and the external files it needs to access).
I need this primarily because the majority of text in MechLore is stored and read from external text files. I did this so that I could use the simple read_line gamemaker function to display a "page" of text, without needing a complicated message system. (Its also nice to be able to edit in game text while the game is running).
My problem is this.
I'm going to release a demo for MechLore very soon, but I dont like the idea of absolutely ANYONE being able to open up the text files and read/change the dialog to anything that they wish.
There are a few encryption/archive creating dlls and extensions on the GMC, but they all seem to revolve around the idea of extracting the files during runtime, at which point they're still on the players harddrive in easily editable form. Even if you have code to destroy the folders/files on game end, there is still a chance of the files remaining, as you can't always control when the user will end the game, if it crashes, etc.
It all seems rather messy to me.
The best and easiest solution that I have found, for texts at least, is a script that I found here http://gmc.yoyogames...howtopic=319847
which basically encrypts the text in the text files with a crypto algorithm. This would make it so anyone could change the files, but a read would have no idea what those text files said without first decrypting them.
Mostly this is acceptable, but difficult to implement, as I would have to manually encrpyt each text file and then add decryption code to each place that that textfile is read.
Are there any easier ways?
Is it possible to simply put all the external files in one "archive" of some type, and just read directly from it?
Even better, is there some kind of "shell" that you could encapsulate the entire executable and external files in that would basically preform like normal internally, but still prevent users from accessing or changing anything inside?
Im not looking for super hard encryption, just enough to stop the average user from being able to simply browse in, decompile the executable, edit texts, directly reuse sprites, etc.
Also... (this post is getting long)... on the subject of the decompiler and anti-decompiler...
how efficacious is this? Is it worth using? Should I try and find another way to protect my source code if im worried about people borrowing from it? (which I am... I realise people are often overly paranoid about this sort of thing, but ive been working on MechLore for what seems like forever. To be finally about to release a demo is exciting, but also seems to bear a certain degree of risk. )
Hopefully someone can help me with this... as its a problem farther beyond the scope of my ability than I think I can really figure out on my own.
Edited by mechlore, 09 February 2012 - 12:11 AM.