hello everyone, I am just starting with Castle Game Engine and Pascal!
A new language I am willing to learn
I have one question before diving deeper with the engine (I have followed the documentation code to start with).
So the question is: when I built the sample code I could access all my datas (gfx, sounds, …), aren’t they obfuscated? Same question for the code, anyone can see the code?
I may have tons of other questions coming
No the data is not obfuscated. And while I believe there are no ready solutions to do that “automatically on all the assets” you can do that manually though. E.g. you can use BlowFish encryption on all XML assets, and i believe you can archive some assets into password-protected zip files.
The code on the other hand gets “compiled” so the original source is not available unless you publish it youself, e.g. on GitHub or as a separate package. However, as all compiled code it can be still reverse-engineered, but it’s hard so unless you’re developing something extremely expensive you shouldn’t be worried about that.
Note that CGE isn’t here very different than other engines Other engines (e.g. Unity) also don’t put any special effort to obfuscate your data. Many engines pack your game data into separate file – but that’s just packed using well-known (or well-reverse-engineered) format, so users who want to “dive” into game data are free to do so. In our case, “Package” operation on a project packs it into zip, both the compiled exe and the data.
Thank you for your answer
The framework I am currently using has obfuscation when I export my game I have: “Encrypt asset files” and “Encrypt code files”.
I used godot a long time ago which has a .pck file which seems to encrypt the data(?) and I barely used unity so cannot really tell(?).
Imho users having access to my assets is not so cool
The compiled code is harder to reverse so this is good.
I am going to have a look at your links but it will take some time to digest as I am new to Pascal.
Looking forward to using Castle Engine (I installed the plugins for VSCode because Lazarus was so different from what I am used to).
Current versions of the engine don’t have this option; it was recently added to the unstable (and eventually the 4.0 version) of the engine. Please bear in mind that users can still dig through the binary, extract the encryption key, decrypt the PCK file, and search for whatever they want (though this will be more difficult).
Do other game engines have any built-it “assets protection”? Nop, Unity and Unreal forums are full of the similar “Protect game resources” topics, with the exactly same answer: “it’s pointless”. (And asset stores are full of third-party snake-oil tools).
That said, I of course don’t want to reject this idea just based on the grounds that others don’t have it I understand the desire to obfuscate your data.
So this approach would do the trick:
at release time, automatically encrypt all data (all the files in data/) with BlowFish