Closed therladbsgh closed 7 years ago
Hey there, thanks for taking the time to make such a clear example of this issue. I'll hopefully have some time to take a look soon and find out what's going on here.
Hey there!
After spending an hour or so trying to debug the plugin with your game running, I've realised it's not the plugin at fault.
Here's the error:
https://github.com/therladbsgh/rpg-web/blob/0dea01e/client/game/room/RoomClass.js#L73
this.collisionsLayer
should be this.collisionLayer
As a result, setting the collision flags will then work correctly.
Cheers!
Well, RIP... that was embarrassing. Thanks so much for taking the time.
No trouble, it gets the best of us. :)
I am looking to alleviate the need to call this manually at some point, in the future (#45).
I'm currently using the Arcade Slopes tileset (32px) provided in this repository. However, the tileset is showing some bizarre behavior; in particular, the first tile (full-block) is inconsistent in being collide-able.
Below is an example in Tiled of using the tileset in a map:
However, when seen in the actual game, the selection of full-blocks on the top-right is not registered for collisions at all. Also, while the half-blocks are registered for collision when used in the house, it does not register for collision when placed next to a full-block (as seen in the stack of logs next to the house.)
However, the tiles on the stack of logs WILL register for collision if there are other tiles directly adjacent to it. Below is an example in Tiled where I place more vertical half-blocks near the logs:
In this case, when seen in the game, the collisions work as intended (although the tiles in the top-right are still not registered):
I'm not sure if this is a bug, or if there is a specific criteria that needs to be required for full-blocks (and other blocks) to be registered for collision. Below is the relevant code for your reference. Here's the actual link to the repository if more information is needed. I'm also using Phaser CE (v2.8.4).
Game State: