Saturday, November 3, 2018

game design - Custom Content Package for Files


I am about to purchase quite a few model packs from a website for prototyping my game. In the contract it states that I must protect them as to prevent the public from gaining access to them.


I remember working with the Valve games, they used .gcf (game content file) that basically was an archive of all the content for each game. They packed in sound/materials/models/maps/etc. I figured it might not be a bad idea to develop something similar to this, and just write a small tool to let me add/remove files from it.


Problem is I really have no idea how to go about starting on something like this. I tried Google but I didn't even know what to search for. If anyone has any ideas, links that might be of use, or anything else I would greatly appreciate it.



Answer



Store your data in a slightly obscure archive format such as 7-Zip.



Give them a different file extension so that a casual user can't easily open them with their zip program.


Use physfs to read and access those files. It also lets you work with files in your local directory too, so you can easily test new resources without rebuilding your packages. Highly recommended.


Consider very trivial encryption on the content, eg. XOR encryption. Write a little batch file or script to build your packages, encrypting the data as it goes in, and use the same function to decrypt the data in your game.


This won't keep a determined user out - nothing will. But it will be good enough to satisfy the requirements of your model packs.


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...