#how to obfuscate assets? I use glb, jpg and png. bevy0.18

17 messages · Page 1 of 1 (latest)

solemn juniper
#

need help obfuscating resources

mellow slate
#

to what degree? it'll always be possible to rip them, the only thing you can do is make it more annoying

vague solar
#

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 🙂

acoustic night
# solemn juniper need help obfuscating resources

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

mellow slate
#

i could see a custom assetsource that's just a password'd tarball if there aren't too many assets

acoustic night
#

but the password in what you're describing would still be on device...so...not really protecting anything

night atlas
#

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

GitHub

A total rewrite of the now-abandoned Richter Quake engine, splitting it up into Bevy components that can be independently used. Work-in-progress but is confirmed to be able to load and play demos f...

#

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?

rapid blaze
#

So maybe just a matter of terms and conditions.

acoustic night
#

Then I guess just encrypting them at rest

#

With the key embedded in the binary

spare tendon
#

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

night atlas
# rapid blaze

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