hi,
this is my first time testing Phaser. i want to create a real-time multiplayer with server-side physics.
I’ve found this tutorial: Creating A Simple Multiplayer Game In Phaser 3 With An Authoritative Server – Part 1 – Phaser GameDev Tutorials
I’m not able to get my player-models to “bounce” on world collide nor did i get managed the client-side update…
First:
here is a snipped of my “server.js” file, responsible for building up the socket.io and jsdom for server-side phaser:
https://jsfiddle.net/ragesoft/xLa2bcmv/
It creates the virutal webbrowser and loads the game.js and ressources.
Second:
This is the “game.js” file, responsible for all phaser logic on server side:
https://jsfiddle.net/ragesoft/2re13c0b/
Inside the “game.js” i’ve allready made a “fix” for the ‘setCollideWorldBounds’ with some simple “if-statements” but thats not nice at all… physics should do it for me…
If i comment it out, the hero is moving off-screen
So my question:
What am i missing on server-side to get physics corretly running? Why my hero can move out of the scope of my world boundaries?
The heros collition seems to work correlty.i can push over other heros…
Thx a lot!