Game Development Community

Loading TileMaps from a .zip file fails

by Harold "LabRat" Brown · in Torque Game Builder · 03/04/2005 (12:57 am) · 14 replies

Pretty much sums it up right there. was working on a practice package setup to run everything from .zip files... and the tilemaps just won't load from within the .zip file.

#1
03/04/2005 (1:13 am)
@Harold: To be honest, I've never actually used .zip files T2D. I'd need to find out more info about how it works or perhaps you could post here? Do files have to go through the resource manager to work correctly with this?

- Melv.
#2
03/04/2005 (1:30 am)
James Urquhart would be the one to ask about the specifics on how it works... his latest resource deals with the resource manager and asset containers.

My understanding is that yes... they would need to be handled through the resource manager. It's not a show stopper, and probably isn't a high priority fix. Something to keep at the bottom of your TODO list when it gets quiet. :)
#3
03/04/2005 (2:30 am)
Actually I really want that functionality. I don't like having a tons of loose files everywhere for a release version.

I tested it and maps do not load. My art was all in tact, but the map wasn't there. It spat out a message at me that the map file didn't load.

This is definitely a bug. :)
#4
03/04/2005 (3:16 am)
Not a bug, just not a feature. Big difference. ;)

- Melv.
#5
03/05/2005 (10:20 am)
Loading particles from zip files doesn't appear to work particularly well either. I'm sure the particle / map loading issues are related. In any event, these are both "features" I would like to do away with:)
#6
03/05/2005 (10:26 am)
Based on Melv's response regarding using the Resource Manager in Torque for future file/resource management, this functionality should be resolved just as a matter of using the Resource Manager in the future. Something to not worry about right now, assuming the Torque RM is going to be the next tier of implementation!
#7
03/05/2005 (10:35 am)
This is because it opens the stream using a file stream, probably. The way it needs to be done is using ResourceManager->openStream, make sure to close the stream with RM->closeStream as well.

I don't actually know if this is the solution cuz this is the 'just woke up forum browsing', but it sounds about right.
#8
03/05/2005 (2:47 pm)
Pat is correct. :)

I have to own up to this one, it's basically my fault for not converting this part over for Melv. Couldn't get to everything. This is one we'll fix down the road. It's really, really easy. And note that for now we don't claim "read assets from .ZIPs" as a feature. ;)
#9
06/22/2005 (12:32 pm)
Will this feature be included in the 1.1 update, or should I go ahead and try to fix it myself? :)
#10
06/22/2005 (2:01 pm)
I use encrypted zips, and my art, sound and particle assets all work perfectly well so far. The map files have to be seperate, but I'm not finding that much of an issue at the moment.
#11
06/22/2005 (2:33 pm)
All files are now loaded/saved via the resource-manager meaning there's support for files embedded in zip file-systems as well as saved-files being available without having to reset the mod paths to force a resource-manager scan. Quite simply, yes. ;)

This will be in the update.

- Melv.
#12
06/22/2005 (6:51 pm)
@Philip: Did you use the encryption resource posted here on GG or something else? I'm just curious what changes were made to allow the particle effects etc to exist in a zipfile. I don't need tilemaps, so that would work for me.

@Melv: Great to hear! Thanks for the info.
#13
06/23/2005 (12:28 am)
I'm using this resource: http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7787

No idea what it does to the resource manager, as I dropped it in and it worked :)
#14
12/08/2010 (1:40 am)
I know this is a very old thread, but does anyone have a solution for TGB that does NOT require source code modification.

Cheers,
Sam