I'm currently playing around with phaser.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 emitting wrong positions.
Exactly this is where I need some new ideas. I'd really like to use phaser because it is really helpful 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 ?