0 votes

Hi, I need to export my project to HTML5, but when I export, the .pck file becomes very large, which means that it takes a long time to load when integrated into a website.

Is there any way to split the .pck file and load the parts in the background of the game at runtime?


I also tried to export the scenes separately, getting several HTML pages and several small .pck files, but then I don't know how to connect them again at runtime. In this case it would also be necessary to load the several .pck on the background during the execution of the game. Is there any way to reconnect the scenes when they are in different exports and load the various .pck runtimes?

Thank you

asked May 14 in Projects by Isccb (22 points)
edited May 14 by Isccb

1 Answer

0 votes

You can load PCK files at run-time using ProjectSettings.load_resource_pack(), but I don't think this can be integrated into an HTML5 build that would download a PCK file at runtime. See Exporting packs, patches, and mods for more information.

To make PCK loading faster, you can configure the web server to compress PCK files using gzip or Brotli on-the-fly (just like the .wasm file).

answered May 18 by Calinou (6,520 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.