Realtime pokémon multiplayer game; Sprite won't load after reloading scene

I’m a beginner and created a simple realtime Pokémon game with Phaser 3 and Colyseus.io.

But I have a small bug with loading sprites when the scene is reloaded (with new data).

I created a GitHub repository with the source code and a small example of the bug.
See GitHub repository.

I’ve been with this problem for three days and can’t fix this… :slightly_frowning_face:
I really hope someone can help me with this.
Any help is greatly appreciated!

in Scene2.js lines 119-120,

if (data.event === 'PLAYER_CHANGED_MAP') {
// ...code here
}

Your x and y from data are wrong. If you try with, say, x:100 and y:1100 you’ll see the other dude show up.

So fix how you are sending those coordinates.
ps:

  • you’ll need to disappear the entity once it leaves the current zone too

Good luck!