Encrypting and Storing resource. (with Any method)

For questions about using Classic.

Post » Tue Jul 17, 2012 11:01 am

Hi everyone

I want to encrypt and store bunch of resources in one file
And read them again in game.

So i searched the forum and found out that crc32 and md5
will do the work.

I also checked out samples, but i can't figure out how this
works so i can't do the thing.

I'd be grateful if you guys help me
( it would be very appreciating if you make a .cap file
For me. :-) )

[Edit : Any method of storing is okay. I just want to know
as many way as I can, So I can think and decide the best solution.
And also maybe I could collaborate multiple stuff to work.]


EX )
A.png, B.png, C.jpg . . . . . -> Graphics.pak
A.ogg, B.wav, C.ogg . . . . . -> Sfx.pak
A.mp3, B.wma, C.mod . . . . . -> Bgm.pak

Ps ) I also want to get this packed files can
Be modified (add / delete / change assets#zi08082012-07-19 14:43:13
B
3
Posts: 22
Reputation: 444

Post » Tue Jul 17, 2012 7:23 pm

You could use password protected zip files and use python to access the files. The only problem is in order to access a file it would have to be extracted somewhere before it is accessible by your game.
B
79
S
24
G
54
Posts: 4,738
Reputation: 40,739

Post » Wed Jul 18, 2012 12:55 pm

using *.zip files are too risky and also packing and unpacking
would be a big bother. Could you tell me another good way?

The best way i thought is to store all the stuff into a hash table,
but... I don't think it can store bitmap files as well.

(I succeed on saving some data files with hash table's save to file function,
So I thought It might also work with resource files.)
B
3
Posts: 22
Reputation: 444

Post » Wed Jul 18, 2012 6:31 pm

You could rename the *.zip to *.pak, and wouldn't a password protected zip negate the risk?

You could always add the resource files to the "files" folder of your project and use the resource plugin to access them. That way you would have only one big exe instead of many files.
B
79
S
24
G
54
Posts: 4,738
Reputation: 40,739

Post » Wed Jul 18, 2012 6:46 pm

Alright. It seems.I have no choice then.

Last question ; How should I use that zipfile python lib
You linked on your first reply?
B
3
Posts: 22
Reputation: 444

Post » Mon Jul 23, 2012 7:45 pm

Here is an example:
http://dl.dropbox.com/u/5426011/examples13/zipresource.zip

Python can extract password protected files but it needs another library to add password protected files, so I made res.zip with 7-zip to add the password (your unzipping program of choice should work as well).
B
79
S
24
G
54
Posts: 4,738
Reputation: 40,739


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests