Is there a way of protecting assets/media?

Everything related to 3D programming
User avatar
EdzUp
User
User
Posts: 30
Joined: Fri Aug 17, 2007 12:10 am
Location: Worthing, UK

Is there a way of protecting assets/media?

Post by EdzUp »

As the title says is there a way to protect your assets/media maybe encryption or loading from memory sort of thing for images, meshes, materials etc?
applePi
Addict
Addict
Posts: 1404
Joined: Sun Jun 25, 2006 7:28 pm

Re: Is there a way of protecting assets/media?

Post by applePi »

there is an old useful thread talking about this, but the answer is negative, can't find it
but i have a superficial approach and not a real solution: look example Entity.pb in the PB distribution examples it needs these files skybox.zip robot.mesh robot.skeleton clouds.jpg r2skin.jpg
my approach is to drop robot.mesh robot.skeleton clouds.jpg r2skin.jpg inside skybox.zip and then change the skybox.zip to cheat.txt or something else.
then make these changes to these lines in the Entity.pb file
;Add3DArchive(#PB_Compiler_Home + "examples/3d/Data/Textures", #PB_3DArchive_FileSystem)
;Add3DArchive(#PB_Compiler_Home + "examples/3d/Data/Models", #PB_3DArchive_FileSystem)
;Add3DArchive(#PB_Compiler_Home + "examples/3d/Data/Packs/skybox.zip", #PB_3DArchive_Zip)
Add3DArchive(#PB_Compiler_Home + "examples/3d/Data/Packs/cheat.txt", #PB_3DArchive_Zip)

you will see the example still works
you can remove all folders but refer to this innocent file somewhere, this is not a real solution but it is a kind of simple cheating
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Is there a way of protecting assets/media?

Post by IdeasVacuum »

Well, there is the DataSection of course - numerous code examples on the forum using this method. See:
http://www.purebasic.com/documentation/ ... ludes.html

Also the superb Bin2Data written by Thomas <ts-soft> Schulz:
http://www.purebasic.fr/english/viewtopic.php?p=374183
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
EdzUp
User
User
Posts: 30
Joined: Fri Aug 17, 2007 12:10 am
Location: Worthing, UK

Re: Is there a way of protecting assets/media?

Post by EdzUp »

Thanks guys will have a look :)
Post Reply