I have also only caught the big star twice. It works best in a team, putting 3 boxes below the star and then jump on each other to catch it.
No. For the client? You should probably spin up multiple servers in multiple regions to lower the latency. Otherwise you can’t do anything. If the client has a slow and/or unstable network connection, he can’t play an real-time online game.
Since this game works in real-time with multiple players, there is not client side correction (But you could of course implement this in another type of multiplayer game). Everything is calculated on the server. If the players latency is below 100ms, he will not notice anything. I guess, since you’re located in Austin, TX, your latency is much higher. Currently the server is located in Europe (where I live).
this.Matter.Sleeping.set(this.body, dead) only for “dead” bodies. In this game dead bodies are the boxes which disappear after a certain time and will re-spawn later.
I could not find a way to debug it on Heroku. This is the first time I use this service and only have a free account. But I have tested in on my docker-machine on EC2 (t3.micro) which has 1GB RAM and 2 cors. Each player uses about 30 kBps download and 5 kBps upload. The t3.micro instance is capable of handling up to 5 Gbps. I was running 4 game instances (in the same node app) with 50 objects each and the memory was about 190MiB and 30% CPU.
Big issues, no. Everything works smoothly. The only thing special you have to do, is installing the required packages for canvas to work. But since I have dockerized the app, it does this automatically each time I publish it.
I can totally recommend you this approach for a real-time multiplayer game. I works great. Currently I’m about to program a RoomManager which will manage multiple socket-io rooms and create a new Phaser instance for each room (all in the same nodeJS app). I will also add a /stats url, where you can see stats about the app’s cpu and memory usage and its logs.
For now, the game (same link as in my first post) creates a new room for each 4 players. Open 5 browser windows and you will see that the 5th player is alone in its own room (Phaser instance) and it shows its own public room id in the debug text.
I know that I wanted to publish it earlier, but I prefer to add all these great features first
Hope this helps