2019-07-13 01:03:40

hi guys. So I've seen in a few games that the game's exe file is bigger than a normal exe file. I know why that is, the sounds.dat file is compiled in it, but how do some game developers do it. I want to do this because I don't want people decrypting my sounds. Do I need to download something to do that, or do I just use bgt. That would be a good thing to know. Cool if you can tell me that.

2019-07-13 01:15:25

Whether the sounds are in the exe or not generally won't affect how hard they are to decrypt. Deter the laziest hackers, I guess.
To do this in BGT, include the pack file like you would a script.
#include "sounds.dat"
Then, before you do anything with your sounds, set the sound storage to "*", to point to the included pack. Do not set it to the filename of the pack directly, iirc.
    set_sound_storage("*");
Iirc, that does it. Set the decryption key if you have one, unless you have another method of decrypting the sounds that doesn't put the key in an easily found part of RAM.

看過來!
"If you want utopia but reality gives you Lovecraft, you don't give up, you carve your utopia out of the corpses of dead gods."
MaxAngor wrote:
    George... Don't do that.

2019-07-13 21:29:30

I wouldn't just use BGT and add my sounds to the EXE like that, though.
It doesn't modify the pack file. It just sticks it on the end of the EXE. If you can find where it starts, you can extract it.
You could also try having a function that returns a key rather than just using a string in set_sound_decryption_key, because if you just do that the key will end up sitting in memory.
Maybe hash a string in the function that returns the key and return that.

2019-07-14 10:36:02

yeh, it would be better to hash the string with the key in it, so that it cant be found in memory

Have a lovely day.

2019-07-14 11:43:03

Encryption is a funny thing. You could probably get pretty secure using a custom form of encryption, even though it's going to be far weaker than anything professionals use, because of the obscurity. If you get popular enough, someone will break it. If you're only audio game popular, though, most of the crackers hereabouts are not going to put in the kind of effort necessary to get around something mildly creative. Put a fake key somewhere they can easily find it, and use something completely different, then lurk on their teamtalk server and listen to them run around in circles until they get bored.
Now that I've said that, they'll probably step up their game, but eh.

看過來!
"If you want utopia but reality gives you Lovecraft, you don't give up, you carve your utopia out of the corpses of dead gods."
MaxAngor wrote:
    George... Don't do that.

2019-07-14 12:52:51

yep,

Have a lovely day.