Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Itch brotli support for Godot Web export

A topic by Playnix Studio created Jul 05, 2024 Views: 212 Replies: 1
Viewing posts 1 to 2
(+1)

Is there a way to upload Godot games and serve them after i compress the wasm file and pck files to brotli? 
I saw in the documentation that itch supported brotli as long as they ended with .br but i can't figure out how to make this work.

I compressed all files on the export to have a .br extension. i got the godot wasm to go from 37mb to 5mb and i'd like to serve that file instead of uncompressed one, or gzip compressed one.


I there a way to use brotli with butler maybe? 

Did anyone succeed on something like this? is it only godot games that doen't work?

(2 edits) (+1)

Not sure if this changed since you asked, but the docs currently say they apply gzip compression to wasm and pck:

In order to reduce bandwidth and decrease loading times, itch.io’s CDN will automatically apply GZIP compression to the following file types if they are provided uncompressed.

File extensions:

  • wasm
  • pck

But that’s not Brotli, so maybe you already knew that.

Those docs are where it says .br files are detected as brotli. From this comment it sounds like you need the Godot export template to request files with the .br extension (so the bootstrap js should try to load index.pck.br). Not sure how to do that.

There’s an open issue on Godot for compressing the pck with Brotli: https://github.com/godotengine/godot/issues/20996