Regarding Manifest file

Hi all,
My html build size is about 9mb. I wanted to decrease it. So I used the manifest file and try to remove unused components from the project. But it doesn’t have significant impact on the build size. But the problem is final build size has increased a bit. this is a part of the manifest file.

js-web:
context:
excludeLibs: [“record”,“vpx”,“profilerext”,“engine”]
excludeSymbols: [“ProfilerExt”,“FacebookExt”]
libs: [“engine_release”,“record_null”]
Am I doing this in the wrong way ?

My html build size is about 9mb

The default engine is ~5mb for HTML5. Do you count the content in your 9mb?

You could also try to remove the physics engines if you currently don’t use them?
Try the helper app to create your manifest file: Manifestation - Create App Manifest files with ease

Also, for textures on HTML5 you might want to look into WebP compression and texture profiles
That should help a lot too.

3 Likes

Yeah I have few sprites which cause the larger build size. But I wanted to remove the unwanted components using the manifest file. but it doesnt have effect on the build size.
I created my manifest file using the above url.(cant remove the physic engine as I use it)
I will look into the texture compression . Thank you very much :slight_smile:

On the other platforms, the vpx library is fairly big. But on HTML5, it doesn’t exist so you won’t save any memory on that.

To be clear, don’t you get any size change at all?
Have you specified the manifest in the game.project?

In the future, we’ll make it possible to exclude either 2d or 3d physics (now they’re lumped together)

2 Likes

Do you have webp texture compression enabled?

1 Like

Yeah build size doesnt get reduces. It only get increased a little bit. Also I have specified it in the game.project file. :slight_smile:

No , but I have enabled the texture compression on preferences settings. I will check on webp compression. Thank you :slight_smile:

using webp texture compression I manged to reduce about 1.5mb. Thank you @Mathias_Westerdahl and
@Pkeod for your help :).

2 Likes

Make sure to generate a build report to get a better understanding of where those megabytes go. Perhaps you have large sound files? It is typically either sounds, images or fonts that take up a lot of space on disk.

2 Likes

I generated the build support and my assets are about 1.5mb. also the final build size is about 6.5 mb.(I removed few assets also). Then extra 5mb is from the engine.I think we cant do anything about it.can we?

1 Like

Well, the engine can be reduced in size through stripping of the parts you don’t need. But you know that already. Are you bundling a release build? Also remember that gzip compression is likely to be applied for html5 when downloading.

Finally, you could split the download and exclude non vital starter content and download the rest using liveupdate.

1 Like

I think @AGulev managed to get his test game to ±700K gzipped on HTML5 back in the days: https://potatojam.com/games/cks/

I wonder if he tried to make a new build recently =]

2 Likes

@britzl and @Oleg_The_Evangelist thanks.I will look into gzip compression.

I just made an update of the game (by above link) up to the latest version of Defold:
gzipped whole game size is 1.3 Mb
gzipped engine only (js file) 924 Kb

2 Likes

@AGulev well if that’s the case. it should be really interesting. Thanks for letting me know.

um, so did your game footprint grow with the newer version of defold then?

Yea, just a little.

@Oleg_The_Evangelist The smallest (gzipped) engine I’ve confirmed with was 872kb.

3 Likes

thanks! I remembered the wrong number then. 872kb it is then!