Game Development Community

Zipped resources

by Danner Jones · in Torque Game Engine · 01/30/2004 (1:04 pm) · 6 replies

I was reviewing some old posts about being able to zip up resources so I've given it a try - but I'm hitting an assert.

I took the demo folder's contents and zipped it up (using the built-in WindowsXP zipping ability), named it demo.zip and put it in the root of where I run TorqueDemo.exe (and I renamed the demo folder so the game wouldn't find it). I start Torque with "-game demo".

The engine unzips some of the files (I can see the demo folder with a number of folders and files).

The assert is in \engine\core\zipsubstream.cc at line 199. In my file, this is:
if (in_newPosition == 0)
{
    ...
}
else
{
    AssertFatal(false, "Not implemented!");
    // Erk.  How do we do this.
    return false;
}

Anyone know much about the zip library being used (zlib, presumably) to know what this might be?

-Nerseus

#1
05/13/2004 (1:55 pm)
Has anyone got this to work yet? I've seen posts about this since 2001 on the GG forums. I'd like to see this implemented one of these days.
#2
05/13/2004 (10:34 pm)
Looks like you might be trying to write to the ZIP file?
#3
05/14/2004 (7:02 am)
Nah, I'm just zipping-up the sample.fps directory saving the subdirectory info and file names and putting the zipfile in the root directory and it reads main.cs and then fails to read anything else (doesn't see the zipfile as a possible search path for files).
#4
05/14/2004 (7:25 am)
I've noticed that while the engine will correctly read script files from ZIPs, it will not properly read say DTS files. It will crash. So something is fubared in the ZIP file code.
#5
05/14/2004 (9:39 am)
I just tested with a recent ( within a week) HEAD build (release build).

Everything worked fine, menu came up, mission launced fine.

One thing about zipping up the file is that you need to make sure the starter.fps doesn't get saved as a path inside the .zip.

Your tree should be something like this:

+-main.cs
+-ReadMe.html
++Client
|+-config.cs
|+-defaults.cs
|+-init.cs
|+-prefs.cs
+
#6
05/20/2004 (10:02 pm)
I am break at
bool ZipSubRStream::setPosition(const U32 in_newPosition)
{
AssertFatal(m_pStream != NULL, "Error, not attached");

if (in_newPosition == 0)
{
........
}
else
{
AssertFatal(false, "Not implemented!");
}
}

this bug bring on OggVorbisFile