1 decade ago by jessefreeman
Not sure if anyone else has come across this but I am seeing an issue in my game where the map layers no longer follow the player when he moves. I did a diff on the game.js class between version 1.17 and the latest one and noticed the following loop was no longer in the game.js update method:
When I add this back in everything works fine. I have some some customizations to my game (not the core files) to handle some lighting effects but am not sure why this being removed in the latest version would break my maps.
I see that this is now being done in the draw method and I wonder if my own code is just not updating the screen.x & y positions before draw is being called? Going to look into that but has anyone else had a problem with migrating to the latest build?
Any insight would be helpful.
for( var i = 0; i < this.backgroundMaps.length; i++ ) { this.backgroundMaps[i].setScreenPos( this.screen.x, this.screen.y); }
When I add this back in everything works fine. I have some some customizations to my game (not the core files) to handle some lighting effects but am not sure why this being removed in the latest version would break my maps.
I see that this is now being done in the draw method and I wonder if my own code is just not updating the screen.x & y positions before draw is being called? Going to look into that but has anyone else had a problem with migrating to the latest build?
Any insight would be helpful.