Simple Asset Protection
There’s no way to be 100% secure when the game you make is installed on a home computer. By it’s nature the digital bits of your messy creative masterpiece are on display.
Right now an AI Cloner can copy your game by simply looking at your assets, opening up your .app, and there’s all the game data, images, json data tables and so forth waiting to be imported into an AI.
Now, there’s no way to stop this completely and suppression techniques go from the (hash filenames so people can’t tell what’s what) to the extreme (stream everything). But I wanted something simple that would stop most casual hackers, and not be a hassle for me when I’m making and deploying builds. In fact, if it could make builds easier that would be an absolute bonus.
There’s something called a “stream cipher”, that is, you can read a file and one byte in becomes one byte of an actual file, with that byte then affecting the next one with some math, and in the case of something like the Salsa20 cipher, in blocks of 4. It sounds complicated, but wikipedia to the rescue (https://en.wikipedia.org/wiki/Salsa20). What I like here is that wikipedia very kindly gives you a step by step with some C++ code.
At id when we made games we had pak files. A pak file was a zero compressed zip file with all the data inside. Pak0.pak would have all the maps, textures, and so forth, and if we had to patch the game we could make a small patch and release pak1.pak which would be read before pak0.pak, it was a simple and elegant simple.
So I’ve re-implemeted that system again, except this time using a stream cipher. My game data reads as random garbage if you try to look at it without a key. Now you can load the game into a series disassembler and get that, can’t stop that, but it stops easy hack. And in the land of AI cloning, you don’t have to be good, you’ve just got to be slightly harder than someone else.
If you’re making a game right now I encourage you all to look at something like this to at least help make your game package simpler, now I ship a .exe and a .pak file and that’s it. The fact it also adds a layer of security is a real bonus.
