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

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.

1 decade ago by jessefreeman

Please ignore this, I just realized that my main.js overrode draw and no longer called parent so the new setScreenPos loop never got called. Fixed that and now everything works fine.
Page 1 of 1
« first « previous next › last »