Game Development Community

Zip Encryption in TGEA questions

by Ronald J Nelson · in Torque Game Engine Advanced · 09/05/2008 (6:20 pm) · 2 replies

OK due to some directory caching issues I have discovered in my game's design, I have come to the point where I really need some questions answered.

1. I have read somewhere, maybe more than once that there are issues with zipping some files in TGEA. If this is true, can someone clarify which those are so I can make appropriate arrangements?

2. When you zip a directory, is it possible to have a copy of the same directory, not zipped and that Torque will somehow recognize them both as being the same directory? I ask because I would like to protect my original work, but I need to leave room for players to add some of their own.

3. Where do I set the password in the code?

4. Is there some sort of best method for zipping and password protecting the items you choose to zip?

Thank you in advance.

#1
09/06/2008 (2:07 pm)
OOps I think I have this flagged for removal, disregard that if you will admin. I still have another question that pertains to this since I seem to have answered all of my questions already on my own for the most part. I will even post the answers here.

1. YES!! This of course being the source of my next question. I have found that zipping the shaders folder breaks my game. What causes this? Since I am using 1.03 right now, for future reference is it something that is fixed in 1.71?

2. Yes it is possible but see my response to #4.

3. In any version older that 1.7.0 you must add the zip encryption resource to get this setup. The instructions for that are in the resource. It comes standard in versions of TGEA 1.7 and newer. The pass word is set in zipArchive.h in the newer versions.

4. WOW is there ever, and this was a major source of aggravation for me at first until I stumbled upon the answer. I have not tested this in TGEA 1.7 and newer yet, but this is true for all older versions as I have tested my results pretty thoroughly.

First, and apparently most important, do NOT add the initial directory information to the zip. That means if you want to zip your entire "client" directory, do NOT select the "client folder and tell it to creat a client.zip. It keeps the client directory in the zip as well so the engine recognizes it as client/client. You must open the client folder and zip all of contents within and then name it "client". It will allow subfolders in that method.

The you just make sure the client.zip is in the folder where the original client folder is, and delete the original client folder. Now keep in mind when preferences are exported the client folder will be recreated so you might just want to clear out the client folder.


So I know I probably just said alot of stuff most people already knew, but I didn't. I hope my answers help someone. Now about #1, any ideas on that?
#2
11/02/2011 (8:54 am)
(3 years later) Very helpful, thank-you!

Now to find out if there's a way to use a file extension other than .zip to hide them.