Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by TommyBs

Hi,

I've searched the forum and found a few errors like this, but couldn't find a solution to my issue. My game currently won't load due to an "Uncaught Failed to load resource:" error. Looking at the code in loader, it appears the log should spit out the resource it failed to load. However this is empty. All I initially did was try to create a start screen as in the Introducing HTML5 game development book using the same image as they use. This worked fine until I tried to update the image to one of my own. That's when I started to receive the error. Removing the code now still fails to load correctly, as does using the original image. What's weird is there is no path in the error and I can browse to the correct images directly. I'm running this on localhost, but the issue occurs in Chrome and Firefox.

Any ideas would be appreciated

1 decade ago by TommyBs

Found it, for some reason in one of my levels generated from Weltmeister, the resources had an empty new ig.Image('') as part of the resource array. Not sure how that got there though

1 decade ago by TommyBs

I keep seeing this now, and I've tracked it down. Basically if you create a layer,but don't assign a tileset to it, it cause the levelResources array to have an empty image added to it. This basically causes the game to crash. You might be wondering why I've got an empty layer in the first place, but this was merely so I could define some dimensions for using in Weltmeister. Clearly this isn't the right approach for me to do this!

1 decade ago by Joncom

Interesting point. Perhaps Impact could handle such a case more gracefully in future versions. Glad you got that sorted out.
Page 1 of 1
« first « previous next › last »