englercj / phaser-tiled

A tilemap implementation for phaser focusing on large complex maps built with the Tiled Editor.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tiles being positioned wrongly after scroll

Weedshaker opened this issue · comments

I have had a tilemap which worked perfectly with older versions of phaser-tiled as well as a modified version (https://github.com/bixi/phaser-tiled/blob/10279ac9cb828448216afc21273665eef62047e1/dist/phaser-tiled.js) with Phaser 2.4.4. But your latest release does the following to my tilemap when scrolling:

screenshot from 2016-03-23 12 47 02

Please, have a look at this or at least hint me to where I shall look for this newly added behavior.
THX

It happens in Canvas and WebGL (screenshots taken - using Phaser-Tiled v2.0.0)

Before scrolling (eg moving the main character)
screenshot from 2016-03-23 13 13 44

After scrolling (to the right for approx once the camera width)
screenshot from 2016-03-23 13 14 12

After scrolling (to the right for approx four times the camera width and to top 2-3 times the camera height)
screenshot from 2016-03-23 13 18 11

Seems that the tiles can't be reassembled at original rotation and coordinates after leaving the camera focus. And every time tiles leaving and reenter the camera area, they seem to reassembled randomly.

Hope you can help here!

Can you share a map I can reproduce it with, none of my test maps do this.

Sure!

-> test3(box)_phaserTiled.zip

Thanks for having a look at it!

Thanks man, I'm pretty busy atm (OT at work, rewriting phaser-debug). But I'll try to get this fixed as soon as I can.

We recently released our tech demo and so I can serve you a 1 to 1 comparison. v 1.4.1 vs. 2.0.0. I don't change any other code but plugging the different versions of phaser-tiled:

version 1.4.1:
http://52.193.238.13/shoga9team/

version 2.0.0
http://52.193.238.13/shoga9team/phaser-tiled-2_0_0-test/

I hope that you can find the issue! Again, thank you for your effort!

@englercj MannyC's change fixes the bug! Can confirm this after testing it with my map.

Cheers