Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

Minimize Web Build

An asset by aturbidflow
The page banner background of a mountain and forest
Minimize Web Build hero image

Quick Information

0 ratings
Minimize Web Build icon image
aturbidflow
Minimize Web Build

A minification tool for Godot 4.3+ that automatically compresses files in your web buildSpeeds up your game loading even if your server does not support gzip compression.DISCLAIMER!1. The compression ratio of a .pck file depends heavily on the set of assets in your project.2. Loading speed depends on server settings.3. On average, loading speed when using a plugin can be from 10% to 100% faster.See comparison calculations here: https://github.com/markushevpro/godot-minimize-html-build/blob/master/COMPARE.mdSupported host platforms (where your editor runs): Windows x64 onlyRecent updates:- Threads support & PWA support- Custom templates support & disabled Head Includes override- itch.io & servers with gzip compression supportRecent fixes:- Fixed a race condition on slow networks- Fixed wrong parsing of file names with spaces- Fixed wrong parsing of file names with dotsHow it worksThe add-on resaves large files (.pck, .wasm) with gzip compression and adds the ability to load gzip-compressed assets in the browser using pako. Nothing else will be changed in your files.Usage- Install the addon from AssetLib- Enable the plugin in your Project Settings.- Export your project to Web.More information at GitHub: https://github.com/markushevpro/godot-minimize-html-build

Supported Engine Version
4.3
Version String
1.0.4
License Version
MIT
Support Level
community
Modified Date
1 month ago
Git URL
Issue URL


Minimize HTML Build

Godot "Minimize Web Build" Addon

A minification tool for Godot 4.3+ that automatically compresses files in your web build

Speeds up your game loading even if your server does not support gzip compression


Supported host platforms (where your editor runs): Windows x64 only
Please create an issue if you need support for other operating systems.

Recent updates

  • Custom templates support & disabled Head Includes override
  • itch.io & servers with gzip compression support

Godot 4.3+ GitHub License GitHub commit activity

How it works

The add-on resaves large files (.pck, .wasm) with gzip compression, minifies core files (.js and .html) and adds the ability to load gzip-compressed assets in the browser using pako. Nothing else will be changed in your files.

Usage

  1. Install the addon from AssetLib or from source (copy addons folder to your project directory)
  2. Enable the plugin in your Project Settings.
  3. Export your project to Web.

Detailed explanation

Step-by-step algorythm

  1. Godot creates release files.
  2. The addon copies additional and temporary files to the build directory (pako.js, compressor, minifier)
  3. Using a tool written in Go (see /vendor/bin/compress/src in the plugin directory), the .pck and .wasm files are converted to a gzip enconding
  4. Using minify by tdewolff, the core .html and .js files are minified.
  5. Using some crappy code, parts of the core JS and HTML files are slightly adapted to support the use of pako.
  6. The directory is cleared of temporary files (compressor, minifier).

Why Golang compresser?

It was painful to implement the encoder directly in Godot because of the "original" implementation of Gzip conversion. You can create a PR if you are brave enough to implement it.

Is it necessary to minify?

Nope, it does save a bit of size compared to gzip, but it makes js easier to update.

FAQ

Custom templates support

Honestly, it hasn't been tested. But you can try. If it doesn't work, feel free to create an issue.

Why Godot 4.0 - 4.2 aren't supported?

Because Godot had a broken web build until version 4.3. Actually, the addon works and compresses files on older versions, but the web build still doesn't work, so I don't recommend using it.

What about Godot 3.x?

There are no plans at the moment.




@aturbidflow – Telegram

A minification tool for Godot 4.3+ that automatically compresses files in your web build

Speeds up your game loading even if your server does not support gzip compression.

DISCLAIMER!

1. The compression ratio of a .pck file depends heavily on the set of assets in your project.
2. Loading speed depends on server settings.
3. On average, loading speed when using a plugin can be from 10% to 100% faster.

See comparison calculations here: https://github.com/markushevpro/godot-minimize-html-build/blob/master/COMPARE.md

Supported host platforms (where your editor runs): Windows x64 only

Recent updates:
- Threads support & PWA support
- Custom templates support & disabled Head Includes override
- itch.io & servers with gzip compression support

Recent fixes:
- Fixed a race condition on slow networks
- Fixed wrong parsing of file names with spaces
- Fixed wrong parsing of file names with dots

How it works
The add-on resaves large files (.pck, .wasm) with gzip compression and adds the ability to load gzip-compressed assets in the browser using pako. Nothing else will be changed in your files.

Usage
- Install the addon from AssetLib
- Enable the plugin in your Project Settings.
- Export your project to Web.

More information at GitHub: https://github.com/markushevpro/godot-minimize-html-build

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
Minimize Web Build icon image
aturbidflow
Minimize Web Build

A minification tool for Godot 4.3+ that automatically compresses files in your web buildSpeeds up your game loading even if your server does not support gzip compression.DISCLAIMER!1. The compression ratio of a .pck file depends heavily on the set of assets in your project.2. Loading speed depends on server settings.3. On average, loading speed when using a plugin can be from 10% to 100% faster.See comparison calculations here: https://github.com/markushevpro/godot-minimize-html-build/blob/master/COMPARE.mdSupported host platforms (where your editor runs): Windows x64 onlyRecent updates:- Threads support & PWA support- Custom templates support & disabled Head Includes override- itch.io & servers with gzip compression supportRecent fixes:- Fixed a race condition on slow networks- Fixed wrong parsing of file names with spaces- Fixed wrong parsing of file names with dotsHow it worksThe add-on resaves large files (.pck, .wasm) with gzip compression and adds the ability to load gzip-compressed assets in the browser using pako. Nothing else will be changed in your files.Usage- Install the addon from AssetLib- Enable the plugin in your Project Settings.- Export your project to Web.More information at GitHub: https://github.com/markushevpro/godot-minimize-html-build

Supported Engine Version
4.3
Version String
1.0.4
License Version
MIT
Support Level
community
Modified Date
1 month ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers