1
System / Re: People messing with my programs.
« on: December 05, 2016, 03:41:38 pm »
A lot of games use custom data containers to obfuscate assets, which wouldn't be hard to implement, and would be enough to deter most. For a small dataset I'd use a simple format of [id, filesize, data] for each asset, then concatenate. You'd reference the assets in your code by id, load the entire dataset upon loading, find the asset you require with a simple linear search, and call for example texture.loadFromMemory() instead of texture.loadFromFile. For bigger projects you may want to separate the data from the metadata, to allow loading the data only when needed (and fancier things like binary-search). A helper tool to create the container from a directory would be recommended to ease asset updates.
A step beyond that would be encrypting the file so that the assets couldn't be retrieved with file dump tools (so they'd need to dump the files from memory), but that seems like overkill on what may already be overkill.
A step beyond that would be encrypting the file so that the assets couldn't be retrieved with file dump tools (so they'd need to dump the files from memory), but that seems like overkill on what may already be overkill.