Anyone added encryption to 1.5 yet?
by Flybynight Studios · in Torque Game Engine · 12/01/2007 (2:51 pm) · 9 replies
Just a tag from this resource:
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=9896
I took a peek at it and it doesnt look like anyone has tried it in 1.5
I currently have it working in 1.4 but was wondering what the status of this is for 1.5 any difficulties or changes?
Thanks
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=9896
I took a peek at it and it doesnt look like anyone has tried it in 1.5
I currently have it working in 1.4 but was wondering what the status of this is for 1.5 any difficulties or changes?
Thanks
#2
12/03/2007 (11:18 pm)
I put that resource into 1.52 several months ago with no problems that I can recall.
#3
So for example in my UI folder I have a bunch of images.. In this case I zipped a file called alogo1.png.. So now the file is called alogo1.zip. I deleted the PNG file and run my game and the logo doesnt appear on the GUI.. just a black border around where it shoudl be.. In the console it says missing "alogo1.png"...
Again, just to clarify, this is without encryption of anykind, just compressing the file using the internal compression ZIP of XP. I also tried compressing with Winrar but no diff. I think if I figure out what the heck I've got wrong with the compression stream the encryption resouce would actually work fine. I've added it no problem and I get no compile errors but no go. Well if a regular ZIP isnt unpacking then the encrypted ZIP sure as heck wont :)
Just to confirm, I am doing this right correct?
parent folder/originalFile.PNG
becomes
parent/originalfile.ZIP
I hate asking to steal someones expertise on this but I really -really- need to get this working so I can get some testers to give me a hand with my debugging. Sure could use a little Christmas cheer ;)
Thanks for your time folks.
PS: I would be willing to setup PC Anywhere or other remote access software to allow someone to look over my shoulder at what I've got going on. I'm using VS2005E as my development platform. Thanks again.
EDIT: Ok further testing.. I took the EXE from the 1.5 demo, dropped it into a clean test enviro and tried to make a GUI with 1 simple graphic.. It doesnt appear if it's zipped.. So maybe my codebase isn't borked.. Anyone got some input for me?
12/06/2007 (4:42 pm)
Ok, wow I am totally stumped now. I have gone back through my project EXEs back to Dec 06.. None of the zip compression in our 1.5 builds are working :/ Nevermind encryption, just the straight up zipping of a file.. My understanding is that Stock Torque has no problem with that.So for example in my UI folder I have a bunch of images.. In this case I zipped a file called alogo1.png.. So now the file is called alogo1.zip. I deleted the PNG file and run my game and the logo doesnt appear on the GUI.. just a black border around where it shoudl be.. In the console it says missing "alogo1.png"...
Again, just to clarify, this is without encryption of anykind, just compressing the file using the internal compression ZIP of XP. I also tried compressing with Winrar but no diff. I think if I figure out what the heck I've got wrong with the compression stream the encryption resouce would actually work fine. I've added it no problem and I get no compile errors but no go. Well if a regular ZIP isnt unpacking then the encrypted ZIP sure as heck wont :)
Just to confirm, I am doing this right correct?
parent folder/originalFile.PNG
becomes
parent/originalfile.ZIP
I hate asking to steal someones expertise on this but I really -really- need to get this working so I can get some testers to give me a hand with my debugging. Sure could use a little Christmas cheer ;)
Thanks for your time folks.
PS: I would be willing to setup PC Anywhere or other remote access software to allow someone to look over my shoulder at what I've got going on. I'm using VS2005E as my development platform. Thanks again.
EDIT: Ok further testing.. I took the EXE from the 1.5 demo, dropped it into a clean test enviro and tried to make a GUI with 1 simple graphic.. It doesnt appear if it's zipped.. So maybe my codebase isn't borked.. Anyone got some input for me?
#4
I used zips in 1.4.2 by opening my data folder, zipping everything inside, and named the zip "data", then deleted the data folder altogether. It worked. I just tried that in 1.5.2 and it didn't work.
Edit to add: See my next post. This one is incorrect.
12/06/2007 (4:57 pm)
You may be correct about the zip archive being broken in 1.5I used zips in 1.4.2 by opening my data folder, zipping everything inside, and named the zip "data", then deleted the data folder altogether. It worked. I just tried that in 1.5.2 and it didn't work.
Edit to add: See my next post. This one is incorrect.
#5
Example, zip the contents of starter.fps, name it starter.fps.zip and put it in the parent folder. Rename or delete the starter.fps folder.
If you don't want one big zip, you can zip and replace the sub/sub folders like client/scripts to get a zip file called scripts.zip which you replace the folder with. You might make small updates over time and its a smaller download for your customers if they can only download the required scripts folder or shapes/buggy folder etc.
Watch the path names in the zip, they should be relative to the folder you are replacing.
12/06/2007 (5:08 pm)
The zip file should replace the folder, not the file.Example, zip the contents of starter.fps, name it starter.fps.zip and put it in the parent folder. Rename or delete the starter.fps folder.
If you don't want one big zip, you can zip and replace the sub/sub folders like client/scripts to get a zip file called scripts.zip which you replace the folder with. You might make small updates over time and its a smaller download for your customers if they can only download the required scripts folder or shapes/buggy folder etc.
Watch the path names in the zip, they should be relative to the folder you are replacing.
#6
I have not tested it with stock 1.5.2. I was working on the combat starter kit at the time which is based on 1.52 and is heavily modified, but both standard zips and zip encryption were working fine with it.
12/06/2007 (5:17 pm)
@Mike, I did not see your post before I submitted mine, so it was not intended to nullify your comments.I have not tested it with stock 1.5.2. I was working on the combat starter kit at the time which is based on 1.52 and is heavily modified, but both standard zips and zip encryption were working fine with it.
#7
And you are correct. I must have done it wrong when I attempted it before. I just zipped the contents of my data folder and it worked just fine.
12/06/2007 (5:41 pm)
No problem Duncan. :)And you are correct. I must have done it wrong when I attempted it before. I just zipped the contents of my data folder and it worked just fine.
#8
Is this not correct? Can we not zip up individual files? Seems to me it wouldnt be a huge change to the code to accomplish this.
As always though guys thank you for setting me straight.
Asta.
12/06/2007 (7:02 pm)
Thanks a bunch for the feedback guys. I'll retest.. Now unfortunately I hadnt intended on zipping up the entire GUI folder to accomplish this :/ I was sure hoping to be able to zip up individual files.Is this not correct? Can we not zip up individual files? Seems to me it wouldnt be a huge change to the code to accomplish this.
As always though guys thank you for setting me straight.
Asta.
#9
Yes the resource DOES work.. Yes I had messed up my implementation..
Now all I need to do is figure out what I did to get individual files zippered up.. That would be a -GINORMOUS- help.. but for the time being this allows me to make up some demos for private testing.
Thanks again guys.
12/06/2007 (8:42 pm)
So.. as always.. the great community here has saved me from my own stupidity.. again.. :/Yes the resource DOES work.. Yes I had messed up my implementation..
Now all I need to do is figure out what I did to get individual files zippered up.. That would be a -GINORMOUS- help.. but for the time being this allows me to make up some demos for private testing.
Thanks again guys.
Torque Owner Flybynight Studios
I'm surprised that no one has done this to 1.5 yet.