-1
\$\begingroup\$

I am a beginner C++ programmer. I am creating a custom Open Tibia Server and I use the alternative Tibia client (OTClient).

I want encode game files (image, sound, lua, etc.) or pack all files into one. Can anyone help me with this?

\$\endgroup\$
1
\$\begingroup\$

There are already multiple similar questions, that should give you some pointers to get stared:

One option is to use an archiving tool to pack all game assets into an archive and encrypt it with a key. Then in your application use a library such as "zlib" to load and decrypt the contents from that archive.

From a security standpoint, those contents could of course still get extracted, if someone manages to get the key from your application. But there are some tricks around to make that harder, e. g. by not storing to complete key string in one place in your application.

You of course also need to be aware, that those packing approaches also have some drawbacks, e. g. when you later want to replace a single asset file in an patch, you either need to ship again the complete game data archive again or create some sort of intelligent updater tool, that can add/remove/edit assets within your game data archive file.

\$\endgroup\$
  • \$\begingroup\$ If there are duplicates, just link to the duplicate instead of answering the question again. \$\endgroup\$ – MichaelHouse Sep 5 '14 at 13:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.