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.

AppGameKit Classic Chat / ExtractZip()

Author
Message
anwserman
13
Years of Service
User Offline
Joined: 20th May 2011
Location: Wisconsin
Posted: 1st Jul 2012 01:13
Does anyone know if ExtractZip overwrites any existing files when it does it's extraction process?

Hi there. My name is Dug. I have just met you, and I love you.
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 2nd Jul 2012 10:54
Yes, it does overwrite anything it has to.

Follow me on twitter! @MotionStruct
Motion Struct blog
Marl
13
Years of Service
User Offline
Joined: 19th Nov 2011
Location: Bradford, UK
Posted: 2nd Jul 2012 16:18
Quote: "Yes, it does overwrite anything it has to."

In essence yes, but in practice it's a little more complex.

AGK has two areas for files, the location of the source files for your project - which will never be overwritten, and an area used to write files - which will.

This is really only relevant if the same files are used in both, but can be used to override project files.

For example.

Suppose you have a file called "font.png" in you project source. Calling loadimage("font.png") will load this image.

Now if you extract a zip also containing "font.png", the version from the zip will be written to the write area.

AGK will now use the one in the write area in subsequent calls to loadimage("font.png").

If you delete "font.png", the one in the write area will be deleted and in subsequent loadimage calls, AppGameKit will use the original one from the project area.

This could be used to switch level data in and out without needing to change the code used to access it. But is really only useful on platforms where the source is not compressed.

There would be no benefit on Android for example, since the source is stored in compressed format anyway (.apk files are just zip files with a different extension)

Login to post a reply

Server time is: 2024-11-23 17:06:24
Your offset time is: 2024-11-23 17:06:24