Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Windows / (Tier 2) Zip Resource File?

Years of Service
User Offline
Joined: 14th Jun 2016
Posted: 14th Jun 2016 07:12
First of all: The obligatory apologies ahead of time if this topic has been discussed but I was too dumb or blind to find it.

I am using AppGameKit Tier 2 as a way to learn C++ by making a simple 2D game (I can only learn by doing something I want to make). I've been attempting to use a resource zip for the sound effects, music, xml files, and sprite sheets but I am stymied by my lack of knowledge and abilities.

Is it possible to load a resource zip file into memory then use a method like agk::LoadImage to load an image from memory? I have figured out some of the simpler zip libraries but agk::LoadImage is looking for a file path not a pointer to a file in memory. Any help would be greatly appreciated, even if that help is a simple: yeah it can't be done without changing the AppGameKit libraries. .

And to answer any potential questions: I don't have that *many* files, it is more of an exercise than anything else. However, if I can shave a second or two loading the 70 or so resource files I won't complain.
Ancient Lady
Valued Member
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 20th Jun 2016 00:46
The beauty of working in Tier 2 is that you can use libraries other than just the AppGameKit ones.

But, if you have stuff in a zip file, you are adding time for the unzipping to be done before you can use the resource. The core AppGameKit stuff doesn't have commands to load objects directly from the zip file. You will have to unzip the zip file and then use the unzipped files.
Ancient Lady

Login to post a reply

Server time is: 2021-01-23 22:39:43
Your offset time is: 2021-01-23 22:39:43