Pack assets with zip in TGB?
by yoko · in Torque Game Builder · 05/27/2009 (10:44 am) · 1 replies
Hi,
I've been using TGB for a while to make some simple game prototypes and presentations, and I must admit TGB is pretty powerful for every 2D task.
However, I have a question unresolved till now.... well how do I pack game data in a zip properly, ie:
1. What archiver do you recommended?
2. The right structure for the zip?
3. Do I need any modification (or recompile) to do this?
I never get it working, sorry for noob question, I really want to solve it out.
I've been using TGB for a while to make some simple game prototypes and presentations, and I must admit TGB is pretty powerful for every 2D task.
However, I have a question unresolved till now.... well how do I pack game data in a zip properly, ie:
1. What archiver do you recommended?
2. The right structure for the zip?
3. Do I need any modification (or recompile) to do this?
I never get it working, sorry for noob question, I really want to solve it out.
About the author
Torque Owner Matthew "Ashteth" Kee
Default Studio Name
2) The zipfile should be named for the directory you are replacing. I.E. if I have a folder named "gamedat", then I would want to name my zipfile "gamedat" and place the contents of the "gamedat" folder in my "gamedat.zip" file. Do not include the "gamedat" folder in gamedat.zip, only the contents of the folder.
3) You do not need to recompile. You only need to recompile if you wish to change the zipfile password in "ziparchive.h", I.E. the line:
#define DEFAULT_ZIP_PASSWORD "password"
Passworded zipfiles and normal zipfiles should work.
Certain resources, I.E. particle effects have had issues in the past loading from zipfiles. Bitmaps and oggfiles have never given me problems. I am uncertain if the particle effect zip loader has ever been fixed.