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?
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?