Jump to content

load progress incorrect for sprite sheets in Phaser 3


Recommended Posts

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) {

I'm using Phaser 3.  Anyone see any problems with the way I'm doing this?

Link to comment
Share on other sites

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

`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. 


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...