englercj / phaser-tiled

A tilemap implementation for phaser focusing on large complex maps built with the Tiled Editor.
MIT License
290 stars 31 forks source link

Parallax Layers #8

Open englercj opened 9 years ago

englercj commented 9 years ago

Right now there is no support for layers that scroll at different speeds, need to implement scrollFactor for layers and get that working. Also have custom properties so they can be set from Tiled.

embiem commented 9 years ago

any progress on this? I am currently working on a workaround to add parallaxing with this plugin by doing this: var xAmount = (this.mainLayer._scrollDelta.x * this.driftAmountMain) / 1000; var yAmount = (this.mainLayer._scrollDelta.y * this.driftAmountMain) / 1000; this.mainLayer.position.x += xAmount; this.mainLayer.position.y += yAmount; this.mainLayer._scroll.x += xAmount; this.mainLayer._scroll.y += yAmount;

... which is not quite right and I need to get back to this later. If you want, I can help you implement scrolling in your plugin. So, do you have any progress already?

englercj commented 9 years ago

I do not! Unfortunately, been too busy to work on this project at all for a while. v2 is being developed in the thin-tiles branch though so if you make any changes, do it there.

embiem commented 9 years ago

okay, I forked the current version and will try to implement the scrolling feature.

Weedshaker commented 8 years ago

How is the progress going? Phaser lets me change the scrollFactorX/scrollFactorY for tiles and works beautiful, it would be nice if Phaser-tiled gets this, too!

THX

englercj commented 8 years ago

Moving this to v3 where the new custom render code will make this a lot easier.