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 DanielGray

Hello all,

Developing a platformer game and I am having some issues with loading specific resources on specific levels.

Level loading code works, respawn loading code works, no errors. Here is the code for loading a level:

if(this.levelMarker == 5){
this.loadLevelDeferred( LevelLevelFive );
}
if(this.levelMarker == 6){
this.loadLevelDeferred( LevelLevelSix );
}
if(this.levelMarker == 7){
this.loadLevelDeferred( LevelLevelSeven );
}

The issue is with chrome, when my character dies on levels 7,8, and 9, the level platform files (which is about 4000x3000 pixels does not load, so the enemies load, the parallax background loads, but not the platforms. All levels are loaded in the same way and there are no coding errors. This problem is only on the last three levels, and no others.

I load the levels in initialize. The game has no problem with the initial loading of the last three levels, but on respawn it almost always loads everything but the level platforms.

Any ideas?

1 decade ago by DanielGray

file sizes for background resources:

Levels 1,2,3 tileset is 2000x2000

Levels 4,5,6 tileset is 4000x6000

Levels 7,8,9 tileset is 7200x5600

I am assuming that chrome is having a problem with the larger file.
Also these levels are somewhat larger than the previous levels only by a small amount, average level size is around 20,000 x 16,000.

1 decade ago by DanielGray

Background files were too large, used artboards in Illustrator to break level 7,8,9 tilesets down into smaller files.

Did the math and the 7200x5600 file is about 16 million pixels larger than level4,5,6 tileset, chrome was not able to reload the huge tileset multiple times. Works now.
Page 1 of 1
« first « previous next › last »