Jump to content

PIXI Loader handling failed loads


charlie_says
 Share

Recommended Posts

This is more a question about how people try to do things rather than a problem with PIXI per se.

What I've found is, if I force the loading to fail (by turning off WiFi or similar) PIXI behaves as expected, an error event is fired, and then the game will play but with missing assets.

The question:

How do people gracefully handle the failure? 

 

Do you force the loader to start over?

Push the error items to an array and reload? (I think this one is good, but there's a possibility that you could get caught up endlessly in the game retrying);

Ignore it? (hey it's the internet, things break from time to time!)

Create an error screen, which has a link for the player to start over? (this is probably the best option.)

 

Thanks!

 

 

Link to comment
Share on other sites

I try as much as possible to identify the problem, if internet is down I don't want my app to work anymore and I rather display an error to the user and quit everything. I usually have a fall back system with assets primarily on a CDN and a local fallback or relative fallback, if both do fail then I assume there's no internet anymore and I prefer to stop the app completely.

Link to comment
Share on other sites

Depends on the asset. For example, if you need to load a map; and it fails, you can't play the game.

Generally what I've done in the past is catch all asset errors and if the errors were ones that a retry might fix (like a timeout, or 503, or some such) then retry those at the end. If I get a fatal error like a 404, I just show an error to the user and exit.

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.

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

Loading...
 Share

  • Recently Browsing   0 members

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