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

Add support for Arcade Physics #19

Open englercj opened 9 years ago

englercj commented 9 years ago

Right now only P2 is officially supported, Arcade should be added!

pooya72 commented 9 years ago

do you have any plans to add arcade physics in near future ?

englercj commented 9 years ago

I plan to have it in the next release of this lib, but I'm not sure when that will be.

nkholski commented 8 years ago

I saw that it's just 60 lines related to P2 in physics.js, is that all and do you expect Arcade physics would demand more work than that? The only thing stopping me from using the plugin is the lack of Arcade physics, and if it's not a huge undertake I might have a go on it and make a PR. (I have no time to even try before about two weeks though).

englercj commented 8 years ago

Feel free to put in a PR anytime. The more time consuming part of this for me would be building something I can test with since I never use arcade physics in any of my projects.

nkholski commented 8 years ago

The Phaser core tilemap layer class has a layer.data property which is an array with tile objects. Would it be a acceptable solution to add a property, like "arcadeCollision", with an array of collision data only (collideUp etc plus faceTop etc). I haven't tested anything, but my guess is that such array would pass through Phaser Arcade physics. I've manipulated the Map Collide-example from http://phaser.io/examples/v2/tilemaps/map-collide to use the plugin, but haven't had time to attempt to add Arcade physics yet.

Kevanov88 commented 8 years ago

+1