Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Unzipping game in player's browser.

A topic by perons created Aug 18, 2023 Views: 164 Replies: 5
Viewing posts 1 to 6

Hi!
I'm a Godot Developer, and I was trying to optimize my web builds (made with Godot 3.5.2) for itch.io releases. One particular thing I was trying to do was to:
- Zip  the engine  .wasm and game .pck files together, reducing the size of both files.
- User unzips the file on their own browser and loads the game.

It's a really small optimization but I was interested in doing it to understand a bit "how much" I could optimize from my builds. I was able to reach the point in which I could unzip the files and restore the binary blobs in the user browser, but I couldn't figure out how to load the blobs themselves on the Godot engine js bootstrap - itch.io returns an error everytime I try loading a `blob:` generated URL. From what I understood looking into this problem, it seems this is a security config and itch.io simply won't load the blob files from the user browser, but I'm not 100% sure. Have anyone tried doing something similar (loading js blobs on an itch.io game)? Is that even possible?

Thanks!

You already upload game builds as a zip file for browser games. You just zip your files up, itch.io unzips them when someone goes to play it and looks for index.html in it.

Itch unzips the package you sends it, but the user downloads the "raw" files from the package. In particular, I want the user to download one .zip file with the wasm and pck to run the project instead of the wasm and pck themselves, which should be around half the original download size.

As I said, I managed to do exactly this. The problem is running the `blob:` files I get when I unzip on the users browser.

Web server serves the response gzip encoded. Is your additional zip encoding going to save anything significant? I doubt you can get browser to run it the way you want.

Aaah, now I understand (I think). No, in this case it won't save anything significant, if it is already serving the gzipped files. I was using Firefox debugger to check this, but the Networking tab only shows the file request path.