Jump to content

Cannot get collision to work for top-down movement


jansensan
 Share

Recommended Posts

I recently started with PhaserJS. I was delighted that I was able to test a platformer concept quite quickly, see it here: https://github.com/jansensan/test-phaser-js-platformer

 

So as a next project I wanted to test a top-down movement concept with grid movement, à la NES/SNES Dragon Quest/FF and the likes. So far, I built the map in the Tiled Map Editor and I'm able to get the sprite to move properly on the map.

 

However the collision is not applied, see it in action. You can also check out the repo here.

 

I would welcome any guidance as of how to get this collision working. Thanks!

Link to comment
Share on other sites

I don't know if it's still a current problam but in the example you linked in the first post (a Zelda looking game), I managed to go through the ennemy (or him going through me) by getting him going up and down (randomly) on 2 tiles a me walking in its direction.

 

To be simple: The ennemy is doing: D4 -> D3 -> D4 -> D3 and I'm try to go from C4 -> D4 (by maintaining "right") and it makes up be on the same tile.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...