ignacioxd / ragin-mages

JavaScript MOBA game built with Phaser 3
https://raginmages.net
59 stars 21 forks source link

Players allowed to move out of arena #98

Closed willhnation closed 6 years ago

willhnation commented 6 years ago

In one of my first matches I was able to move my sprite out of the grid and into the surrounding black area. Eventually the AI could also follow me outside.

To Reproduce Move sprite to the upper right hand corner of the arena. Try attacking a few times and then move sprite up and down. Return to the upper right hand corner and you should be able to move off grid

adnanusman commented 6 years ago

Hi, this is a known issue but it was not put into the issues list, thanks for doing that. Join us in the #game_projects section on slack.

ignacioxd commented 6 years ago

For anyone who'd like to work in this, the solution to this issue involves creating a new map using Tiled will multiple layers. One of the layers should be the collision layer, and should be loaded as such in the game.

Here's an example in Phaser 2, so we need to figure out if this same approach works on Phaser 3, and if not, what is the best way to do it in the newer version.

BrianFreemanAtlanta commented 6 years ago

FYI: My pull request adjusts the velocity for map edges. This keeps the character, name and health bars together. I tested if we take off the collision in the dungeon map it works for single player too.