Tabasco Posted December 31, 2013 Share Posted December 31, 2013 I'm loading up a tilemap with 64x64 tiles and moving a sprite around in it. That all seems to work well, but when moving in a way that would scroll the tilemap I get what looks like 32px of background briefly visible before it is drawn over.If I set the layer to larger than the canvas size it will solve it in positive directions, but it persists when moving left or up. Demo is here:http://midian.homelinux.net/venenatus/ What am I doing wrong? Link to comment Share on other sites More sharing options...
Tabasco Posted January 1, 2014 Author Share Posted January 1, 2014 For now I'm using focusOnXY when updating the player location and it's behaving as expected. SombreErmine 1 Link to comment Share on other sites More sharing options...
SombreErmine Posted January 26, 2014 Share Posted January 26, 2014 This is an issue for me too. Your solution works for me. Thanks! Link to comment Share on other sites More sharing options...
SombreErmine Posted February 2, 2014 Share Posted February 2, 2014 So it "works" in the sense that it solves the Tilemap edge showing issue. It however causes Tilemap rendering to be out of sync with Sprite rendering. I can't find a solution that keeps both issues from happening. Link to comment Share on other sites More sharing options...
SombreErmine Posted February 2, 2014 Share Posted February 2, 2014 Here's what I'm doing right now which is really hacky.I've gone back to using this.game.camera.follow() to get the Tilemaps synchronized with my Sprite groupsI've increased the game size and tilemap layer sizes to an additional 64 width and 64 height to accommodate a one-tile padding around the worldI've made the outer-edge tiles collidable with everythingI've put a DIV around the canvas with:width: 864px;height: 664px;margin: -32px 0 0 -32px;I've then put a DIV around that DIV with:width: 800px;height: 600px;overflow: hidden;Now there is no jarring edge lag on the Tilemap AND the Sprite Groups are synchronized with the Tilemap. Of course, I would like a legitimate solution for this issue... Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts