Exported HTML5 Code is Overweight

Hi everyone! I’ve run into an issue and could really use some help.

I developed a game and exported it to HTML5. After exporting, the game folder is 10.7 MB in size, but only 1.6 MB is taken up by images, music, and fonts. The remaining 9.1 MB is all code, which feels like a lot.

Could anyone please help me understand why the code might be taking up so much space and how I can reduce the overall game size? I’ve already compressed the images and music as much as possible, but it hasn’t made a big difference.

I’d really appreciate any advice!

1 Like

Hello @PanLuma.
Here is a link for much better performance.
https://wiki.gdevelop.io/gdevelop5/tutorials/how-to-debug-poor-performance/

I’d like to know more

In addition to your event code, the various JS files in your exported HTML5 project are composed of the various components needed to render the game. PixiJS for the visuals on a 2D game, ThreeJS on a 3D Game, HowlerJS for audio, etc.

You cannot reduce the file size further than what it gets with an HTML export, as you cannot remove the base renderer components.