Anyone have an experience to make multipayer game with Phaser 3 and Socket.io ?
I have a problem with socket.io and phaser, especially if player reconnect again or restart the game scenes.
Player -> Die -> Gameover -> Reconnect/restart -> (Error)
I have 2 scenes, first one for “main game” and second one for “game GUI” to show player stats and game popup.
All variable (including socket) and game functions are stored inside create(), so there are no global functions and variable.
then if the game or scenes are restarted, it’s take a delay about 3 seconds (freeze), then the game error are appear.
all error are happen inside socket.on(‘emit’)
How to fix this?
It’s not socketio problem, i fix this here Event emitter , Can't communicate after scene restart/start again