Closed ghost closed 8 years ago
I feel like you must not be using the latest version of this pllugin, newer versions purposefully do not create Tile
objects at all. I don't think this can work with the latest version, nor do I recommend this as the way going forward.
We just need to add the proper convert methods to the physics.js file.
I'm going to close this, since we have an issue to track building Arcade support already (#19).
Yeah, I'm using the older version cause the newest one drops my frames to like 20fps for some reason (From 60). So I just stick with the old one :P. I was going to make an issue about it but everything in my console is fine and I don't see any errors so I don't really know what to report. I did check the Phaser debug, and it just showed high rendering usage
I tried 2.4.4, 2.4.5 and 2.4.6. I found 2.4.3 and the old Phaser tiled plugin has the best FPS? Maybe it's just my game... not sure
Can you share your project so I can try to track down why that is? All the improvements in v2 were to decrease memory and CPU usage. I can't imagine the FPS dropping like that just from upgrading.
I'd really like to figure out the problem there.
Hey guys, so I got arcade physics to work.
In Phaser-Tiled, under the Tile.prototype method
add:
Assuming your layer name is
Collision
then, simply add this to your update method:
Where pSprite represents your player sprite. and the index 7 represents what layer
index
yourCollision
layer is under.I tested the regular stock Phaser tile renderer with arcade physics and this plugin still performs better. I know this is a hacky way of doing it, but it works. And AFAIK setting the tiles to immovable helps with performance too as it doesn't have to check for velocities so that's nice.