A downloadable extension

Buy Now$1.99 USD or more


NOTICE: Requires a registered license of GameMaker Studio 2 (GameMaker Studio 1 not supported)

Xzip is a custom file archive utility for GameMaker Studio 2. Don't store your external files where anyone can see and edit them, use Xzip!

GameMaker Studio supports the inclusion of external files with game projects... with caveats. By default, any included files will export completely unprotected, while your primary assets are tucked safely away in an archive that's difficult for the average user to access or modify. Why shouldn't external files get the same treatment?

Although GameMaker has built-in support for .zip archives with the zip_unzip command, this command offers no granular access to archive contents and will pause the game until the entire archive is extracted. It also lacks support for any kind of security features. What's more, there's no corresponding zip_zip command to create archives in the first place!

Xzip is an archive format reimagined just for GameMaker Studio 2 to manage external files discretely and securely. Although it utilizes compression, Xzip's focus is not on making big files smaller. Instead, Xzip aims to make using external archives convenientfast, and powerful using only native GML and smart, simple commands.

Features

Robust

Xzip is built using native GML functions for the widest platform compatibility. Unlike zip_unzip, which offers no flexibility, Xzip can create, read, and extract archives with individual file access. You can even access and modify files inside the archive--no extraction required!

Flexible

Xzip supports adding and manipulating files individually, as folders, or as arrays. All relative paths are preserved in the archive--but you don't need to remember that. Automatic folder management means a file name and extension are all you need to access data anywhere in the archive.

Can't remember that much? Numerical indices are supported too!

Optimal

Using a combination of custom metadata and compressed binary data, Xzip balances speed and security to serve the broadest possible uses for your external file needs. You can also read and write regular game data to the same archives as your files!

Secure

While anyone can access zip files included with your game, data stored in Xzip cannot be read with conventional archive software. To further protect against unwanted tampering, extracted files can be verified against their original archived copies and overwritten if any changes are detected.

For maximum security, combine with GameMaker's built-in MD5 encoding to determine if the archive itself has been tampered with, and your files are bullet-proof.

Clear and Convenient

All XGASOFT products include clear, detailed documentation in code comments, included PDFs, and online. 

Visit the online documentation now!

End-user License Agreement (EULA)

StatusReleased
CategoryTool
Rating
Rated 4.0 out of 5 stars
(1 total ratings)
AuthorXGASOFT
Made withGameMaker
Tagsarchive, Game Design, Game engine, GameMaker, Management, zip
LinksDocumentation

Purchase

Buy Now$1.99 USD or more

In order to download this extension you must purchase it at or above the minimum price of $1.99 USD. You will get access to the following files:

xzip-1.0.2.zip 3 MB

Comments

Log in with itch.io to leave a comment.

xzip_create doesn't create anything, sandbox is disabled.

When I call the function, game freezes for a second so I guess it's doing something, xzip_create returns the correct path, but there just is no file created.

xzip_exists also returns false when I enter the path I got from xzip_create.

To keep it simple for the test, I just tried to zip projects .yyp file.

Hi, thanks for using  Xzip!

Please keep in mind that even with the filesystem sandbox disabled, GameMaker projects are still subject to Windows filesystem permissions. Most likely, the application does not have permission to access  your project directory. If needed, you  can give GameMaker access to protected locations with the "get_open_filename" or "get_save_filename" functions, then pass the returned file path to Xzip functions.

Xzip does attempt to validate access permissions on its own, but GameMaker can silently redirect filepaths to the sandbox in some cases, so you may not be getting an error if, say, the file is being created under %AppData% instead.

Thanks. As you said, file was being created in project folder in %appdata%. Unfortunately I couldn't make it work outside sandboxed folder, but that not an issue for me right now.

I was just thinking of looking into writing something like this. Is there a way to extract a PNG (or whatever) from a XZip and decode it to a surface (if not I'll still have to look into writing my own version). Basically I want to download an encoded archive with licensed assets and load them into a game - you know, DLC...
I've got as far as downloading assets (un-encrypted) and creating sprites from them but encryption is vital when it comes to keeping to license terms so any assets need decoding - not something I can get GMS2 to do (without writing a PNG extension I guess which seems like re-creating the wheel)

Hi peardox,

Xzip can store any binary formats, including image files, but they would have to be briefly extracted to a temp location and then imported to GameMaker (the temp file could then be deleted).

A more straightforward way would be to use surfaces rather than sprites, then use the xzip_write function to store the image data directly within an archive. The xzip_read function can then fetch the image data without the need for extraction to a temp location first.

Both approaches have their pros and cons, so which is preferable simply depends on the demands of your project.

Temp file storage breaks license terms - particularly as there are undelete utilities.

Surfaces are not a solution here as a 4k x 4k RGBA takes up 67,108,864 bytes and GZ compression won't get that back to PNG sizes (only PNG will do that). 

Guess a decode buffer to surface extension is required...