I'm currently playing around with phasio.io and socket.io to create a really simple multiplayer.
For the beginning i created basic movement which is synched via socket.io. The clients are sending their positions to the server and the server broadcasts it to the other clients. This works fine, however I'm aware of the fact that every user could simply cheat by emiting wrong positions.
Exactly this is where I need some new ideas. I'd really like to use phaser because it is really helful with all the animations and rotations etc. However, I kinda know i should calculate movements etc. in the backend - not in the client.
But is there a way to use phaser.io on a node server to run a game instance which then calculates the positions? Or do I need to build my "own game engine" in the backend?
An basic example would be: A player shots ( in a tank game for example ) towards another player. Using phaser only this would be very simple. But in a multiplayer i would now need to do the collision calculation on my own - right?
Any ideas ?