#how to obfuscate assets? I use glb, jpg and png. bevy0.18
17 messages · Page 1 of 1 (latest)
to what degree? it'll always be possible to rip them, the only thing you can do is make it more annoying
To stop most people from snooping would be to pack em in a .bin file with some virtual filesystem and like zipped maybe? But yes, it will be hard to stop those that really want / know how to solve these puzzles. Unless you do some even more "encrypting" of them and then have a key in the binary to decrypt before loading. Still, can be solved by anyone persistent enough 🙂
If it is going to be on the users device, there isn't much real reason to do this. Obfuscation basically only makes things slower when running it. If the thing is obfuscated by just normal practices that improve performance (like a custom binary storage format) that's a whole different thing, but there is no real way or reason to actively obfuscate stuff
i could see a custom assetsource that's just a password'd tarball if there aren't too many assets
I mean, that's not totally unlike how consoles and steam do preloading/preinstalling.
They download the whole thing encrypted, and on release they get the key
but the password in what you're describing would still be on device...so...not really protecting anything
In case you want to have some kind of hand-rolled, virtual, packed format that handles this I have a custom AssetSource for my game. It also handles overlaying multiple files on top of one another, although that's probably not something you want. In my case I'm loading Quake's .pak format, but it might be good as a reference in case you want to do something else. https://github.com/eira-fransham/seismon/blob/main/crates/bevy_mod_pakfile/src/lib.rs
It'll be obfuscated but it's impossible to make it 100% secure. For an indie game, though, I'd argue that security through obscurity is good enough. Just using a really basic key-based cypher + splitting files into chunks and scattering the chunks throughout the packed file should be enough. If you really care about obscuring the data, you can also use classic binary obfuscation tools, which will make it harder to extract the key from your game's binary. Are you making an ARG-style game where datamining would ruin the fun? What's your ultimate goal?
For buying assets from turbosquid, you have to make it require some engineering to get the assets.
So maybe just a matter of terms and conditions.
Would a xor with some constant count for that?
Could be pretty fast with SIMD, perhaps to the point where it's not a meaningful slowdown.
require some engineering to get the assets
is interesting, kind of hard to define
I think xor with a constant would still count because you'd need to reverse-engineer the game binary to find out what constant you're xor-ing with
Even if it'd be very easy to brute-force if you knew what the underlying model format was