BobBob Posted August 17, 2018 Share Posted August 17, 2018 Has anyone encountered a problem with the load progress reporting incorrectly when loading sprite sheets? I'm loading a large sprite sheet and loading goes from .5,.33,.66, to 1.00 immediately and loads these numbers every time. The game does eventually load fine, but way after load progress reports 100%. Here's the code: this.load.multiatlas('sprite_sheet1', 'sprite_sheets/sprite_sheet1.json', 'sprite_sheets'); this.load.on('progress', function (value) { console.log(value); }); I'm using Phaser 3. Anyone see any problems with the way I'm doing this? Link to comment Share on other sites More sharing options...
samme Posted August 17, 2018 Share Posted August 17, 2018 You mean there's a long delay between when progress shows 1 and the scene appears to start/render? Link to comment Share on other sites More sharing options...
BobBob Posted August 17, 2018 Author Share Posted August 17, 2018 Yes. Also, the reported loading values are always the same, in this exact order with these exact values .5,.33,.66, to 1.00 (happens pretty much instantaneously). In other words "real" loading progress is not reported. I'm thinking this has something to do with it reporting loading for only the .json file(tiny file, loads very fast) but not reporting on loading for the associated .png sprite sheet (larger file, hence the delay). Just an idea, but I don't know how I could remedy that. Client is requiring "real" loading progress to be reported. Link to comment Share on other sites More sharing options...
samme Posted August 17, 2018 Share Posted August 17, 2018 `progress` is per file, not per byte, so those values aren't unusual. The second-level assets should also get queued, and it looks like `progress` is showing that. You can probably verify by using the loader's `filecomplete` event. It's possible something else is causing a delay even after file loading is finished. You could try the browser's Timeline tool for that. https://github.com/samme/phaser3-faq/wiki#i-need-per-file-loading-progress Link to comment Share on other sites More sharing options...
Recommended Posts