Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Windows / managing the asset-files into one file?

Author
Message
frittblas
10
Years of Service
User Offline
Joined: 15th Jan 2014
Location:
Posted: 24th Oct 2014 03:14
*

hello I was wondering if there's a way of storing all the image and sound files
in a project into one data file (zip maybe?) so people who play your game can't
mess around with your files.

I know you can make zip files but they aren't password protected (i think).

Any answers would be great, cheers. Btw i use tier 2.

f
Jack
19
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 1st Nov 2014 07:41 Edited at: 1st Nov 2014 07:45
Yes, it is possible. You can recompile your media to a custom format.
If you are using Tier2 like you said, there should be a lib for that anywhere
Tier2 should easily solve your problem Search for a function library, that can decompress password protected zip files. Once the media files are loaded, delete it from the sandbox directory. This should be the easiest way.

( To create a complete answer: )
Tier1 is a little harder.

Images could be saved as memblock information files (imagetomemblock(?), opentowrite) will do the stuff. Memblock images files will be very big, because they are not compressed (If you want smaller files, you have to write your own compressor)
Obj files could be manipulated and saved.
I have no clue, how to do this with sounds/music or videos.


[/url]
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 6th Nov 2014 14:49 Edited at: 6th Nov 2014 14:51
Perhap's you could use an encryption/decryption system for your media (if you want just protect them) ?

Another idea :
Load all you media and save them as a single file (with writedata) with some character between two media to separate theme. (I haven't tried this technic)

http://www.dracaena-studio.com
Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 8th Nov 2014 07:15
I encrypt all of my sensitive media with a key that's hard coded into the program and uses XOR to write/read the file. The file is read byte by byte, xor'd, saved, then loaded and deleted.
If developing for mobile you might want to be cautious about doing something like this with a large zip file because the load time will be awful. I do it with lots of smaller files and the load time is negligible. You could also do something with memblocks, but I've found that to be overly complicated and my method is plenty fast.

JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 13th Dec 2014 10:11
Images and smallish wavs are easy to encrypt-decrypt in a memblock.

Videos and music files tend to be large, and you can't play them out of a memblock, so they need to decrypted and saved - then deleted when finished. Really you only need to encrypt the headers - say about 64 bytes.

On PC, with T2 or Pascal, you can include them in the exe as a resource and unpack them at run time. I use this technique sometimes for DLLs, unpacking to appdata and deleting at the end of the program run.

-- Jim - When is there going to be a release?

Login to post a reply

Server time is: 2024-03-28 11:35:24
Your offset time is: 2024-03-28 11:35:24